Algorithm Search⌘K

Definitionintro

Axis-angle representation

Also called angle-axis representation, rotation vector.

A rotation given by a unit axis and an angle, or by one vector whose direction is the axis and whose length is the angle.

The axis-angle representation gives a rotation of space by a unit vector ω^\hat\omega, the axis, and an angle θ\theta, the amount of turn about that axis by the right-hand rule. The same data fit in one vector r=θω^r = \theta\hat\omega, the rotation vector, whose direction is the axis and whose length is the angle. By Euler's rotation theorem every rotation has this form, and Rodrigues' formula turns it into a matrix. The rotation vector is also called the exponential coordinates of the rotation, because the matrix is the matrix exponential e[r]e^{[r]}.

Definition

An axis-angle pair is a pair (ω^,θ)(\hat\omega, \theta) with ω^∈R3\hat\omega \in \mathbb{R}^3, ∣ω^∣=1|\hat\omega| = 1, and θ∈R\theta \in \mathbb{R}. It stands for the rotation

R=Rot⁡(ω^,θ)=e[ω^]θ=I+sin⁡θ [ω^]+(1−cos⁡θ)[ω^]2,R = \operatorname{Rot}(\hat\omega, \theta) = e^{[\hat\omega]\theta} = I + \sin\theta\,[\hat\omega] + (1 - \cos\theta)[\hat\omega]^2 ,

where [ω^][\hat\omega] is the skew-symmetric matrix of ω^\hat\omega. The rotation vector is r=θω^∈R3r = \theta\hat\omega \in \mathbb{R}^3, and it stands for R=e[r]R = e^{[r]}. The zero vector stands for II.

The canonical choice. Many pairs give the same RR: (ω^,θ+2πk)(\hat\omega, \theta + 2\pi k) and (−ω^,−θ)(-\hat\omega, -\theta) for every integer kk. The usual choice is θ∈[0,π]\theta \in [0, \pi], so that ∣r∣≤π|r| \le \pi. With this choice:

  • R=IR = I has θ=0\theta = 0 and no defined axis, and r=0r = 0.
  • R≠IR \ne I with tr⁡R≠−1\operatorname{tr} R \ne -1 has exactly one canonical rr, with 0<∣r∣<π0 < |r| < \pi.
  • tr⁡R=−1\operatorname{tr} R = -1 (a half turn) has the two vectors rr and −r-r, with ∣r∣=π|r| = \pi.

So the canonical rotation vectors fill the closed ball of radius π\pi, with each pair of opposite points on its surface standing for one rotation.

From the matrix to the vector. cos⁡θ=(tr⁡R−1)/2\cos\theta = (\operatorname{tr} R - 1)/2, and for 0<θ<π0 < \theta < \pi the axis comes from the skew part, [ω^]=(R−RT)/(2sin⁡θ)[\hat\omega] = (R - R^{\mathsf T})/(2\sin\theta). Near θ=0\theta = 0 and θ=π\theta = \pi these formulas lose precision, and the logarithm map of SO(3) handles both cases.

To a quaternion. The pair gives the unit quaternion q=(cos⁡θ2, sin⁡θ2 ω^)q = (\cos\tfrac\theta2,\ \sin\tfrac\theta2\,\hat\omega) in the scalar-first Hamilton convention, and −q-q gives the same rotation.

Examples and non-examples

The (1, 1, 1) rotation. R=(001100010)R = \begin{pmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{pmatrix} has tr⁡R=0\operatorname{tr} R = 0, so θ=2π/3≈2.0943951\theta = 2\pi/3 \approx 2.0943951. The skew part gives ω^=(1,1,1)/3\hat\omega = (1, 1, 1)/\sqrt3, and r=θω^≈(1.2092,1.2092,1.2092)r = \theta\hat\omega \approx (1.2092, 1.2092, 1.2092). The quaternion is (cos⁡π3,sin⁡π3 ω^)=(0.5,0.5,0.5,0.5)(\cos\tfrac\pi3, \sin\tfrac\pi3\,\hat\omega) = (0.5, 0.5, 0.5, 0.5).

A quarter turn about zz. Rz(π/2)R_z(\pi/2) has r=(0,0,π/2)≈(0,0,1.5708)r = (0, 0, \pi/2) \approx (0, 0, 1.5708) and the quaternion (0.70711,0,0,0.70711)(0.70711, 0, 0, 0.70711).

A half turn about xx. Rx(π)=diag⁡(1,−1,−1)R_x(\pi) = \operatorname{diag}(1, -1, -1) has θ=π\theta = \pi, and both r=(π,0,0)r = (\pi, 0, 0) and r=(−π,0,0)r = (-\pi, 0, 0) are canonical. The skew part is zero, so the axis must come from R+I=diag⁡(2,0,0)R + I = \operatorname{diag}(2, 0, 0), whose nonzero column is along xx. The quaternion is (0,1,0,0)(0, 1, 0, 0), and (0,−1,0,0)(0, -1, 0, 0) is the same rotation.

A vector longer than π\pi. r=(0,0,3π/2)r = (0, 0, 3\pi/2) is a valid rotation vector, but not the canonical one. It is the same rotation as (0,0,−π/2)(0, 0, -\pi/2), which the logarithm returns.

Non-example: adding rotation vectors. Let r1=(π/2,0,0)r_1 = (\pi/2, 0, 0) and r2=(0,π/2,0)r_2 = (0, \pi/2, 0). The product e[r1]e[r2]=Rx(π/2)Ry(π/2)e^{[r_1]}e^{[r_2]} = R_x(\pi/2)R_y(\pi/2) is the (1, 1, 1) rotation above, with r≈(1.2092,1.2092,1.2092)r \approx (1.2092, 1.2092, 1.2092). The product in the other order, Ry(π/2)Rx(π/2)R_y(\pi/2)R_x(\pi/2), has r≈(1.2092,1.2092,−1.2092)r \approx (1.2092, 1.2092, -1.2092). The sum r1+r2=(π/2,π/2,0)r_1 + r_2 = (\pi/2, \pi/2, 0) is a turn by π/2≈2.2214\pi/\sqrt2 \approx 2.2214 about (1,1,0)/2(1, 1, 0)/\sqrt2, which is neither. Rotation vectors add only when they are parallel. For small vectors, the error of the sum is of second order, 12r1×r2\tfrac12 r_1 \times r_2 by the Baker-Campbell-Hausdorff series.

Non-example: an axis that is not a unit vector. The pair ((0,0,2),π/2)((0, 0, 2), \pi/2) is not an axis-angle pair. Read as a rotation vector, (0,0,2)⋅π/2=(0,0,π)(0, 0, 2) \cdot \pi/2 = (0, 0, \pi) is a half turn and not a quarter turn. Code that takes an axis must normalize it or reject it.

Non-example: Euler angles. Euler angles are three numbers too, but they are three turns about fixed or moving coordinate axes, not one turn. The vector (α,β,γ)(\alpha, \beta, \gamma) of Euler angles is not a rotation vector.

  • Rodrigues' rotation formula: the map from the pair to the matrix.
  • Logarithm map of SO(3): the map from the matrix to the canonical rotation vector, with care at θ=0\theta = 0 and θ=π\theta = \pi.
  • Unit quaternion: the half-angle form of the same data, with no singular point.
  • Cayley rotation parameters: the Gibbs vector tan⁡θ2 ω^\tan\tfrac\theta2\,\hat\omega, the same axis with another function of the angle, which is infinite at a half turn.
  • Stuelpnagel theorem: no three numbers describe all rotations without a singular point. For the rotation vector, the canonical choice jumps at ∣r∣=π|r| = \pi, and the map r↦e[r]r \mapsto e^{[r]} is not locally invertible at ∣r∣=2π|r| = 2\pi.
  • Spherical linear interpolation: R(t)=R0 et[r]R(t) = R_0\, e^{t[r]} with rr the rotation vector of R0TR1R_0^{\mathsf T}R_1 turns at a constant rate about a fixed axis.
  • Rotation averaging: the angle ∣r∣|r| of R1TR2R_1^{\mathsf T}R_2 is the geodesic distance between two rotations.
  • Error-state Kalman filter: a small rotation vector is the attitude error state, because near r=0r = 0 the representation has no singular point and e[r]≈I+[r]e^{[r]} \approx I + [r].
  • Screw motion: the same idea for rigid motions, an axis line, an angle and a slide along the line.

References

  1. Kevin M. Lynch and Frank C. Park, Modern Robotics, Mechanics, Planning, and Control, Cambridge University Press, 2017, Chapter 3, Section 3.2.3 (exponential coordinate representation of rotation, the matrix exponential and the matrix logarithm of rotations)
  2. Richard M. Murray, Zexiang Li and S. Shankar Sastry, A Mathematical Introduction to Robotic Manipulation, CRC Press, 1994, Chapter 2, Sections 2.2 and 2.3 (exponential coordinates for rotation and other representations)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/X85DD4/text.yaml