Re: How can I record data in ROS for rtabmap?

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/How-can-I-record-data-in-ROS-for-rtabmap-tp74p75.html

Which video?

Note that the resulting database generated on your robot during the mapping session can be replayed directly at the rate of loop closure detection. This is what I've done to reproduce the IROS video after the actual mapping of the robot and taking the resulting "rtabmap.db" as input:
You can open RTAB-Map (standalone, not the ros-pkg) using the configuration file above, then set "Source from database" and select the database above. Set Source rate to 2 Hz and press start, this should reproduce the video above. 

If you want to record at the rate of odometry (like for the Multi-session experiment), you can either record a rosbag or record a rtabmap database. You can take a look at these launch files: az3_bag_record.launch and az3_db_record.launch (the second uses data_recorder node), for rosbag and rtabmap database respectively. To replay them, respectively, look here for the rosbag example and here for the rtabmap example.

Mathieu