robot-control-stack
robot-control-stack copied to clipboard
Fix discrepancy of quaternion coefficent order
- 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]
*/
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 .
left over is taken by #270