Re: Build octomap with rtabmap?

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Build-octomap-with-rtabmap-tp68p70.html

Do you have an example (screenshot) of sparse map?

I added your lines in rgbd_mapping.launch and I can have an octomap shown in RVIZ which represents well the area I scanned.

I did another test with the database from the IROS kinect challenge. There some screenshots (assembled_cloud):



To reproduce the screenshots above, you will need the database "IROS14-kinect-challenge.db" from here.

In multiple terminals, do:
$ roscore
$ rosrun rtabmap_ros rtabmap _Mem/IncrementalMemory:=false _database_path:=IROS14-kinect-challenge.db
$ rosrun rtabmap_ros map_assembler _cloud_voxel_size:=0.05
$ rosrun octomap_server octomap_server_node cloud_in:=assembled_clouds
$ rosrun rviz rviz /rtabmap/get_map:=/get_map

RVIZ:
 * Set fixed frame to /map
 * Add PointCloud2 display (topic /assembled_clouds)
 * Add octomap_rviz_plugins/OccupancyGrid display (topic /octomap_full)

Now call rtabmap "publish_map" service, this will fill the map_assembler's cache (all 3D point clouds) so the whole map can be assembled and published to octomap_server_node:
$ rosservice call /publish_map 1 1 0

This may take some time to generate, but you should see something like in the screenshot above. I don't have a very good GPU, so on my computer showing the octomap is very slow.