Conceptintro
Gimbal lock
Also called Euler angle singularity.
The loss of one rotational degree of freedom when two axes of a three-angle chart or a three-ring gimbal line up, where the map to SO(3) is singular.
Gimbal lock is the loss of one rotational degree of freedom that happens when two of the three rotation axes of a three-angle description line up. In a mechanical gimbal, three nested rings turn about three axes, and when the middle ring turns by the inner and the outer axes become parallel, so the platform can no longer turn about the third direction. In Euler angles and roll-pitch-yaw angles, the same line-up makes the map from the three angles to the rotation matrix singular: two angles turn about one line, only their sum or difference is fixed, and small changes of the orientation need large changes of the angles. It is not a fault of a particular convention: by Stuelpnagel's theorem every chart of rotations by three numbers has such a point.
In plain words
Think of a camera on three motors: one turns it left and right, one tips it up and down, and one rolls it. Point the camera straight up. Now the left-and-right motor and the roll motor turn the camera about the same line, so they do the same job. One direction of turning is lost, and to turn the camera that way the motors must first move far away from this pose. Three angles that describe an orientation behave in the same way. Near the bad pose, a very small turn of the object can need a very large change of two angles. A program that steps the angles, smooths them, or compares them, sees jumps there. The fix is to store the orientation in a form with no bad pose, such as a quaternion, and to turn it into angles only for display.
The idea
Three axes that move with the angles. For ZYZ Euler angles, . A rate of each angle turns the body about one axis, so the angular velocity in the fixed frame is
The three columns are the three gimbal axes. The determinant of this matrix is . At or , the first and the third columns are both , the matrix has rank 2, and no rates of the angles give an angular velocity along .
The roll-pitch-yaw case. For the axes are , and , and the determinant is . The lock is at a pitch of , where the roll axis turns into the yaw axis.
What it does to computations.
- The inverse map. At the lock, the formulas for the angles read atan2(0, 0), and every pair of angles with the right sum or difference is a solution. Close to the lock, the solution exists but moves fast.
- The rates. Solving the matrix equation above for the rates divides by (or ). For a constant angular velocity the rates grow without bound as the path comes near the lock, and an integrator of the angles loses accuracy or fails.
- Interpolation and filters. A straight line between two angle triples is not a uniform turn, and near the lock it can swing far. A Kalman filter on the angles uses a linearization that is wrong near the lock.
It is a property of the chart, not of the rotation. The orientation at the lock is an ordinary rotation. A different axis order puts the lock somewhere else, and a unit quaternion, a rotation matrix or a local chart around the current estimate has no lock at that orientation. Stuelpnagel's theorem shows that some lock is unavoidable with three numbers, so the cures all use either more numbers or a chart that moves with the body.
Examples
- The rates near the lock. With roll-pitch-yaw angles, a zero roll and a body that turns about its own axis at rad/s, the yaw rate is . At a pitch of it is rad/s, and at it is rad/s.
- A small turn, a large change of angles. At a pitch of , with zero roll and yaw, a further turn of about the fixed axis gives the angles yaw , pitch and roll . Two angles jump by for a turn of .
- The lost solution. In ZYZ Euler angles, and give the same matrix . The chart cannot tell them apart, so the inverse map must pick one.
- A robot wrist. A spherical wrist with joint axes , , realizes ZYZ Euler angles. With the middle joint at zero, the first and the last axes are collinear, the arm loses one direction of turning, and the geometric Jacobian drops rank. This is a kinematic singularity of the robot, not only of a chart.
- The cure by quaternions. The quaternion kinematic equation is linear in with bounded coefficients, so the attitude passes through a pitch of with no special case.
Where it is used
- Attitude estimation. Attitude filters such as the error-state Kalman filter keep a quaternion or a matrix as the state and a small three-vector error around it. The error stays near zero, far from the lock of any chart, and the filter never sees the singular set.
- Robot arms. The analytic Jacobian uses the rates of Euler or roll-pitch-yaw angles and inherits the lock of the chart, even at poses where the robot is not singular. The geometric Jacobian uses the angular velocity and avoids it. A wrist designed with kinematic decoupling has a real gimbal lock that motion planning must avoid.
- Trajectory generation. Interpolation of orientations in angle space is simple but bends the path near the lock. Spherical linear interpolation of quaternions gives a uniform turn about a fixed axis.
- User interfaces. Angles are easy to read, so systems often store quaternions and show roll, pitch and yaw. The display jumps near the lock, but the state does not.
References
- 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 family of solutions at beta = plus or minus 90 degrees in the ZYX form)
- Bruno Siciliano, Lorenzo Sciavicco, Luigi Villani and Giuseppe Oriolo, Robotics, Modelling, Planning and Control, Springer, 2009, Chapter 2, Sections 2.4.1 and 2.4.2 (the singular cases of the ZYZ and RPY angles)
- John Stuelpnagel, On the parametrization of the three-dimensional rotation group, SIAM Review 6(4), 422-430, 1964, Section 3 (no three-dimensional parametrization is global and nonsingular) and Section 6 (the singularity of roll, pitch and yaw)
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.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag CTV575 Edit this page History Report an error Markdown