Hi everyone,
I’m encountering an issue with RTAB-Map and ROS2 Bag files, and I hope someone can help me:
Live Camera Setup
When I use RTAB-Map with a live camera, all TF transformations work perfectly. NAV2 also functions without any problems, and everything is running smoothly.
Problem with ROS2 Bag Files
However, when I record a ROS2 Bag file (ros2 bag record) and later use it for RTAB-Map (ros2 bag play), I encounter TF issues. For example, the TF tree in RViz shows errors. Strangely, RTAB-Map still runs normally, generates the map, and appears to work, but NAV2 refuses to function due to these TF issues.
SLAM Toolbox Works Fine
Using the same ROS2 Bag file and the same odometry algorithm with SLAM Toolbox works perfectly, which adds to my confusion.
TF Tree Seems Correct
When I check the TF tree using tools like tf2_tools or tf_monitor, it appears to be correctly structured. Still, the errors persist. I've attached an image for reference (see attachment).
My Questions
How can I properly record a ROS2 Bag file so that it works without TF issues in RTAB-Map?
Are there any specific parameters or best practices I should follow when recording or playing back ROS2 Bags, especially for RTAB-Map?
Why might SLAM Toolbox work fine with the same Bag file, but RTAB-Map struggles?
If possible, could someone test the provided ROS Bag and check if they observe any TF-related error messages in the TF section of RViz? Additionally, if anyone could attempt to debug the issue or identify a potential fix, it would be incredibly helpful.
ROS-BAG:
https://drive.google.com/file/d/1BQAxkD3iKE98WSCGJPNZdq4SXUEqOLcN/view?usp=sharingThanks in advance for your help!
Best regards