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

tf2 reversing coordinate frame tree

asked 2017-06-10 12:23:23 -0500

ryanoldja gravatar image

The tf2 documentation suggests that the implementation somewhat breaks down in cases where coordinate frames require re-parenting. Is there a reasonable solution for completely reversing the child-parent tree?

A simple example: a serial manipulator has 3 joints, 'joint1', 'joint2', 'joint3', and the tf2 tree is configured to reflect this (joint1 --> joint2 --> joint3). At any point, I'd like to reverse the configuration such that the 'joint3' frame is now effectively treated as the 'joint1' frame (i.e. joint3 --> joint2 --> joint1).

A thought: Would a potential solution be to modify the frame_id for each joint? For instance, before reversing, the frame_ids 'joint1', 'joint2', and 'joint3' would correspond to the physical joint1, joint2, and joint3, respectively. Then, could I simply overwrite the frame_ids linked to the physical joints such that the physical joint1 is represented by frame_id 'joint3', etc. ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-10 14:32:14 -0500

tfoote gravatar image

To easily reverse the chain, simply publish the inverse transforms with the frame_ids reversed parent for child.

(T1->2) = inverse(T2->1)

That will result in j1->j2-j3 being represented as j3->j2->j1 in the tree.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-06-10 12:09:08 -0500

Seen: 292 times

Last updated: Jun 10 '17