robot-control-stack icon indicating copy to clipboard operation
robot-control-stack copied to clipboard

Fix discrepancy of quaternion coefficent order

Open juelg opened this issue 1 year ago • 2 comments

  • we use the eigen quaternion constructor to create a pose which has order wxyz
  • we use the .coef function to read out the values which is in order xyzw

From the eigen docs

  /** Constructs and initializes the quaternion \f$ w+xi+yj+zk \f$ from
    * its four coefficients \a w, \a x, \a y and \a z.
    *
    * \warning Note the order of the arguments: the real \a w coefficient first,
    * while internally the coefficients are stored in the following order:
    * [\c x, \c y, \c z, \c w]
    */

juelg avatar Dec 07 '24 16:12 juelg

This issue has already been partly addressed. The quaternion order in RCS currently is xyzw.

However, it would be good to use the mujoco format, which is wxyz, which would avoid problems when reading from or converting to mujoco. This is also an important thing to mention on the documentation page @khaledmohamed00 .

juelg avatar Jul 10 '25 06:07 juelg

left over is taken by #270

juelg avatar Apr 10 '26 08:04 juelg