Ask Your Question
1

tf2 listener transform has child_frame_id as the source and frame_id as the target

asked 2019-08-12 23:05:48 -0500

cgauss gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-08-13 03:14:38 -0500

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.

edit flag offensive delete link more

Comments

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.

cgauss gravatar imagecgauss ( 2019-08-13 19:14:09 -0500 )edit

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.

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2019-08-14 06:06:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-08-12 23:05:48 -0500

Seen: 14 times

Last updated: Aug 13