2

Given an object with a rotation matrix, how do you calculate the pitch, yaw, and roll velocities that needs to be applied over time for the object to reach a goal rotation matrix given that:

  • The x-Axis is left, the y-Axis is up, and the z-axis is forward
  • Pitch is rotation about the x-Axis, yaw the y-Axis, and roll the z-Axis
  • The rotation is intrinsic
  • The required velocity is reached instantly
  • The pitch, yaw, and roll velocities all need to be applied at the same time (not one after another)
  • We do not need to worry about center of gravity or translation, just direction
Tyler
  • 23
  • 2
  • Hi Tyler. I'm glad you found the answer useful. I have just fixed a couple of errors: the wrong number equation was referenced and I should have said "The angular speed is naturally $\arcsin\left(\sqrt{h_x^2+h_y^2+h_z^2}\right)$ divided by the time taken", not ".... $\sqrt{h_x^2+h_y^2+h_z^2}$ divided by the time taken". It's fixed now. – Selene Routley Jan 15 '18 at 00:27

2 Answers2

2

With an slight abuse of language, let us think of orientations and rotations as "the same" (see footnote). Essentially you are asking how to move, over a nonzero time, at a constant "velocity" through the Lie group ${\rm SO}(3)$. The answer to that is probably unambigous and clear, but it also may not be the answer you want (I'll discuss this later). In other words, the most obvious Lie theoretic answer is that you seek to move between two orientations $\mathrm{id}$ at $t=0$ and $\gamma = \exp(H)$ at time $t=1$ where $H\in\mathfrak{so}(3)$, so that, given your orientation change $\gamma$, you need to find $H = \log\gamma$ ($H$ is the minimum norm $3\times 3$ matrix that fulfills $\gamma = \exp(H)$) and then your motion is defined by the unique path in $\mathrm{SO}(3)$ defined by the Cauchy problem:

$$\frac{\mathrm{d}}{\mathrm{d}\,t}\gamma(t) = H\,\gamma(t);\quad\gamma(0)=\mathrm{id}\tag{1}$$

There are many ways to calculate $H$:

  1. The most obvious (but somewhat awkward) is to diagonalize $\gamma$ as $\gamma = \zeta\,\Lambda\,\zeta^\dagger = \zeta\,\exp(i\,\Theta)\,\zeta^\dagger$ where $\Theta$ is a real, diagonal matrix (with one zero diagonal term) and $\zeta$ is unitary and complex and then calculate the real-valued, skew-symmetric $H = \zeta\,\Theta\,\zeta^\dagger$ (be careful to choose the minimum norm $\Theta$);
  2. The second and easiest (in that it doesn't involve complex valued eigenvectors and eigenvalues) is to use the $\mathrm{SO}(3)$ Rodrigues series:

$$\exp(H) = \mathrm{id} + \frac{\sin\left\|H\right\|}{\left\|H\right\|}\,H + \frac{1-\cos\left\|H\right\|}{\left\|H\right\|^2}\,H^2\tag{2}$$

for a skew-symmetric $H$ and where:

$$\left\|\left(\begin{array}{ccc}0&-h_z&h_y\\h_z&0&-h_x\\-h_y&h_x&0\end{array}\right)\right\|\stackrel{def}{=}\sqrt{h_x^2+h_y^2+h_z^2}\tag{3}$$

Now we witness that the the skew-symmetric part of the rotation matrix $\exp(H)$ in (2) is:

$$\frac{1}{2}\left(\gamma -\gamma^\dagger\right) = \frac{\sin\left\|H\right\|}{\left\|H\right\|}\,H\tag{4}$$

whence one can work out $H$ from (4) and (3). The rotation angle is then $\left\|H\right\|$ and the rotation axis points along the vector $(h_x,\,h_y,\,h_z)$, where the components $h_j$ are defined by (3). The angular speed is naturally $\arcsin\left(\sqrt{h_x^2+h_y^2+h_z^2}\right)$ divided by the time taken.

Why this Might Not Be The Wished-For Answer

Your mentioning "pitch, yaw and roll" implies that the above may not be the desired answer and that you may wish an answer in terms of fixed axis Euler angles.

The above is probably what you want to know: you can derive from the above what angular impulse you need to impart to a rigid body given its inertia matrix. The above implicitly assumes that your Lie group is labelled by geodesic co-ordinates or Riemann normal co-ordinates, also known, in Lie-theoretic literature as canonical co-ordinates of the first kind. The co-ordinates $h_j$ above are these kind of co-ordinate and indeed label the whole Lie group (this situation holds whenever the $\exp$ map is surjective between the Lie algebra and group, which is always so for a compact group, connected group such as $\mathrm{SO}(N)$; it is not surjective, for example, for $\mathrm{SL}(2,\,\mathbb{R})$ or $\mathrm{SL}(2,\,\mathbb{C})$). The $h_j$ can then be identified as the constant rates of pitch, yaw and roll relative to axes that are attached to the rotating body.

However, if one uses fixed axis Euler angles, they are not this kind of labelling; they are canonical co-ordinates of the second kind. That is, a small enough rotation can be uniquely written:

$$\gamma(t) = \exp(H_x\,\theta_x(t))\,\exp(H_y\,\theta_y(t))\,\exp(H_z\,\theta_z(t))\tag{5}$$

where:

$$H_x=\left(\begin{array}{ccc}0&0&0\\0&0&-1\\0&1&0\end{array}\right);\quad H_y = \left(\begin{array}{ccc}0&0&1\\0&0&0\\-1&0&0\end{array}\right);\quad H_z = \left(\begin{array}{ccc}0&-1&0\\1&0&0\\0&0&0\end{array}\right)\tag{6}$$

The angles $\theta_j$ are the Euler angles, or pitch, yaw and roll, and, although (5) can label the whole group, the co-ordinates are not unique (they suffer gimbal lock) for extreme elements. Now, as the body undergoes constant angular velocity motion defined by (1), the fixed axis Euler angles change in complicated ways. In fact, on differentiating (5) we get:

$$H = \dot{\gamma}(t)\,\gamma^{-1} = H_x \,\dot{\theta_x} + \exp(H_x\,\theta_x(t))\,H_y\,\exp(-H_x\,\theta_x(t))\,\dot{\theta_y} + \exp(H_x\,\theta_x(t))\,\exp(H_y\,\theta_y(t))\,H_z\,\exp(-H_y\,\theta_y(t))\,\exp(-H_x\,\theta_x(t))\,\dot{\theta_z}\tag{7}$$

For small enough rotation angles, the matrices $H_x$, $\exp(H_x\,\theta_x(t))\,H_y\,\exp(-H_x\,\theta_x(t)$ and $\exp(H_x\,\theta_x(t))\,\exp(H_y\,\theta_y(t))\,H_z\,\exp(-H_y\,\theta_y(t))\,\exp(-H_x\,\theta_x(t))$ span ${\rm SO}(3)$ and to the rates $dot{theta}_j$ can be uniquely calculated from (6). The fixed-axis Euler angle rates are not constant with time

Footnote

Your title implies that you understand a subtlety needed to explain this assertion and answer this question full, i.e. that the action of a rotation group on a rigid body's orientation can be thought of as essentially indistinguishable from the orientation itself: that is, the rotation group has a sharply transitive action on the set of orientations; alternatively that the orientations are to the rotation group exactly as an affine space is to a vector space: orientations are like the group without a notion of privileged identity element. This, like the affine space example, is a particularly strengthened and useful notion of Homogeneous Space known as a Torsor or a Principal Homogeneous Space.

0

You can find the rotation axis $\vec{z}$ and angle $\theta$ between the two orientations and use this information to apply $\vec{\omega} = \frac{\theta}{\Delta t} \vec{z}$.

Given two 3×3 rotation matrices $\mathrm{R}_1$ and $\mathrm{R}_2$ the relative rotation matrix is

$$ \mathrm{R} = \mathrm{R}_1^\top \mathrm{R}_2 $$

Then you can use any number of available methods to convert into Euler angles and/or rotation axis-angle.

Finally you apply either the three Euler angles in sequence, or the single axis-angle rotation in one step.

John Alexiou
  • 38,341