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

Rtabmap does not produce 3D map

asked 2019-12-17 08:14:19 -0500

GeorgNo gravatar image

Hello all,

I am having problems with RTABMAP (0.19.3) in ROS Melodic. I am using a stereo camera setup on a simulated car in gazebo.

Here are four images that visualize my problem: link

The first two are before the car moves and the other two after the car moved.

As can be seen only the nearest detected points are used to generate the projected 2D Map and hence the 3D map does so too.
Is there a parameter that specifies the maximum allowable depth?
Here is a link to the launchfiles: link

I also tried it with RGBD data provided by stereo_image_proc but got the same results.

Thank you very much for your help.

edit retag flag offensive close merge delete


Do you have a database to share? (~/.ros/rtabmap.db). In rtabmapviz, is Map column under Preferences->3D Rendering is checked? There are images shown under loop closure detection panel, so mapping seems working, normally a 3D map would be assembled.

matlabbe gravatar image matlabbe  ( 2020-01-07 10:56:26 -0500 )edit

Thank you for your answer. Map is checked under Preferences->3D Rendering. But the problem seems to be that "Maximum depth" is set to "4" on default although I put

<param name="Kp/MaxDepth"                       type="string" value="0"/>
<param name="Vis/MaxDepth"                      type="string" value="0"/>   <!-- 0 Means no limit (inf) -->

in my launchfile. Is the Maximum depth parameter called different?

GeorgNo gravatar image GeorgNo  ( 2020-01-14 08:10:22 -0500 )edit

3D rendering parameters in Preferences are related to rtabmapviz only (they don't affect how data are saved in the database, just how they are rendered), not rtabmap. Kp/MaxDepth and Vis/MaxDepth affect only visual feature extraction, they don't affect how clouds are created in rtabmapviz. It could be easier to debug if you have a rtabmap.db to share.

matlabbe gravatar image matlabbe  ( 2020-01-14 13:39:26 -0500 )edit

Hello. Here is a link to the databse: link . Thank you for your help

GeorgNo gravatar image GeorgNo  ( 2020-01-15 01:27:50 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-01-15 14:22:53 -0500

matlabbe gravatar image

updated 2020-01-20 14:50:22 -0500

Data seem there. Here what I did to show the 3D map:

$ rosrun rtabmap_ros rtabmap _database_path:="~/Downloads/rtabmap.db"
$ rosrun rtabmap_ros rtabmapviz
$ rviz /rtabmap/get_map_data:=/get_map_data

For rtabmapviz, make sure the Map column is checked in Preferences->3D Renderings and maximum depth is 0: image description

Close Preferences and click Download all clouds: image description

For rviz, with MapCloud plugin, make sure Max Depth is 0, then click on Download: image description


edit flag offensive delete link more


Thanks for your help Mathieu,

if I use the MapCloud plugin I now can display the generated map as seen in the last picture of your post.

But if I want to display the 2D (topic: /rtabmap/grid_map) or 3D (topic: /rtabmap/cloud_map) map it still does not work the way I except it to do. Please see this image.

It only generates the map ~4m ahead of the stereo camera.

All the best, Georg

GeorgNo gravatar image GeorgNo  ( 2020-01-20 02:36:26 -0500 )edit

Change parameter Grid/RangeMax (default 5 meters). You may also want to update Grid/CellSize (default 0.05 meters) to like 0.3.

matlabbe gravatar image matlabbe  ( 2020-01-20 14:53:04 -0500 )edit

Question Tools

1 follower


Asked: 2019-12-17 08:14:19 -0500

Seen: 1,496 times

Last updated: Jan 20 '20