Algorithm Search⌘K

Definitionintro

Euler angles

Also called ZYZ Euler angles, proper Euler angles.

Three angles (alpha, beta, gamma) with R = Rz(alpha) Ry(beta) Rz(gamma): turn about the body z, then the new y, then the new z. Singular at beta = 0 and pi.

Euler angles describe an orientation by three angles of rotation about coordinate axes, applied one after the other. In the ZYZ form used in robotics, the angles (α,β,γ)(\alpha, \beta, \gamma) give the rotation matrix R=Rz(α) Ry(β) Rz(γ)R = R_z(\alpha)\,R_y(\beta)\,R_z(\gamma): turn the body by α\alpha about its zz axis, then by β\beta about its new yy axis, then by γ\gamma about its new zz axis. Every rotation has such angles, and they are unique when 0<β<π0 < \beta < \pi. At β=0\beta = 0 and β=π\beta = \pi the first and the last axes line up, only α+γ\alpha + \gamma or α−γ\alpha - \gamma is fixed, and the chart is singular; this is gimbal lock.

Notation on this page: rotations are active, and RxR_x, RyR_y, RzR_z are the rotations about the fixed axes of the base frame,

Rz(α)=(cos⁡α−sin⁡α0sin⁡αcos⁡α0001),Ry(β)=(cos⁡β0sin⁡β010−sin⁡β0cos⁡β).R_z(\alpha) = \begin{pmatrix} \cos\alpha & -\sin\alpha & 0 \\ \sin\alpha & \cos\alpha & 0 \\ 0 & 0 & 1 \end{pmatrix}, \qquad R_y(\beta) = \begin{pmatrix} \cos\beta & 0 & \sin\beta \\ 0 & 1 & 0 \\ -\sin\beta & 0 & \cos\beta \end{pmatrix}.

Definition

Definition. The ZYZ Euler angles of a rotation RR in the special orthogonal group SO(3) are three angles (α,β,γ)(\alpha, \beta, \gamma) with

R=Rz(α) Ry(β) Rz(γ)=(cαcβcγ−sαsγ−cαcβsγ−sαcγcαsβsαcβcγ+cαsγ−sαcβsγ+cαcγsαsβ−sβcγsβsγcβ),R = R_z(\alpha)\,R_y(\beta)\,R_z(\gamma) = \begin{pmatrix} c_\alpha c_\beta c_\gamma - s_\alpha s_\gamma & -c_\alpha c_\beta s_\gamma - s_\alpha c_\gamma & c_\alpha s_\beta \\ s_\alpha c_\beta c_\gamma + c_\alpha s_\gamma & -s_\alpha c_\beta s_\gamma + c_\alpha c_\gamma & s_\alpha s_\beta \\ -s_\beta c_\gamma & s_\beta s_\gamma & c_\beta \end{pmatrix},

where cα=cos⁡αc_\alpha = \cos\alpha, sα=sin⁡αs_\alpha = \sin\alpha, and so on. The usual ranges are α,γ∈(−π,π]\alpha, \gamma \in (-\pi, \pi] and β∈[0,π]\beta \in [0, \pi].

Two readings of the same product.

  • Moving axes. Rz(α)R_z(\alpha) turns the frame about its zz axis. The next factor, multiplied on the right, turns about the yy axis of the frame that is already turned, and the last factor about the newest zz axis. So the angles are applied in the order α,β,γ\alpha, \beta, \gamma about the body axes z,y′,z′′z, y', z''.
  • Fixed axes. Read from right to left, the product turns a vector by γ\gamma about the fixed zz axis, then by β\beta about the fixed yy axis, then by α\alpha about the fixed zz axis.

Both readings give the same matrix, so a sequence about moving axes always equals the reverse sequence about fixed axes. A statement of Euler angles is complete only when it gives the axis order, says whether the axes are fixed or moving, and says whether the matrix is active or passive.

Inverse. Given R=(rij)R = (r_{ij}), the angles with β∈[0,π]\beta \in [0, \pi] are

β=atan2⁡(r132+r232,  r33),α=atan2⁡(r23,r13),γ=atan2⁡(r32,−r31),\beta = \operatorname{atan2}\Big(\sqrt{r_{13}^2 + r_{23}^2},\; r_{33}\Big), \qquad \alpha = \operatorname{atan2}(r_{23}, r_{13}), \qquad \gamma = \operatorname{atan2}(r_{32}, -r_{31}),

and these are the only angles in the ranges above when 0<β<π0 < \beta < \pi. The second solution (α+π,−β,γ+π)(\alpha + \pi, -\beta, \gamma + \pi), with β\beta negative, gives the same matrix and is excluded by the range of β\beta.

The singular set. If β=0\beta = 0, then R=Rz(α+γ)R = R_z(\alpha + \gamma), and every pair with the same sum gives the same RR. If β=π\beta = \pi, then Ry(π)Rz(γ)=Rz(−γ)Ry(π)R_y(\pi) R_z(\gamma) = R_z(-\gamma) R_y(\pi), so R=Rz(α−γ)Ry(π)R = R_z(\alpha - \gamma) R_y(\pi), and only the difference is fixed. At these orientations the map (α,β,γ)↦R(\alpha, \beta, \gamma) \mapsto R has a derivative of rank 2, not 3, and the inverse formulas above fail because r13=r23=0r_{13} = r_{23} = 0. Code must test for this case and choose one angle, often γ=0\gamma = 0.

Other Euler angles. Any three axes with no two neighbours equal give a chart. The six proper Euler sequences repeat the first axis (ZYZ, ZXZ, XYX, XZX, YXY, YZY); the six Tait-Bryan sequences use three different axes (such as ZYX, the roll-pitch-yaw angles). With fixed or moving axes, this gives 24 conventions. Every one of them is singular somewhere, as Stuelpnagel's theorem shows for every three-parameter chart.

Examples and non-examples

  • A full example. (α,β,γ)=(30°,45°,60°)(\alpha, \beta, \gamma) = (30°, 45°, 60°) gives
    R=(−0.12683−0.780330.612370.926780.126830.35355−0.353550.612370.70711).R = \begin{pmatrix} -0.12683 & -0.78033 & 0.61237 \\ 0.92678 & 0.12683 & 0.35355 \\ -0.35355 & 0.61237 & 0.70711 \end{pmatrix}.
    The inverse formulas give β=atan2⁡(0.612372+0.353552,0.70711)=atan2⁡(0.70711,0.70711)=45°\beta = \operatorname{atan2}(\sqrt{0.61237^2 + 0.35355^2}, 0.70711) = \operatorname{atan2}(0.70711, 0.70711) = 45°, α=atan2⁡(0.35355,0.61237)=30°\alpha = \operatorname{atan2}(0.35355, 0.61237) = 30° and γ=atan2⁡(0.61237,0.35355)=60°\gamma = \operatorname{atan2}(0.61237, 0.35355) = 60°.
  • A cyclic permutation. The rotation (x,y,z)↦(z,x,y)(x, y, z) \mapsto (z, x, y) has the matrix with rows (0,0,1)(0, 0, 1), (1,0,0)(1, 0, 0), (0,1,0)(0, 1, 0). Here r13=1r_{13} = 1, r23=0r_{23} = 0, r33=0r_{33} = 0, r31=0r_{31} = 0 and r32=1r_{32} = 1, so (α,β,γ)=(0,90°,90°)(\alpha, \beta, \gamma) = (0, 90°, 90°), and indeed Ry(90°) Rz(90°)R_y(90°)\,R_z(90°) is this matrix.
  • The same matrix in another convention. The rotation of the first example has the ZYX angles (97.792°,20.705°,40.893°)(97.792°, 20.705°, 40.893°). Angle triples have no meaning without their convention.
  • Non-example: unique angles at β=0\beta = 0. (0.3,0,0.2)(0.3, 0, 0.2) and (0.5,0,0)(0.5, 0, 0) both give Rz(0.5)R_z(0.5). No choice of the range removes this, because the problem is the line-up of the axes, not the period of the angles.
  • Non-example: adding angles. The ZYZ angles of R1R2R_1 R_2 are not the sums of the angles of R1R_1 and R2R_2. Compose the matrices or quaternions and convert after.
  • Non-example: the rates as an angular velocity. (α˙,β˙,γ˙)(\dot\alpha, \dot\beta, \dot\gamma) is not the angular velocity. The two are related by a 3×33 \times 3 matrix that depends on β\beta and is singular where sin⁡β=0\sin\beta = 0; this matrix is part of the analytic Jacobian.
  • Roll-pitch-yaw angles. The Tait-Bryan ZYX sequence, R=Rz(yaw)Ry(pitch)Rx(roll)R = R_z(\text{yaw}) R_y(\text{pitch}) R_x(\text{roll}), singular at a pitch of ±90°\pm 90°.
  • Gimbal lock. The loss of one degree of freedom at the singular set, in a mechanical gimbal and in the chart.
  • Axis-angle representation, unit quaternions and Cayley parameters. Other representations of SO(3). Quaternions have no singular orientation, at the price of a fourth number.
  • Kinematic decoupling. A wrist with three revolute joints whose axes meet in one point realizes a set of Euler angles, so its inverse kinematics is the inverse formula above, and its singularity is the line-up at β=0\beta = 0.

References

  1. Kevin M. Lynch and Frank C. Park, Modern Robotics, Mechanics, Planning, and Control, Cambridge University Press, 2017, Appendix B, Section B.1 (Euler angles, the ZYZ form in equation B.6) and Section B.1.2 (other Euler angle representations)
  2. Bruno Siciliano, Lorenzo Sciavicco, Luigi Villani and Giuseppe Oriolo, Robotics, Modelling, Planning and Control, Springer, 2009, Chapter 2, Section 2.4 (Euler angles) and Section 2.4.1 (ZYZ angles)
  3. Richard M. Murray, Zexiang Li and S. Shankar Sastry, A Mathematical Introduction to Robotic Manipulation, CRC Press, 1994, Chapter 2, Section 2 (rotational motion in R^3, 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/N60E0J/text.yaml