Ask Your Question
0

RTAB-map 2d occupancy grid

asked 2016-03-22 22:24:15 -0500

Jack000 gravatar image

I'm trying to get /rtabmap/grid_map working. I'm using the kinect + fake 2d laserscan method in the tutorial, and there is data being published to /scan

When I rostopic echo /rtabmap/grid_map, nothing is displayed.

I expected that if the subscribe_laserScan argument is on, rtabmap will output a 2d occupancy grid map under /rtabmap/grid_map. Is that incorrect? What other settings could affect grid_map?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-03-23 12:05:21 -0500

matlabbe gravatar image

updated 2016-03-23 13:57:23 -0500

Hi,

If inputs of rtabmap node are correctly connected, you should see a log info printed each second (and the grid_map topic should be published each second, empty or not). If not, it is because there is one of the input topic which is not published. You can know to which topics rtabmap is connected when rtabmap is launched or looking in your launch file, example:

[...]
/rtabmap/rtabmap subscribed to:
   /camera/rgb/image_rect_color,
   /camera/depth_registered/image_raw,
   /camera/rgb/camera_info,
   /odom,
   /scan
[...]

In that case you can verify if they are published like this:

$ rostopic hz /camera/rgb/image_rect_color
$ rostopic hz /camera/depth_registered/image_raw
$ rostopic hz /camera/rgb/camera_info
$ rostopic hz /odom
$ rostopic hz /scan

cheers

edit flag offensive delete link more

Comments

how do I know which topics are necessary for grid_map? I thought only /scan is required for the grid map

Jack000 gravatar image Jack000  ( 2016-03-23 12:41:32 -0500 )edit

rtabmap node requires at least RGB-D images + odom. If you add /scan, then a 2D map can be also created. If you have only a laser scanner, you may better use packages like hector_mapping.

matlabbe gravatar image matlabbe  ( 2016-03-23 14:00:49 -0500 )edit

I have RGB-D images and /scan working, but my expectation was that RGB-D + /scan = grid_map. rtabmap node creates the topic /rtabmap/grid_map but nothing is published to it.

I guess it's a bit confusing because there's no tutorial or demo showing how grid_map works, or even how to enable it.

Jack000 gravatar image Jack000  ( 2016-03-24 01:01:03 -0500 )edit

I'm running this launch file for the kinect2_bridge: https://github.com/introlab/rtabmap_r...

but I don't see any configs that should conflict with generating a 2d map

Jack000 gravatar image Jack000  ( 2016-03-24 01:09:18 -0500 )edit

This launch file doesn't have subscribe_scan argument like rgbd_mapping.launch. The robot mapping with RVIZ demo generates a grid_map.

matlabbe gravatar image matlabbe  ( 2016-03-24 08:54:44 -0500 )edit

Is /rtabmap/mapData published? If not, add the rqt_graph to your question. If yes, can you visualize the scan on RVIZ (to make sure the scan is not empty)?

matlabbe gravatar image matlabbe  ( 2016-03-24 08:57:02 -0500 )edit

ah, did not know about rqt_graph. I had put the kinect bridge and rtabmap stuff in one launch file, which apparently produced some kind of conflict. I've got grid_map working now. thanks for the help

Jack000 gravatar image Jack000  ( 2016-04-01 20:52:48 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-03-22 22:24:15 -0500

Seen: 1,262 times

Last updated: Mar 23 '16