Closed danielwangksu closed 4 years ago
I've also run into this issue. It has led to a lot of confusion on our end since it returns the inverse of the expected transform.
@tfoote do you know if this is expected behavior for tf_echo or should the order be swapped to match the functions?
If it is expected behavior that should probably be documented and made more clear.
The transform from A to B is the inverse of the transform from B to A. To get the inverse directly you just change the order of the arguments.
If you're printing the transform of Frames A to B it's the inverse of the transform to move data from A to B. Thus when you're echoing the transforms for the frames A to B you have to switch the source and target frames which are specifically referring to moving data from source to target.
The echo command print the transform for the coordinate frames not for the data so they're inverse and thus reversed.
Not sure if this is a potential issue, the order of variable is reverse to the definition. This could be confusing
https://github.com/ros/geometry/blob/ea5eb79f479223d2b95f0a5e051554fbaceca7ff/tf/src/tf_echo.cpp#L112
https://github.com/ros/geometry/blob/ea5eb79f479223d2b95f0a5e051554fbaceca7ff/tf/include/tf/tf.h#L206
https://github.com/ros/geometry/blob/ea5eb79f479223d2b95f0a5e051554fbaceca7ff/tf/src/tf_echo.cpp#L122
https://github.com/ros/geometry/blob/ea5eb79f479223d2b95f0a5e051554fbaceca7ff/tf/include/tf/tf.h#L242