0
$\begingroup$

Often in literature and tutorials the concept of a "Frame" is used. In TF2 a frame requires both a parent and a child name.

So when someone refers to "frame" are they referring to the name of the parent or the name of the child?

$\endgroup$

2 Answers 2

1
$\begingroup$

I think the answer is best presented with a simple example. A robotic arm is a chain of frames (within transforms) from the base to the end effector. Each frame is defined relative to its parent. For example:

[ Base frame (parent) -> Link_1 frame (child) ] First transform

[ Link_1 frame (parent) -> Link-2 frame (child) ] Next Transform

[ Link_2 frame (parent) -> End_effector frame (child) ] Last transform

When referring to a frame in this system, we usually mean the child frame. For example, when referring to the end_effector frame, we are talking about the frame which is the child frame in the transform from the last link of the robot to the end effector.

$\endgroup$
2
  • $\begingroup$ This makes sense to me, what do you do if a package is asking for a transform to be published, giving a name to the frame but fails to name the paren $\endgroup$ Jan 20 at 1:50
  • $\begingroup$ Are you preparing a transform to be published with TF2? If yes, I will assume you are publishing a TransformStamped t;. We can set the parent with t.header.frame_id = "parent_name" and set the frame name (the child we are adding) with t.child_frame_id = "child_name". If my assumption does not match what you do, please give more details about your need and I will be happy to help. $\endgroup$
    – Robotawi
    Jan 20 at 2:27
1
$\begingroup$

The name frame is short for coordinate frame. In any system there are many relevant coordinate frames.

A transform is a representation of what it takes to move data represented in one frame to the other. (Note that this is the inverse of what it takes to move a frame to the other frame. )

So transforms represent the relationship between two frames, using a tree such that you have parent and child to be able to traverse the tree between any two frames and compute the net transform. So transforms have parents and child ends but frames do not.

With that net transform you can transform data from a representation in the source frame to a representation in the target frame.

$\endgroup$
4
  • $\begingroup$ So if something asks for the name of a frame do they mean the final frame? $\endgroup$ Jan 20 at 8:06
  • $\begingroup$ What do you mean by 'final' frame. Frames exist and have names, transforms are effectively encoding the relationship between two specific frames. $\endgroup$
    – Tully
    Jan 20 at 19:01
  • $\begingroup$ If it a package asks for a frame name as an input, whereby it means a a name of a TF2 transform. $\endgroup$ Jan 20 at 20:50
  • $\begingroup$ Transforms don't have names, they connect two named frames. Transforms are how data can be converted from one frame to the other. Data is observed in one frame, usually a sensor frame, but is much more useful in a different frame, such as the vehicle frame. TF2 will compute the transform to move the data between those two frames. And there are helper functions to apply the transform to many data types. The argument as an input is selecting a frame into which to convert data. It's not naming a transform. $\endgroup$
    – Tully
    Jan 21 at 20:21

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.