RViz unable to find transform to map and odom frame
I am using RTABMAP_ROS and RGBD odometry to perform slam with my robot. I publish static transforms for my other odometry source (camera2_odom_frame) to the appropriate links on the robot so as to have a fully connected tf tree. But Rviz (sometimes intermittently but mostly always) throws an error that the transform from my alternate odometry frame (camera2_odom_frame) to the map frame / odom (provided by RTABMAP/RGBD odometry) frame does not exist.
It works fine if the fixed frame is the alternate odometry source (given by camera2_odom_frame)
tf tree: https://1drv.ms/b/s!AvWKdnsrMsHRjdRB2... (Cannot upload the file as I have 1 point!)
Note that you should not publish static transforms from your odom frame, it should be rgbd_odometry that publishes it. Can you add your tf tree to the question?
@matlabbe I have added my tf tree. The problem occurs when I try to visualise my alternate odometry source which is in the camera2_odom_frame in RViz with map as the fixed frame.
@acidsage I would suggest you go over rep-105, to get understanding of how frames are supposed to be. And maybe explain your problem, what you are trying to achieve. Because having odom in middle of your tf-tree doesn't really make sense.
@Choco93 Can I ask why having odometry in the middle of the tree doesn't make sense? I am having this problem where my robot's tf tree branches out from the
base_link
, with acamera
attached to it. Now, I would like to publish the odometry of thecamera
relative to theworld
because I estimate the odometry of thecamera
, and not thebase_link
. But for some reason, Rviz doesn't show my frame as expected.As I shared the rep-105, it explains how the structure should be because that's how ROS architecture works. And it should not be somewhere in the middle because a child-link cannot have two parent-links, so if you want to make a map frame, you cannot do that. And since you have transform available from camera-base_link you can just use that transform and transform your odometry and make it parent of base_link.