mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
fixed sending goal commands from rtabmapviz
This commit is contained in:
+4
-3
@@ -381,10 +381,11 @@ void GuiWrapper::handleEvent(UEvent * anEvent)
|
||||
}
|
||||
else if(cmd == rtabmap::RtabmapEventCmd::kCmdLabel)
|
||||
{
|
||||
UASSERT(cmdEvent->value1().isStr() || cmdEvent->value1().isInt() || cmdEvent->value1().isUInt());
|
||||
UASSERT(cmdEvent->value1().isStr());
|
||||
UASSERT(cmdEvent->value2().isUndef() || cmdEvent->value2().isInt() || cmdEvent->value2().isUInt());
|
||||
rtabmap_ros::SetLabel setLabelSrv;
|
||||
setLabelSrv.request.node_id = !cmdEvent->value1().isStr()?cmdEvent->value1().toInt():0;
|
||||
setLabelSrv.request.node_label = cmdEvent->value1().isStr()?cmdEvent->value1().toStr():"";
|
||||
setLabelSrv.request.node_label = cmdEvent->value1().toStr();
|
||||
setLabelSrv.request.node_id = cmdEvent->value2().isUndef()?0:cmdEvent->value2().toInt();
|
||||
if(!ros::service::call("set_label", setLabelSrv))
|
||||
{
|
||||
ROS_ERROR("Can't call \"set_label\" service");
|
||||
|
||||
Reference in New Issue
Block a user