mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
rtabmapviz: labels can be shown in rtabmapviz and labels can be set from the gui
This commit is contained in:
@@ -54,6 +54,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rtabmap_ros/MsgConversion.h"
|
||||
#include "rtabmap_ros/GetMap.h"
|
||||
#include "rtabmap_ros/SetGoal.h"
|
||||
#include "rtabmap_ros/SetLabel.h"
|
||||
|
||||
#include "PreferencesDialogROS.h"
|
||||
|
||||
@@ -379,6 +380,16 @@ void GuiWrapper::handleEvent(UEvent * anEvent)
|
||||
ROS_ERROR("Can't call \"cancel_goal\" service");
|
||||
}
|
||||
}
|
||||
else if(cmd == rtabmap::RtabmapEventCmd::kCmdLabel)
|
||||
{
|
||||
rtabmap_ros::SetLabel setLabelSrv;
|
||||
setLabelSrv.request.node_id = cmdEvent->getInt();
|
||||
setLabelSrv.request.node_label = cmdEvent->getStr();
|
||||
if(!ros::service::call("set_label", setLabelSrv))
|
||||
{
|
||||
ROS_ERROR("Can't call \"set_label\" service");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ROS_WARN("Not handled command (%d)...", cmd);
|
||||
|
||||
Reference in New Issue
Block a user