ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Trouble exporting map from RTAB-Map

asked 2019-02-25 22:47:51 -0500

Drkstr gravatar image

I am following this answer to export a .pgm and a .yaml from a database file generated using RTAB-map.

But when I run

rosrun rtabmap_ros rtabmap _database_path:=IROS14-kinect-challenge.db

I get a message saying that /rtabmap did not receive any data since 5 seconds. I know there is no data being published into /odom, /rgb/image, /depth/image,/rgb/camera_info

but shouldn't this data be coming from the database file?

When I run

rosrun map_server map_saver map:=proj_map

I get this message:

[ INFO] [1551154609.903198676]: Waiting for the map


rosservice call /publish_map 1 1 0

doesn't do anything.

  • I am running ROS melodic on Linux Mint(Ubuntu 18.04).
  • I have downloaded the IROS14-kinect-challenge.db file from here
  • I have double checked that roscore is running. :D
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-27 16:08:46 -0500

matlabbe gravatar image

I am on ROS Kinetic, but rtabmap is the same version than on Melodic and I cannot reproduce the problem. Following exactly what you did, after doing rosservice call /publish_map 1 1 0, I see in the rtabmap_ros terminal:

[ INFO] [1551304861.803715934]: rtabmap: Publishing map...
[ WARN] [1551304862.123340986]: Many occupancy grids should be loaded (~698), this may take a while to update the map(s)...
[ WARN] [1551304872.284061124]: Map(s) updated! (10.160718 s)
[ WARN] [1551304872.284428237]: /proj_map topic is deprecated! Subscribe to /grid_map topic instead.

so the map is created, then on map_server terminal, I can see:

$ rosrun map_server map_saver map:=proj_map
[ INFO] [1551304856.764290592]: Waiting for the map
[ INFO] [1551304872.285442346]: Received a 551 X 447 map @ 0.050 m/pix
[ INFO] [1551304872.285460183]: Writing map occupancy data to map.pgm
[ INFO] [1551304872.289321822]: Writing map occupancy data to map.yaml
[ INFO] [1551304872.289390615]: Done

The map created: image description

The warnings that it did not receive any data since 5 seconds are normal, as no sensors are publishing topics to rtabmap.

edit flag offensive delete link more


Ah, looks like I just needed to wait a bit :D Thanks for your response.

Drkstr gravatar image Drkstr  ( 2019-02-27 19:13:18 -0500 )edit

Question Tools

1 follower


Asked: 2019-02-25 22:47:51 -0500

Seen: 1,180 times

Last updated: Feb 27 '19