introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
957 stars 556 forks source link

the 2D /rtabmap/octomap_grid map disappear #209

Open Warsin opened 6 years ago

Warsin commented 6 years ago

the stereo mapping , when the program has found loop closure ,the 2D map whose topic is /rtabmap/octomap_grid in rviz has disappeared

matlabbe commented 6 years ago

Make sure parameter "RGBD/CreateOccupancyGrid" is not set to false (default true for rtabmap_ros). I updated the outdoor stereo demo without setting this parameter to false so that octomap is not cleared on loop closures.

Warsin commented 6 years ago

I'm sorry I didn't respond to you in time, i used this "https://github.com/introlab/rtabmap_ros/blob/master/launch/stereo_mapping.launch " to do stereo mapping ,but not with Bumblebee2 or zed camera . The map disappeared when found loop closure. should i set the parameter "RGBD/CreateOccupancyGrid " to false ?

matlabbe commented 6 years ago

I cannot reproduce the problem with this small example:

$ cd Downloads/stereo_20Hz
$ roslaunch stereo_20Hz.launch rviz:-true rtabmapviz:=false align_with_ground:=true

(then choosing /rtabmap/octomap_grid in rviz). There were some loop closures and the grid was not cleared: rviz_screenshot_2017_12_06-15_07_51

However, I tried live with a hand-held stereo camera and I reproduce the following. Before loop: rviz_screenshot_2017_12_06-15_29_16 After loop: rviz_screenshot_2017_12_06-15_29_42

Some gray cells disappeared after loop closure detection, but obstacles (black cells) are still there. It is because empty cells created by ray tracing are not replaced back after the correction (when GridGlobal/FullUpdate is false), only the ground cells are corrected (which explains why there is still some gray cells in the map). Is it the problem you are seeing? If the whole map is cleared, which version of rtabmap are you using?

Note I just fixed bug where GridGlobal/FullUpdate was always false for OctoMap (making gray cells disappearing like above). Now the results should look like this: Before loop: rviz_screenshot_2017_12_06-16_04_44 After loop: rviz_screenshot_2017_12_06-16_04_55

cheers, Mathieu

Warsin commented 6 years ago

Thank you! yes , that is the problem what i am seeing . i am using the newest version,it seems be 2.8.5. I will try it with what you fixed. Thanks.

i hava another question, why this rtabmap gui does not have enough option this is my gui: screenshot from 2017-12-08 14-31-19 this is others gui: 101

matlabbe commented 6 years ago

This is an old gui and it is the standalone version of rtabmapviz. The same options are in the menu Detection though. For the Play/Stop buttons, they are not in ros version of the ui, as the camera is controlled by an outside node.

Warsin commented 6 years ago

i have solved all my problem. thank you~~