RViz unable to find transform to map and odom frame

asked 2019-09-24 05:33:14 -0500

acidsage gravatar image

updated 2022-04-17 11:04:22 -0500

lucasw gravatar image

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!)

edit retag flag offensive close merge delete

Comments

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 gravatar image matlabbe  ( 2019-09-24 17:36:10 -0500 )edit

@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 gravatar image acidsage  ( 2019-09-25 01:30:12 -0500 )edit

@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 gravatar image Choco93  ( 2019-09-25 02:43:52 -0500 )edit

@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 a camera attached to it. Now, I would like to publish the odometry of the camera relative to the world because I estimate the odometry of the camera, and not the base_link. But for some reason, Rviz doesn't show my frame as expected.

ignite gravatar image ignite  ( 2019-12-07 13:35:40 -0500 )edit

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.

Choco93 gravatar image Choco93  ( 2019-12-09 02:13:51 -0500 )edit