Pose transformation between links
I have a robot with 8 links. How do I get the pose transformation between the links? (I have a camera plugin, and I wish to get the pose of one of the links of the camera, which isnt exposed)
I have gone through tf2 transformations, however, they provide the transformation between frames and not links. For instance, when I move a link in the Gazebo simulator, I can see that the pose of the link changes in RVIZ, however, when I use the command
rosrun tf tf_echo frame1 frame2
Where frame2 is the link that is moving. (I am using robot_state_publisher for this). It gives a constant value. I suspect that, even though the links are moving, the frames seem to be constant. This can be verified, when I set my fixed frame to frame2, there seems to be no relative movement.
What is the relationship between links and frame? How do I get the relative pose of two links using tf
Frames are links, links are frames.
If the transform you retrieve remains constant, it probably is (transforms tell you the translation + rotation body-relative (so if you ask for the transform from
frame1
toframe2
, you'll get it relative toframe1
).Hello. I can however, see that my link position values are changing. i.e. when I view my link states in rviz, I can see that link2 (which as you say is the same as frame2) is constantly changing while link1 (world) is constant. Yet the transformation command I give always gives a constant value. I reckon that my frames are being static, despite links moving.
It would help if you could show both a screenshot of
rqt_graph
and a copy-paste of whatever urdf/xacro or other sources of TF you are using.Otherwise we'll just end up guessing.
Hello. I solved the error. There was a problem with my joint state publisher. Apologies
Please post the solution you found as an answer here. Instead of closing the question, we will then mark your answer as the answer, which will signal much more clearly that your issue was actually resolved.
Apologies, I am new to the community. I have done that. Thanks