Robotics
Quaternion
Definition
A quaternion is a four-component mathematical object consisting of a scalar and a three-component vector. Robotics commonly uses unit quaternions to represent three-dimensional rotations without the coordinate singularities of Euler angles.
Also known as: Quaternions
Updated
Four components describe a rotation
A rotation quaternion has one scalar component and three vector components. Its four values satisfy a unit-length constraint, so they represent three rotational degrees of freedom, not four independent angles.
The SciPy rotation documentation defines the scalar using the cosine of half the rotation angle and the vector using the rotation axis scaled by the sine of half that angle. Opposite-sign unit quaternions represent the same rotation, a property called a double cover.
Check the component convention
Some interfaces place the scalar first, giving w, x, y, z. Others place it last, giving x, y, z, w. SciPy supports both and defaults to scalar last. A four-number array without its ordering and frame convention is therefore ambiguous.
Normalization also matters: an arbitrary four-component quaternion is not automatically a unit rotation quaternion.
Avoiding angle-coordinate singularities
MIT's manipulation notes explain how Euler angles become singular at particular orientations. Unit quaternions avoid that representation problem and can be converted to rotation matrices.
They do not remove a robot's kinematic singularities, which arise from the mechanism's motion capability rather than the chosen orientation coordinates.
Sources
Related terms
Rotation matrix
A rotation matrix represents an orientation or rotation while preserving lengths and angles. In three dimensions it is a 3-by-3 orthonormal matrix with determinant positive one.
Euler angles
Euler angles represent a three-dimensional orientation as an ordered sequence of three rotations about specified axes. Robotics often uses the term broadly to include roll-pitch-yaw conventions, so the exact rotation sequence must be specified.
Pose estimation
Pose estimation determines the position and orientation of an object or robot relative to a reference frame. For a rigid body in three-dimensional space, a full pose has three translational and three rotational degrees of freedom.