robotology-legacy / mex-wholebodymodel

Matlab MEX interface to the iWholeBodyModel interface.
11 stars 9 forks source link

bug in rotm2quat.m #92

Closed ronb127 closed 6 years ago

ronb127 commented 6 years ago

Line 35: quat(1,1) = (rotm(3,2) + rotm(2,3))s_inv; Should be: quat(1,1) = (rotm(3,2) - rotm(2,3))s_inv;

traversaro commented 6 years ago

Thanks for reaching out @ronb127 ! cc @Ganimed

Ganimed commented 6 years ago

Thank you, I will check this!

Ganimed commented 6 years ago

I have checked the formulas. Mainly I have used the formulas from the book of [Jaz10] and in equation (3.150) at page 110 there is the same sign-error.

Here for example is the correct calculation of this part: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/.

Thank you for the hint I have corrected this in my branch.

[Jaz10]: Jazar, Reza N.: Theory of Applied Robotics: Kinematics, Dynamics, and Control. 2nd Edition, Springer, 2010, p. 110, eq. (3.149)-(3.152).

@traversaro: I need the owner-rights that I can merge it to the master, thank's.