Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The results of the inverse transform after rosrun tf tf_echo base_footprint utm are actually correct. When you invert a transform, the translation component isn't simply negated. Rather, the translation component of an inverse transform is:

t2 = -transpose(R) * t1

where R is the rotation matrix describing the orientation difference between frame 1 and 2, t1 is the translation component of the forward transform, and t2 is the translation component of the inverse transform.

If your quaternion were [0 0 0 1], then you would see a simple negation in the translation. However, because of the nonzero quaternion, the translation vector gets rotated as well as negated. The reason for this is because after the inverse transform, the translation vector is relative to a different reference frame that has a different orientation.

Also, the reason you are getting different results for the Euler angle test is because you are inputting a roll angle instead of a yaw angle. The sequence of the Euler angle arguments to the static_transform_publisher is yaw, pitch, roll.