rtabmap_ros icon indicating copy to clipboard operation
rtabmap_ros copied to clipboard

Running RTAB-Map on Recorded Data (ROS 2, MCAP Bags)

Open GilMe opened this issue 9 months ago • 1 comments

Hi, thank you for the hard work on RTAB-Map!

I am using ROS 2 and working with recorded data stored in an MCAP bag file. The dataset includes LiDAR, IMU, camera data, and odometry. I have several odometry topics available and I want to run RTAB-Map multiple times, each time using a different odometry topic.

I understand that I can replay the bag files (even at higher speeds) and process them with RTAB-Map to generate maps. However, I was wondering if there is a way to run RTAB-Map without having to play the bag files.

Would it be possible to directly process the recorded topics in an offline batch mode? If so, what would be the best workflow? Can I use RTAB-Map standalone to accomplish this? I can export the data from MCAP to other formats if required.

Any guidance would be greatly appreciated!

Thanks in advance.

GilMe avatar Mar 04 '25 10:03 GilMe

To process with the standalone, all data must be already synchronized and sharing the same stamps. For example, to feed odometry file with camera data (sequence of images in a folder), the odometry poses should share exactly the same stamp than the image file names.

If you export data in same format than one of the dataset format we support, you could use the same tool: https://github.com/introlab/rtabmap/tree/master/tools/RgbdDataset https://github.com/introlab/rtabmap/tree/master/tools/KittiDataset https://github.com/introlab/rtabmap/tree/master/tools/EurocDataset

otherwise it could be possible to create your own tool inspired by those.

To feed lidar, camera, imu and odom data at the same time, using the rtabmap node directly with the rosbag may be the easiest way.

matlabbe avatar Mar 16 '25 01:03 matlabbe