kindr icon indicating copy to clipboard operation
kindr copied to clipboard

inverseRotate() appears miss an overload for Euler-types

Open markusgft opened this issue 7 years ago • 1 comments

Hi all, I just stumbled across a bug. Here's a minimal description:

when calling inverseRotate() on Euler types, I observe the following.

Minimal example: kindr::EulerAnglesXyz<SCALAR> euler1; euler1.setRandom();

kindr::EulerAnglesXyz<SCALAR> euler2; euler2.setRandom();

kindr::EulerAnglesXyz<SCALAR> euler3 = euler1.inverseRotate(euler2);

Desired behaviour:

  • inverse rotate should implement euler1.inverted() * euler2;

Current behaviour:

  • it simply returns euler3 = euler2;

I am not too much familiar with the details of the kindr implementation, but probably inverseRotate() does not get overloaded correctly. Alternatively, inverseRotate() should probably throw a compiler error, if called on wrong types.

markusgft avatar Jan 21 '18 13:01 markusgft

Hi Markus,

the method inverseRotate() should only transform a 3D-Vector. It does not invert the rotation. It should have thrown a compiler error.

gehrinch avatar Jan 22 '18 15:01 gehrinch