0
$\begingroup$

Rosanswers logo

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


Originally posted by ThreeForElvenKings on ROS Answers with karma: 80 on 2020-05-09

Post score: 0


Original comments

Comment by gvdhoorn on 2020-05-09:
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 to frame2, you'll get it relative to frame1).

Comment by ThreeForElvenKings on 2020-05-09:
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.

Comment by gvdhoorn on 2020-05-09:
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.

Comment by ThreeForElvenKings on 2020-05-09:
Hello. I solved the error. There was a problem with my joint state publisher. Apologies

Comment by gvdhoorn on 2020-05-10:
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.

Comment by ThreeForElvenKings on 2020-05-10:
Apologies, I am new to the community. I have done that. Thanks

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi all. I have solved the issue. There was a problem with my joint state publisher. As it turns out, commands to move were not reflected in the joint states, as Gazebo had treated it independently. On loading the controllers properly, I could visualize the movements in Rviz, and was consequently able to get the correct transformations. Cheers!


Originally posted by ThreeForElvenKings with karma: 80 on 2020-05-10

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by jstm on 2023-03-29:
"able to get the correct transformations" how did you do this? I'd like to do the same

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.