ros / geometry2

A set of ROS packages for keeping track of coordinate transforms.
189 stars 273 forks source link

Bugfix: SetEuler/SetRPY implementations were differing #535

Closed guilyx closed 2 years ago

guilyx commented 2 years ago

Hi there, small bug fix along with a unit test.

SetEuler takes yaw, pitch, roll as parameters in that order, SetRPY takes roll, pitch, yaw in that order. They should produce the same Quaternion when passed the same yaw/pitch/roll in the right respective order, but it doesn't. The explanation is simple: SetEuler and SetRPY don't have the same implementation even though they should (the order changes but the way to calculate the Quaternions stay the same).

In the current implementation, the unit test I added was failing, now it's not.