Rviz doesn't show the correct tf2 tree
I'm trying to setup rtabmap algorithm for a project I'm working on. I currently have rgb camera, depth camera, tf, tf_static and robot_description recorded in a ros2 bag file (At rate 0.5, in case it matters). I'm launching rtabmap_odom and rtabmap_slam nodes in a custom launch file. This makes the odom and map tf transforms, and connects them to base_link, which is the parent of all other transforms. Recorded with: "ros2 run tf2_tools view_frames --ros-args -r __ns:=/turtle_1 -r /tf:=tf -r /tf_static:=tf_static":
Note: However, if I record tf2 frames without remapping "/tf" to "tf", I get the same graph, without map and odom on it. Why is that?
For some reason, these transforms are not seen in Rviz2. When setting the fixed frame to "map", the rtabmap point cloud is being broadcasted, but there are a lot of errors in the "tf" tab:
And, if we check the "Tree", only map and odom are seen.
If I set the fixed frame from map to base_link in Rviz, there is no point cloud visible and no odom/map transform.
EDIT: If I set the fixed frame to "odom" there is a transform from odom to base_link (Still no point cloud map though). But why can't it then be found from map?
Thanks for your help!