Thanks for noticing this bug.
I just updated the rotMatrix2dquat function. Now it deals with 180deg angles, and it implements the efficient method in Funda et al. (1990) such that the method is accurate and efficient even for angles close to 0 or 180 deg.

It is true that in many books, it is indeed a + instead of a - just before the cross product. However, this is because the historical basis for quaternions is a left-handed basis (the famous i, j, k and their relationship).

Here, we use a right-handed basis, that's why the sign is different (thus this is not a mistake). Actually, you can find a proof of the derivation of this expression in the article http://www.frontiersin.org/Behavioral_Neuroscience/10.3389/fnbeh.2013.00007/abstract : at p3 of the paper, we explain the quaternion product and refer to appendix A where we derive the expression from the concepts of geometric algebra.

Actually, using the left-handed basis (and thus the + sign), you have to exchange the dual quaterniopn and its conjugate in the kinematics expression to retrieve the same results.

For details on the example, you can read section 3.2.1 of the article that you can freely download here: http://www.frontiersin.org/Behavioral_Neuroscience/10.3389/fnbeh.2013.00007/abstract
In particular, take a look on equation 18 (p10). Actually we can not simply reverse the conjugates as we like (thus it is quite normal that you obtain a different result): You may want to read sections 2.4 and 2.5 of the same article, for more details about the kinematic transformations.

That's because you need to specify two output arguments. I modified this file such that an error is generated if the wrong number of output arguments is specified: it should be here in a few days (once Matlab will have reviewed it).

Thanks for noticing this bug.
I just updated the rotMatrix2dquat function. Now it deals with 180deg angles, and it implements the efficient method in Funda et al. (1990) such that the method is accurate and efficient even for angles close to 0 or 180 deg.

Thanks for your splendid reply~
I did not get direct answer in your paper and thus got confused.
Surely I've read many geometric algebra books and I know that quaternion is isomorphic to G+3,0,0 and i,j,k is indeed another representation 2-blade bases of this geometric algebra. However,never did I paid attention to handedness of the coordinates.
Though we use the same mathematical tool,we use different mathematical conventions in your bio science and my robotics. I think this is the reason why gap happens.
Thanks again for your reply!

It is true that in many books, it is indeed a + instead of a - just before the cross product. However, this is because the historical basis for quaternions is a left-handed basis (the famous i, j, k and their relationship).

Here, we use a right-handed basis, that's why the sign is different (thus this is not a mistake). Actually, you can find a proof of the derivation of this expression in the article http://www.frontiersin.org/Behavioral_Neuroscience/10.3389/fnbeh.2013.00007/abstract : at p3 of the paper, we explain the quaternion product and refer to appendix A where we derive the expression from the concepts of geometric algebra.

Actually, using the left-handed basis (and thus the + sign), you have to exchange the dual quaterniopn and its conjugate in the kinematics expression to retrieve the same results.

Good toolbox.
Is shortestRotation not handling (anti)parallel vectors for a reason?
If no, then you could add something like
what is done in rotationTo() in src/gl-matrix/quat.js on
https://github.com/toji/gl-matrix

5

26 Mar 2014

Dual quaternion toolbox
This toolbox provides dual quaternion methods, focusing on 3D kinematics for points and lines.

Thanks for noticing this bug.
I just updated the rotMatrix2dquat function. Now it deals with 180deg angles, and it implements the efficient method in Funda et al. (1990) such that the method is accurate and efficient even for angles close to 0 or 180 deg.

Comment only

25 Mar 2014

Dual quaternion toolbox
This toolbox provides dual quaternion methods, focusing on 3D kinematics for points and lines.

Thanks for your splendid reply~
I did not get direct answer in your paper and thus got confused.
Surely I've read many geometric algebra books and I know that quaternion is isomorphic to G+3,0,0 and i,j,k is indeed another representation 2-blade bases of this geometric algebra. However,never did I paid attention to handedness of the coordinates.
Though we use the same mathematical tool,we use different mathematical conventions in your bio science and my robotics. I think this is the reason why gap happens.
Thanks again for your reply!

Comment only

18 Feb 2014

Dual quaternion toolbox
This toolbox provides dual quaternion methods, focusing on 3D kinematics for points and lines.

It is true that in many books, it is indeed a + instead of a - just before the cross product. However, this is because the historical basis for quaternions is a left-handed basis (the famous i, j, k and their relationship).
Here, we use a right-handed basis, that's why the sign is different (thus this is not a mistake). Actually, you can find a proof of the derivation of this expression in the article http://www.frontiersin.org/Behavioral_Neuroscience/10.3389/fnbeh.2013.00007/abstract : at p3 of the paper, we explain the quaternion product and refer to appendix A where we derive the expression from the concepts of geometric algebra.
Actually, using the left-handed basis (and thus the + sign), you have to exchange the dual quaterniopn and its conjugate in the kinematics expression to retrieve the same results.

Comment only