Re: Generating multiple maps with rosbags
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Generating-multiple-maps-with-rosbags-tp1405p1411.html
Hi,
Here some info about how new maps are created:
/reset: delete the whole database (delete all maps) and start a new one
/reset_odom: if you are using rgbd_odometry, that will make odometry restart to 0 (Identity transform). When rtabmap node detects an Identity transform, it triggers a new map.
/trigger_new_map: Trigger a new map. rtabmap will start a new map. The previous maps should disappear, only publishing the latest one. If a loop closure is detected with a previous map, then related point clouds will be republished again (the maps are merged together).
rtabmap triggers a new map automatically when an Identity odometry is detected. In your rosbag, if the odometry is reset between the sessions, rtabmap would create multiple maps automatically. If the odometry is not reset between the sessions, you should do it manually by calling /trigger_new_map service.
Indeed, if you want a single database/session and not one database for multiple sessions, you would have to
1- kill rtabmap, save ~/.ros/rtabmap.db somewhere then restart rtabmap.
2- or call /backup service, copy the backup database (~/.ros/rtabmap.db.back) then call /reset service to flush the previous map.
For rtabmapviz problem, is the basic mapping demo working?
http://wiki.ros.org/rtabmap_ros/Tutorials/HandHeldMappingcheers