Pose formats

XYZABC format

The XYZABC format is used to express a pose by 6 values. \(XYZ\) is the position in millimeters. \(ABC\) are Euler angles in degrees. The convention used for Euler angles is ZYX, i.e., \(A\) rotates around the \(Z\) axis, \(B\) rotates around the \(Y\) axis, and \(C\) rotates around the \(X\) axis. The elements of the rotation matrix can be computed by using

\[\begin{split}r_{11} & = \cos{B}\cos{A}, \\ r_{12} & = \sin{C}\sin{B}\cos{A}-\cos{C}\sin{A}, \\ r_{13} & = \cos{C}\sin{B}\cos{A}+\sin{C}\sin{A}, \\ r_{21} & = \cos{B}\sin{A}, \\ r_{22} & = \sin{C}\sin{B}\sin{A}+\cos{C}\cos{A}, \\ r_{23} & = \cos{C}\sin{B}\sin{A}-\sin{C}\cos{A}, \\ r_{31} & = -\sin{B}, \\ r_{32} & = \sin{C}\cos{B}, \text{and} \\ r_{33} & = \cos{C}\cos{B}. \\\end{split}\]

Note

The trigonometric functions \(\sin\) and \(\cos\) are assumed to accept values in degrees. The argument needs to be multiplied by the factor \(\frac{\pi}{180}\) if they expect their values in radians.

Using these values, the rotation matrix \(R\) and translation vector \(T\) are defined as

\[\begin{split}R = \left(\begin{array}{ccc} r_{11} & r_{12} & r_{13} \\ r_{21} & r_{22} & r_{23} \\ r_{31} & r_{32} & r_{33} \end{array}\right), \qquad T = \left(\begin{array}{c} X \\ Y \\ Z \end{array}\right).\end{split}\]

The transformation can be applied to a point \(P\) by

\[P' = R P + T.\]

XYZ+quaternion format

The XYZ+quaternion format is used to express a pose by a position and a unit quaternion. \(XYZ\) is the position in meters. The quaternion is a vector of length 1 that defines a rotation by four values, i.e., \(q=(\begin{array}{cccc}a & b & c & w\end{array})^T\) with \(||q||=1\). The corresponding rotation matrix and translation vector are defined by

\[\begin{split}R = 2 \left(\begin{array}{ccc} \frac{1}{2} - b^2 - c^2 & a b - c w & a c + b w \\ a b + c w & \frac{1}{2} - a^2 - c^2 & b c - a w \\ a c - b w & b c + a w & \frac{1}{2} - a^2 - b^2 \end{array}\right), \qquad T = \left(\begin{array}{c} X \\ Y \\ Z \end{array}\right).\end{split}\]

The transformation can be applied to a point \(P\) by

\[P' = R P + T.\]

Note

In XYZ+quaternion format, the pose is defined in meters, whereas in the XYZABC format, the pose is defined in millimeters.