ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Pose transformation between links

asked 2020-05-09 02:35:33 -0500

ThreeForElvenKings gravatar image

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

edit retag flag offensive close merge delete

Comments

1

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

gvdhoorn gravatar image gvdhoorn  ( 2020-05-09 03:44:46 -0500 )edit
1

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.

ThreeForElvenKings gravatar image ThreeForElvenKings  ( 2020-05-09 04:10:53 -0500 )edit
1

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.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-09 04:25:07 -0500 )edit
1

Hello. I solved the error. There was a problem with my joint state publisher. Apologies

ThreeForElvenKings gravatar image ThreeForElvenKings  ( 2020-05-09 23:43:14 -0500 )edit
1

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.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-10 03:45:49 -0500 )edit
1

Apologies, I am new to the community. I have done that. Thanks

ThreeForElvenKings gravatar image ThreeForElvenKings  ( 2020-05-10 04:50:53 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-05-10 04:49:13 -0500

ThreeForElvenKings gravatar image

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!

edit flag offensive delete link more

Comments

"able to get the correct transformations" how did you do this? I'd like to do the same

jstm gravatar image jstm  ( 2023-03-29 11:14:55 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-05-09 02:35:33 -0500

Seen: 947 times

Last updated: May 10 '20