What exactly does it mean to "send a transformation from the child to the parent frame"?
First of all, I would like to say that I have some background in computer graphics (e.g., I know what homogenous transformations, etc., are). So, please, do not explain to me what matrix multiplications are.
I have a question regarding the sendTransform
method of the class TransformBroadcaster.
The documentation says:
Broadcast the transformation from tf frame child to parent on ROS topic "/tf".
So, e.g., suppose we subscribe to the topic /turtle1/pose
and, in the callback, we use sendTransform
, for example
def _send_pose_transform(self, pose):
br = tf.TransformBroadcaster()
translation = (pose.x, pose.y, 0)
rotation = tf.transformations.quaternion_from_euler(0, 0, pose.theta)
br.sendTransform(translation, rotation, rospy.Time.now(),
self.turtle_name, self.parent_frame)
I have at least two questions.
The last two arguments of sendTransform
are the child and parent frames. Can either the child or the parent frames be different than the frame of the object associated with the topic I subscribed to (i.e. /turtle1/pose
), i.e. can the child or the parent frames be a frame which is not the local frame of turtle1
? I suppose the answer is "yes", given that I don't see why this use case should be "forbidden".
Now, my actual questions/doubts.
What exactly does it mean to send a transformation from the child to the parent frame, in this case? Let's now assume that tf
keeps track of the local frames of the child and the parent objects. Does "send a transformation from the child to the parent frame" actually mean that tf
sends e.g. a homogenous matrix representing the transformation (i.e. rotation and orientation) of a point in the local frame of the child to a point in the local frame of the parent, or is it vice-versa, or something else?