0
$\begingroup$

Rosanswers logo

When using tfBuffer/tfListener to get a transform, is there a good reason that the source ends up as the child frame id and the target as the frame id? See for example this documentation from Jade (although I am seeing the same thing in melodic. When publishing transforms, in, for example, the tf tutorial, the convention seems to be the opposite.


Originally posted by cgauss on ROS Answers with karma: 21 on 2019-08-12

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Parent/Child frame relationship and Source/Target frame relationship are different concepts and would not be expected to be ordered the same way all the time.

The Parent/Child relationship is concerned with how a frame is defined. The child frame is defined in terms of the parent frame, so that any changes to the parent or the chain of its parents will effect the location of the child frame (as well as all of its children).

The Source/Target relationship is concerned with looking up the transformation between any two connected frames. In this case the lookup is converting some geometry that is originally defined in the source frame so that it becomes defined in the target frame. These lookups can be between parent/child or child/parent or two different branches, anything as long as the TF frames are connected somehow.

Hope this helps.


Originally posted by PeteBlackerThe3rd with karma: 9529 on 2019-08-13

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by cgauss on 2019-08-13:
Thanks for your response. However, I am still confused as the parent/child of the transform switches when changing the source/target in the tfBuffer lookup call. Thus, it seems it can go either way despite the "tree" (as seen in rosrun tf view_frames) not changing.

Comment by PeteBlackerThe3rd on 2019-08-14:
I see your confusion, the Transform returned when you lookup a TF uses the parent and child frames to represent the source and target frames. Those frames are not referring to the parent/child of the original tree. In fact they could even be child/child in the original tree. So we would not expect the parent/child of a looked up transform to match the original TF tree.

$\endgroup$

Your Answer

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