I am trying to understand exactly what is happening when Gimbal lock occurs. I have read many explanations now which provide the high-level idea, in that Gimbal lock occurs when two axes are aligned during the sequence of three rotations. But I am struggling to understand what this really means in terms of the calculations that are going on.

Here's my understanding of the setup. We have an initial 3D rotation of a body, and a target 3D rotation of that body, and we want to move the body from the initial to the target rotation. To do this, we calculate the Euler angles representing this rotation. (I don't know the maths behind this, but I will assume that this is just an algorithm that takes in an initial and target rotation, and returns a third rotation).

So, we now have a rotation expressed as Euler angles, which we want the body to move over. And now I will explain my confusion. From what I have been reading, there are two ideas:

  1. Gimbal lock occurs when two of the axes become aligned, during the sequence of three rotations, which means that there is one axis about which rotation cannot occur.
  2. Due to Gimbal lock, the path which the rotation occurs over will not be "straight", and there will be a curve.

This to me is very confusing. 1) is saying that Gimbal lock means that we cannot rotate the body along a certain axis. 2) is saying that Gimbal lock means that we can rotate the body, but that the path will not be "straight".

Please can somebody explain which one is correct, and help me to overcome this confusion? Thanks!


First of all, don't use Euler angles. That's a real nasty thing.

I don't understand 2 without the context but 1 means the following.

If the following is your rotation matrix,

Rotation Matrix = Rotx(x)*Roty(y)*Rotz(z),

Gimbalock means two different rotation matrices R1 and R2 could be the same.

R1 = Rotx(x+10deg)*Rotz(y)*Rotx(z)

R2 = Rotx(x)*Rotz(y+10deg)*Rotx(z)

The following shows a visualization of this problem. https://en.wikipedia.org/wiki/File:Gimbal_Lock_Plane.gif

Obviously, either you change x or y the result is the same and once it happens your control system will go bad.

You don't even need to understand this. Just stay away from Euler angles and use rotation vector representation.

  • 1
    $\begingroup$ Or quaternion coordinates. $\endgroup$
    – Vorac
    Oct 30 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.