ros / geometry2

A set of ROS packages for keeping track of coordinate transforms.
190 stars 275 forks source link

child_frame_id of geometry_msgs::TransformStamped& t_out is not set in doTransform() #481

Open sayali-purdue opened 4 years ago

sayali-purdue commented 4 years ago

The following function on line 938 in tf2_geometry_msgs.h outputs frame transform t_out by applying transform on input transform t_in. void doTransform(const geometry_msgs::TransformStamped& t_in, geometry_msgs::TransformStamped& t_out, const geometry_msgs::TransformStamped& transform)

The output represents the transform, and therefore, by definition it should indicate both frame_id and child_frame_id of the transform. However, the function only sets the frame_id equal to transform.header.frame_id. I think, it should also set its child_frame_id equal to t_in.child_frame_id.

Can you please confirm if my above understanding is reasonable? If not, I would really appreciate if you could explain why child_frame_id is not required.

Thank you!