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., first \(A\) rotates around the \(Z\) axis, then \(B\) rotates around the \(Y\) axis, and then \(C\) rotates around the \(X\) axis. In this convention, the axes are the intrinsic, body-aligned axes which change during the rotation. Thus, \(A\) is the yaw angle, \(B\) the pitch angle and \(C\) the roll angle. The elements of the rotation matrix can be computed by using
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
The transformation can be applied to a point \(P\) by
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}x & y & z & w\end{array})^T\) with \(||q||=1\). The corresponding rotation matrix and translation vector are defined by
The transformation can be applied to a point \(P\) by
Note
In XYZ+quaternion format, the pose is defined in meters, whereas in the XYZABC format, the pose is defined in millimeters.
Conversion from ABC to quaternion¶
The conversion from the \(ABC\) Euler angles in degrees to a quaternion \(q=(\begin{array}{cccc}x & y & z & w\end{array})^T\) can be done as follows.
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.
Conversion from quaternion to ABC¶
The conversion from a quaternion \(q=(\begin{array}{cccc}x & y & z & w\end{array})^T\) to the \(ABC\) Euler angles in degrees can be done as follows.