Rviz: No transform from [my_new_frame] to frame [map] - adding a tf frame to RealSense
Apologies for lack of images: I'm running this on a computer without screen capture.
I am mounting a RealSense to car, and would like to have a tf defined from the camera to the base of the car. I am also using rtabmap to run SLAM.
I followed the ROS tutorial to do this, and in both rostopic echo /tf
and rqt_tf_tree
I see that my publisher is working correctly. My new frame, [car_tf] is a child of [camera_link] (which is a child of [odom] and then [map])
When I open rviz and add the TF display, I get a status warning - 'No transform from [car_tf] to frame [map]. I figured TF has a tree structure, so the transforms should propagate upward and connect [car_tf] to [map]. Looking at the Tree drop down in the TF display, I notice [car_tf] is nowhere to be found.
On a hunch, I tried to change [car_tf]'s parent to [map]. Everything worked fine. Same with making it's parent [odom].
If your camera is mounted fixed to your car, you don't need to write a transform broadcaster yourself. Either use a urdf to describe the tree or use a
static_transform_publisher
.the thing is the RealSense already describes a tree, i simply wanted to attach my car_tf to that published tree
I'll look into
static_transform_publisher
though, thanks for the heads up!Yes? I'm not sure how that affects your ability to use
static_transform_publisher
for this.It just publishes a transform for you, without you having to write a node for it. It'd do the exact same thing as you're doing now yourself.