Skip to main content
This section borrows heavily from chapter 3, Rigid-Body Motions, of Kevin Lynch and Frank Park, Modern Robotics: Mechanics, Planning, and Control (Cambridge University Press, 2017). You can download the chapter as a PDF. This section extends planar motion representations to three dimensions. The frame conventions carry over unchanged: {s}\{s\} is a fixed frame, and {b}\{b\} is the stationary frame that coincides with the body at each instant, so every frame is inertial. Three things change when you leave the plane. Orientation needs three numbers instead of one. Rotations no longer commute, so the order in which you apply them matters. Angular velocity becomes a vector whose direction is the instantaneous axis of rotation. Robotics uses several motion representations for different modeling needs. These include rotation matrices, axis-angle representations, quaternions, Euler angles, exponential matrices and other conventions. The choice of representation depends on the application, vendor, and software tools. Aeronautics and self-driving cars may use different conventions because of the robots involved or the history of each field.
Robot vendors may also define their own conventions, as in this explanation of robot orientation. Software tools may use other conventions, so system integration may require conversion between representations. See for example how Warp and PhysX represent spatial velocities / twists. Warp orders a spatial vector as (angular, linear), while PhysX reports the linear velocity of the center of mass and the angular velocity, both in the world frame. The Newton twist conventions compare these and other engines side by side.
Rigid-body motion in three-dimensional space requires an understanding of both position and orientation. A point in space is described by three coordinates, but a rigid body has six degrees of freedom: three for position and three for orientation.

Rotations and Angular Velocities in 3D

We now consider the general three-dimensional case shown below. All coordinate systems are right-handed. The unit axes follow the right-hand rule and satisfy x^×y^=z^\hat x \times \hat y = \hat z. 3D transformation Right hand rule Let p\mathbf{p} denote the vector from the fixed-frame origin to the body-frame origin. In terms of the fixed-frame coordinates, p\mathbf{p} can be expressed as: p=p1 x^s+p2 y^s+p3 z^s(3.12)\mathbf{p} = p_1 \, \hat{\mathbf{x}}_s + p_2 \, \hat{\mathbf{y}}_s + p_3 \, \hat{\mathbf{z}}_s \tag{3.12} The axes of the body frame can also be expressed in the fixed frame as: x^b=r11x^s+r21y^s+r31z^s\hat{\mathbf{x}}_b = r_{11} \hat{\mathbf{x}}_s + r_{21} \hat{\mathbf{y}}_s + r_{31} \hat{\mathbf{z}}_s y^b=r12x^s+r22y^s+r32z^s\hat{\mathbf{y}}_b = r_{12} \hat{\mathbf{x}}_s + r_{22} \hat{\mathbf{y}}_s + r_{32} \hat{\mathbf{z}}_s z^b=r13x^s+r23y^s+r33z^s\hat{\mathbf{z}}_b = r_{13} \hat{\mathbf{x}}_s + r_{23} \hat{\mathbf{y}}_s + r_{33} \hat{\mathbf{z}}_s We now define the position vector p∈R3\mathbf{p} \in \mathbb{R}^3 and the rotation matrix R∈R3×3R \in \mathbb{R}^{3 \times 3} as follows: p=[p1p2p3](3.13)\mathbf{p} = \begin{bmatrix} p_1 \\\\ p_2 \\\\ p_3 \end{bmatrix} \tag{3.13} R=[r11r12r13r21r22r23r31r32r33]=[x^by^bz^b](3.14–3.16)R = \begin{bmatrix} r_{11} & r_{12} & r_{13} \\\\ r_{21} & r_{22} & r_{23} \\\\ r_{31} & r_{32} & r_{33} \end{bmatrix} = \left[ \hat{\mathbf{x}}_b \quad \hat{\mathbf{y}}_b \quad \hat{\mathbf{z}}_b \right] \tag{3.14–3.16} The 12 parameters given by the pair (R,p)(R, \mathbf{p}) provide a complete description of the position and orientation of the rigid body relative to the fixed frame. The special orthogonal group SO(3)SO(3), also known as the group of rotation matrices, is the set of all 3×33 \times 3 real matrices RR that satisfy the following properties: RTR=Ianddet⁡R=1R^T R = I \quad \text{and} \quad \det R = 1 Rotation matrices satisfy R−1=RTR^{-1} = R^T. Their product is also a rotation matrix (R1R2∈SO(3)R_1 R_2 \in SO(3)), and they preserve vector lengths (∥Rv∥=∥v∥\|Rv\| = \|v\|). They represent orientation, change coordinates, and rotate vectors. SO(3) is a curved three-dimensional space. The possible velocities at any point of SO(3) form a flat three-dimensional vector space called the tangent space.

Angular Velocities

Suppose a frame with unit axes x^,y^,z^{\hat{x}, \hat{y}, \hat{z}} is attached to a rotating body. Consider the time derivatives of these unit axes. The length of x^\hat{x} is fixed, so only its direction can change with time. The same holds for y^\hat{y} and z^\hat{z}. Between times tt and t+Δtt + \Delta t, a rotation through an angle Δθ\Delta \theta about a unit axis ω^\hat{\mathbf \omega} through the origin describes the change in orientation. The axis w^\hat{w} is independent of coordinates and has not yet been represented in a reference frame. In the limit as Δt\Delta t approaches zero, the ratio Δθ/Δt\Delta \theta / \Delta t becomes the rate of rotation θ˙\dot{\theta}, and w^\hat{w} can similarly be regarded as the instantaneous axis of rotation. Angular velocity and the \dot{\hat{x}} vector  - perpendicular to the plane spanned by \omega and \hat x. As shown above, ω^\hat{\mathbf \omega} and θ˙\dot{\theta} define the angular velocity ω\mathbf{\omega}: ω=ω^ θ˙\mathbf{\omega} = \hat{\mathbf \omega} \, \dot{\theta} Let R(t)R(t) be the rotation matrix that describes the orientation of the body frame relative to the fixed frame at time tt. Its time derivative is R˙(t)\dot{R}(t). The first column of R(t)R(t), denoted r1(t)\mathbf{r}_1(t), gives x^\hat{x} in fixed-frame coordinates. The columns r2(t)\mathbf{r}_2(t) and r3(t)\mathbf{r}_3(t) give y^\hat{y} and z^\hat{z} in fixed-frame coordinates. Therefore, r˙i=ωs×ri\dot r_i = \mathbf \omega_s \times r_i where i=1,2,3i=1,2,3. It follows that R˙=ωs×R \dot R = \mathbf \omega_s \times R We can replace the cross product with matrix multiplication. Write ωs×R\boldsymbol{\omega}_s \times R as [ωs]R[\boldsymbol{\omega}_s] R, where [ωs][\boldsymbol{\omega}_s] is the 3×33 \times 3 skew-symmetric matrix representation of ωs∈R3\boldsymbol{\omega}_s \in \mathbb{R}^3.
Given a vector x=[x1 x2 x3]T∈R3\mathbf{x} = [x_1\ x_2\ x_3]^T \in \mathbb{R}^3, define[x]=[0−x3x2x30−x1−x2x10][\mathbf{x}] = \begin{bmatrix} 0 & -x_3 & x_2 \\ x_3 & 0 & -x_1 \\ -x_2 & x_1 & 0 \end{bmatrix}The matrix [x][\mathbf{x}] is a 3×33 \times 3 skew-symmetric matrix representation of x\mathbf{x}; that is, [x]=−[x]T[\mathbf{x}] = -[\mathbf{x}]^T.The set of all 3×33 \times 3 real skew-symmetric matrices is called so(3)\mathfrak{so}(3).
Page 78 of Lynch and Park derives the angular velocity from rotation matrices. Given R(t)R(t), the spatial angular velocity is [ωs]=RR˙T[\omega_s] = R \dot{R}^T and the body angular velocity is [ωb]=RTR˙[\omega_b] = R^T \dot{R}. The skew-symmetric matrix [ω][\omega] satisfies [ω]T=−[ω]T[\omega]^T = -[\omega]^T. The fixed-frame angular velocity ωs\boldsymbol{\omega}_s does not depend on the choice of body frame. Similarly, the body-frame angular velocity ωb\boldsymbol{\omega}_b does not depend on the choice of fixed frame. The equations may appear to depend on both frames because RR and R˙\dot{R} each depend on {s}\{s\} and {b}\{b\}. However, the product R˙R−1\dot{R} R^{-1} is independent of {b}\{b\}, and the product R−1R˙R^{-1} \dot{R} is independent of {s}\{s\}.

Exponential Coordinate Representation of Rotations

Rodrigues’ formula provides a way to compute rotation matrices: R=I+sin⁡θ[ω]+(1−cos⁡θ)[ω]2R = I + \sin\theta [\omega] + (1 - \cos\theta)[\omega]^2 This formula defines the exponential coordinates of rotation. Any rotation can be expressed as: R=e[ω]θR = e^{[\omega]\theta} The logarithm of a rotation inverts the matrix exponential for rotation angles 0≤θ<π0 \le \theta < \pi. Rotations by θ\theta and θ+2π\theta + 2\pi are the same matrix, so no single inverse covers every angle. A rotation by exactly π\pi needs separate treatment: the axes ω^\hat{\omega} and −ω^-\hat{\omega} give the same rotation, so its logarithm has two solutions and a sign convention must pick one. For θ=0\theta = 0 the logarithm is the zero matrix. If 0<θ<π0 < \theta < \pi, then: [ω]=12sin⁡θ(R−RT)[\omega] = \frac{1}{2 \sin \theta}(R - R^T)

Rigid-Body Motions in SE(3)

Rigid-body motions in three-dimensional space are described using homogeneous transformation matrices: T=[Rp01]∈SE(3)T = \begin{bmatrix} R & \mathbf{p} \\ 0 & 1 \end{bmatrix} \in SE(3) This matrix encodes both rotation and translation. It acts on homogeneous coordinates. A point (x,1)(\mathbf{x}, 1) is rotated and then translated. A free vector (v,0)(\mathbf{v}, 0) is only rotated, because its zero cancels p\mathbf{p}. One matrix therefore handles both kinds of object without a special case. The inverse of a homogeneous transformation matrix is given by: T−1=[RT−RTp01]T^{-1} = \begin{bmatrix} R^T & -R^T \mathbf{p} \\ 0 & 1 \end{bmatrix} Transformations compose by matrix multiplication: Tac=TabTbcT_{ac} = T_{ab} T_{bc} Homogeneous Transform

Twists (Spatial Velocities)

A twist is a six-dimensional vector that combines angular and linear velocity: V=[ωv]∈R6V = \begin{bmatrix} \omega \\ v \end{bmatrix} \in \mathbb{R}^6 The matrix representation of a twist is: [V]=[[ω]v00]∈se(3)[V] = \begin{bmatrix} [\omega] & v \\ 0 & 0 \end{bmatrix} \in \mathfrak{se}(3) se(3)\mathfrak{se}(3) is the Lie algebra of SE(3)SE(3), defined in SO(2) as a manifold. Body and spatial twists are defined as follows: [Vb]=T−1T˙[V_b] = T^{-1} \dot{T} and [Vs]=T˙T−1[V_s] = \dot{T} T^{-1}. The adjoint operator is given by: AdT=[R0[p]RR],Vs=AdTVb\text{Ad}_T = \begin{bmatrix} R & 0 \\ [\mathbf{p}]R & R \end{bmatrix}, \quad V_s = \text{Ad}_T V_b Twist as Velocity Vector

Exponential Coordinates for Rigid Motions

Exponential coordinates provide a compact description of rigid motions. Let S=(ω,v)∈R6S = (\omega, v) \in \mathbb{R}^6 be a screw axis. The transformation is: e[S]θ=[e[ω]θG(θ)v01]e^{[S]\theta} = \begin{bmatrix} e^{[\omega]\theta} & G(\theta)v \\ 0 & 1 \end{bmatrix} where G(θ)=Iθ+(1−cos⁡θ)[ω]+(θ−sin⁡θ)[ω]2G(\theta) = I\theta + (1 - \cos\theta)[\omega] + (\theta - \sin\theta)[\omega]^2 Given a transformation T=(R,p)T = (R, \mathbf{p}), the matrix logarithm is used as follows: log⁡R→[ω]θ\log R \rightarrow [\omega]\theta v=G(θ)−1pv = G(\theta)^{-1} \mathbf{p} Thus, [S]θ=log⁡T[S]\theta = \log T.

Wrenches (Spatial Forces)

A wrench is a six-dimensional vector that combines force and torque: F=[τf]F = \begin{bmatrix} \tau \\ f \end{bmatrix} Here, ff is the force and τ=r×f\tau = r \times f is the torque (moment). Coordinate transformations for wrenches are given by: Fb=AdTTFaF_b = \text{Ad}_T^T F_a Wrench as Force-Torque

Summary of rotation and motion representations

Other representations

This section borrows heavily from the book Introduction to Autonomous Robots.

Euler Angles

Three values are sufficient to describe orientation. Orthogonality and unit vector length impose six constraints on the nine entries of a rotation matrix. An orientation can therefore be represented by rotations through specified angles about the xx, yy, and zz axes of the reference coordinate system. This representation is called X-Y-Z fixed-angle notation. Its rotation matrix has the form: BsRXYZ(γ,β,α)=[cos⁡α−sin⁡α0sin⁡αcos⁡α0001][cos⁡β0sin⁡β010−sin⁡β0cos⁡β][1000cos⁡γ−sin⁡γ0sin⁡γcos⁡γ]^s_BR_{XYZ}(\gamma,\beta,\alpha)=\begin{bmatrix}\cos\alpha & -\sin\alpha & 0\\ \sin\alpha & \cos\alpha & 0\\0 & 0 & 1\end{bmatrix}\begin{bmatrix}\cos\beta& 0 & \sin\beta\\0 & 1 & 0\\-\sin\beta & 0 & \cos\beta\end{bmatrix}\begin{bmatrix}1 & 0 & 0 \\ 0 & \cos\gamma & -\sin\gamma\\0 & \sin\gamma & \cos\gamma\end{bmatrix} X-Y-Z fixed angles express a coordinate frame using rotations relative to the original frame {A}\{A\}. Another description starts with a frame {B}\{B\} that coincides with {A}\{A\}. It then rotates about the Z-axis by α\alpha, the Y-axis by β\beta, and the X-axis by γ\gamma. This representation is called Z-Y-X Euler angles. The coordinate axes need not all be different, so there are twelve valid sequences of rotations: XYX, XZX, YXY, YZY, ZXZ, ZYZ, XYZ, XZY, YZX, YXZ, ZXY, and ZYX. Consecutive rotations about the same axis are excluded because they are equivalent to one rotation through the sum of the two angles. No single convention is correct for every application. Hardware and software manufacturers use different conventions, often based on the fields for which their products were developed, such as aviation or geology. These representations have singularities at certain angle values. At such a value, a sequence can be equivalent to consecutive rotations about the same axis. For example, this occurs for the XYZ rotation matrix when the angle about the Y-axis is 90°. Other representations avoid these singularities over the full range of possible motions.

Quaternions

Quaternions are often preferred for computational efficiency and numerical stability. A quaternion is a 4-tuple that extends the complex numbers. It has many applications in mathematics, including the representation of orientation and rotation. A quaternion has the form q=a+bi+cj+dkq=a+b\mathbf{i}+c\mathbf{j}+d\mathbf{k} Here, aa is the scalar part of the quaternion. The elements bb, cc, and dd form the vector part. The conjugate of a quaternion is q∗=a−bi−cj−dkq^*=a-b\mathbf{i}-c\mathbf{j}-d\mathbf{k} Each rotation can be represented by an angle and a single axis in space, called the Euler axis. Given an axis K^=[kxkykz]T\hat{K}=[k_x k_y k_z]^T and an angle θ\theta, the Euler parameters, or unit quaternion, q=(ϵ1,ϵ2,ϵ3,ϵ4)\mathbf{q}=(\epsilon_1,\epsilon_2,\epsilon_3,\epsilon_4) are ϵ1=cos⁡θ2ϵ2=kxsin⁡θ2ϵ3=kysin⁡θ2ϵ4=kzsin⁡θ2\begin{aligned} \epsilon_1&=\cos \frac{\theta}{2}\\ \epsilon_2&=k_x \sin \frac{\theta}{2}\\ \epsilon_3&=k_y \sin \frac{\theta}{2}\\ \epsilon_4&=k_z \sin\frac{\theta}{2} \end{aligned} These four quantities are constrained by the relationship ϵ12+ϵ22+ϵ32+ϵ42=1\epsilon_1^2+\epsilon_2^2+\epsilon_3^2+\epsilon_4^2=1 This constraint places the quaternion on a unit hypersphere. Given a vector p∈R3\mathbf{p} \in \mathbb{R}^3 and a unit quaternion q\mathbf{q}, the rotated vector p′\mathbf{p'} is p′=qpq∗\mathbf{p'}=\mathbf{q}\mathbf{p}\mathbf{q^*} where q∗\mathbf{q^*} is the conjugate of q\mathbf{q}. The product of two quaternions gives the rotation equivalent to two successive rotations. For quaternions ϵ\epsilon and ϵ′\epsilon', the product is defined by the following matrix multiplication: [ϵ4ϵ1ϵ2ϵ3−ϵ1ϵ4−ϵ3ϵ2−ϵ2ϵ3ϵ4−ϵ1−ϵ3−ϵ2ϵ1ϵ4][ϵ4′ϵ1′ϵ2′ϵ3′]\left[\begin{array}{cccc} \epsilon_4 & \epsilon_1 & \epsilon_2 & \epsilon_3\\ -\epsilon_1 & \epsilon_4 & -\epsilon_3 & \epsilon_2\\ -\epsilon_2 & \epsilon_3 & \epsilon_4 & -\epsilon_1\\ -\epsilon_3 & -\epsilon_2 & \epsilon_1 & \epsilon_4 \end{array}\right] \left[\begin{array}{c}\epsilon_4'\\\epsilon_1'\\\epsilon_2'\\\epsilon_3'\end{array}\right] Multiplying two rotation matrices requires 27 multiplications and 18 additions. Multiplying two quaternions requires 16 multiplications and 12 additions. Quaternions also avoid singularities at specific joint angles. These singularities can have significant effects on physical robots.

References

Lynch and Park, Modern Robotics: Mechanics, Planning, and Control (2017) http://modernrobotics.org