4

I know that the common way for applying 3d rotation is Roll, then Pitch, then Yaw.

And I know that the order doesn't really matter as long as you chose an order and stick to it.

But it seems reversed of the intuitive way, If I would've asked you to explain where your face is facing or at which direction you point a camera at, you would probably start with Yaw (the side you look at), then Pitch (how high\low you look) and then Roll (how to rotate it).

Any explanation why it is the common order used?

user972014
  • 3,296
  • 6
  • 49
  • 89
  • 1
    Because, by considering the angles in this specific order, the total rotation matrix can be constructed from those around the X, Y, Z axes, which are much simpler than the general one. (Roll - X, Pitch - Y, Yaw - Z). – meowgoesthedog Jun 22 '18 at 18:40
  • "Any explanation why this is the common order used"... I might be mistaken, but my guess is that this is probably a biased observation from the set of libraries you have used. In a lot of code rotations are just applied using the exponential from the tangent space of `SO(3)` to obtain matrices or quaternions and therefore the order you speak of isn't taken into account at all. – Ash Jun 23 '18 at 13:41

1 Answers1

5

First, I would like to state that there is no common way of doing rotation. There are just too many ways and each serves its purpose. I would even argue that Euler angles are a bad choice for the majority of cases.

Anyway, your question is probably related to the meaning of applying a rotation. This can be done in several ways. E.g., we could use a rotation matrix and compose it of the individual principal rotations. If we have column vectors, this would be:

R = Yaw * Pitch * Roll

We can interpret this from left to right and we will see that this is exactly what you would interpret it (start to look left/right, then up/down, finally tilt your head). The important thing is that this will also transform the coordinate system, in which we apply subsequent rotations.

If we use this matrix R to transform a point P, then we would calculate P' = R * P. This is:

P' = Yaw * Pitch * Roll * P

We could calculate this also from right to left by introducing parentheses:

P' = Yaw * Pitch * (Roll * P)

So, we could start by applying Roll to P: P_Roll = Roll * P

P' = Yaw * (Pitch * P_Roll)

, then pitch and finally yaw. In this interpretation, however, we would always use the global coordinate system.

So it is all just a matter of perspective.

Nico Schertler
  • 32,049
  • 4
  • 39
  • 70
  • So, the order of roll pitch yaw angle's applying is not matter, you mean? – dasmehdix Jul 08 '20 at 13:08
  • @dasmehdix That depends on what aspect you focus on. You are free to define any order (in this respect, it does not matter). But different orders usually produce different results with the same angles (in this respect, it does matter). – Nico Schertler Jul 08 '20 at 15:54
  • Thanks. Translation is commutative, rotation is not, as i learned:) – dasmehdix Jul 10 '20 at 06:58