How to label nodes and send goals from rtabmap interface?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to label nodes and send goals from rtabmap interface?

Pi Robot
Hello,

Sorry if this is documented somewhere but I can't find it.  I am trying to figure out how to label nodes on the map graph and then send goals using the rtabmap interface.  I can already send goals in RViz but I wanted to try it in rtabmap.  So first I run:

$ rtabmap

Then I open my existing database at ~/.ros/rtabmap.db, place rtabmap in Localization mode, and "Download all clouds" from the Edit menu.  The 3D map appears OK.

I then select the Graph View and do a "Download graph only" from the Edit menu.  The 2D map and graph appear.  When I zoom in on the map and mouse over a node, a popup indicates the node ID (say 161 for example) and coordinates.  However, if I then try to send this node ID as a goal using the Detection->Send Goal menu item, I always get the error popup as follows:

Setting goal failed!
Setting goal to location 161 failed. Some reasons:
1) the location doesn't exist in the graph,
2) the location is not linked to the global graph or
3) the location is too near of the current location (goal already reached).

And in the console window I see the error "Failed to compute a path to goal 161.

I'm sure I'm missing a bunch of steps.  Can someone help?

Thanks!
patrick



Reply | Threaded
Open this post in threaded view
|

Re: How to label nodes and send goals from rtabmap interface?

matlabbe
Administrator
This post was updated on .
Hi Patrick,

The robot should be localized in the map before we can send a goal. On start, the robot doesn't know where it is (unless it can localize on the first image received), so it may need to explore a little to get localized. For the questions in the title of the post, see the following sections.

How to label nodes?

  • "/rtabmap/set_label" service: when you know the ID of the node you want to label, you can use this service.
  • rtabmapviz: Menu "Detection -> Label current location...": label the last node added to the map (mapping mode)

How to send goals based on label or node ID?

  • "/rtabmap/set_goal" service: set either the node ID or label you want to set as goal.
  • rtabmapviz: Menu "Detection->Send goal...": you can set an ID or a label.

To send a goal based on a pose, you can do that in RVIZ with "2D Nav Goal" action (send goal on /rtabmap/goal topic). See this recent post or the rtabmap's Turtlebot tutorial for examples. Using this approach, you can only send pose near the local map.

How to see the node IDs?

  • rtabmapviz: Open the Graph view (Menu "Window->Show view->Graph view"). The graph should appear if rtabmap is already running, otherwise, you can do "Edit->Download graph only". You can move the mouse over the nodes to see their ID (format "Node ID [Map ID] Pose").
  • rviz: rtabmap publishes the node IDs/labels with "/rtabmap/labels" topic. This topic is a visualization_msgs/MarkerArray message, select the corresponding type in RVIZ.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: How to label nodes and send goals from rtabmap interface?

Pi Robot
Hi Mathieu,

This is great--many thanks!

--patrick