0
$\begingroup$

Rosanswers logo

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


Originally posted by ryanoldja on ROS Answers with karma: 60 on 2017-06-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by tfoote with karma: 58457 on 2017-06-10

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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