Is there an unambiguous composable representation of gimbal orientation?

112 Views Asked by At

There are multiple ways to represent orientation:

  • A rotation matrix,
  • A quaternion,
  • A triple of angles (Euler or Tait-Bryan).

Of these, the latter option has two possible representations for each orientation (I'm ignoring the gimbal lock cases here): e.g. for pitch-roll-yaw angle sequence, where we denote pitch with $p$, roll with $r$ and yaw with $y$, we have the equivalence:

$$(p,r,y)\equiv(p+\pi,\pi-r,y+\pi).\tag1$$

These two configurations, although representing the same orientation, can be distinct when applied to a real-life gimbal. E.g. one of the configurations may correspond to a camera suspended in the gimbal looking at the gimbal's armature, while the other would move the armature out of the camera's field of view.

While a matrix or a quaternion representations can be easily composed as successive rotations—by multiplication or conjugation respectively—the triple of angles representation is not as easily composable. One normally has to convert it to a matrix or quaternion form for this.

But if we convert the triple of angles to a matrix or a quaternion, we lose the additional degree of freedom: the binary choice between the two possible configurations of the gimbal. I.e. after we convert our triples of angles to e.g. matrices and multiply these matrices, we have to get a triple of angles back—and we can't recover the unique angles, since the problem simply has two solutions (again, ignoring gimbal lock).

I suppose the problem of unambiguous definition of the unique triple of angles of a composition of two rotations might be ill-defined in general. So I'll clarify what I think is the definition I'd like to use. Let there be two triples of pitch,roll,yaw: $(p_1,r_1,y_1)$ and $(p_2,r_2,y_2)$. The correct composite rotation of these, where the second triple gets applied to the initial object, and the first one rotates the whole system, is the composite $(2)$ where we can get the from the configuration with $\alpha=0$ to the one with $\alpha=1$ by a continuous change of the resulting angles with the change in $\alpha$.

$$(p_{\text{result}},r_{\text{result}},y_{\text{result}})=(p_1,r_1,y_1)*(\alpha p_2,\alpha r_2,\alpha y_2). \tag2$$

Question: is there any representation of rotations that would let me compose two rotations initially given as triples of angles, "automatically" preserving the continuity of resulting angles as described above?