.
Figure 3.8: Any three-dimensional rotation can be described as a sequence of yaw, pitch, and roll rotations.
![\begin{figure}\centerline{\psfig{file=figs/yawpitchroll.eps,width=1.7in}}\end{figure}](http://planning.cs.uiuc.edu/img814.gif) |
A 3D body can be rotated about three orthogonal axes, as shown in Figure 3.8. Borrowing aviation terminology, these rotations will be referred to as yaw, pitch, and roll:
- A yaw is a counterclockwise rotation of
about the
-axis. The rotation matrix is given by
![$\displaystyle R_z(\alpha) = \begin{pmatrix}\cos\alpha & -\sin\alpha & 0 \sin\alpha & \cos\alpha & 0 0 & 0 & 1 \end{pmatrix} .$](http://planning.cs.uiuc.edu/img816.gif) | (3.39) |
Note that the upper left entries of
form a 2D rotation applied to the
and
coordinates, whereas the
coordinate remains constant.
- A pitch is a counterclockwise rotation of
about the
-axis. The rotation matrix is given by
![$\displaystyle R_y(\beta) = \begin{pmatrix}\cos\beta & 0 & \sin\beta 0 & 1 & 0 -\sin\beta & 0 & \cos\beta \end{pmatrix} .$](http://planning.cs.uiuc.edu/img819.gif) | (3.40) |
- A roll is a counterclockwise rotation of
about the
-axis. The rotation matrix is given by
![$\displaystyle R_x(\gamma) = \begin{pmatrix}1 & 0 & 0 0 & \cos\gamma & -\sin\gamma 0 & \sin\gamma & \cos\gamma \end{pmatrix} .$](http://planning.cs.uiuc.edu/img821.gif) | (3.41) |
Each rotation matrix is a simple extension of the 2D rotation matrix, (
3.31). For example, the yaw matrix,
![$ R_z(\alpha)$](http://planning.cs.uiuc.edu/img817.gif)
, essentially performs a 2D rotation with respect to the
![$ x$](http://planning.cs.uiuc.edu/img86.gif)
and
![$ y$](http://planning.cs.uiuc.edu/img166.gif)
coordinates while leaving the
![$ z$](http://planning.cs.uiuc.edu/img704.gif)
coordinate unchanged. Thus, the third row and third column of
![$ R_z(\alpha)$](http://planning.cs.uiuc.edu/img817.gif)
look like part of the identity matrix, while the upper right portion of
![$ R_z(\alpha)$](http://planning.cs.uiuc.edu/img817.gif)
looks like the 2D rotation matrix.
The yaw, pitch, and roll rotations can be used to place a 3D body in any orientation. A single rotation matrix can be formed by multiplying the yaw, pitch, and roll rotation matrices to obtain
![\begin{displaymath}\begin{split}R(\alpha,& \beta,\gamma) = R_z(\alpha) R_y(\b......\sin\gamma & \cos\beta \cos\gamma \end{pmatrix}. \end{split}\end{displaymath}](http://planning.cs.uiuc.edu/img822.gif) | (3.42) |
It is important to note that
![$ R(\alpha,\beta,\gamma)$](http://planning.cs.uiuc.edu/img823.gif)
performs the roll first, then the pitch, and finally the yaw. If the order of these operations is changed, a different rotation matrix would result. Be careful when interpreting the rotations. Consider the final rotation, a yaw by
![$ \alpha$](http://planning.cs.uiuc.edu/img815.gif)
. Imagine sitting inside of a robot
![$ {\cal A}$](http://planning.cs.uiuc.edu/img54.gif)
that looks like an aircraft. If
![$ \beta = \gamma = 0$](http://planning.cs.uiuc.edu/img824.gif)
, then the yaw turns the plane in a way that feels like turning a car to the left. However, for arbitrary values of
![$ \beta$](http://planning.cs.uiuc.edu/img818.gif)
and
![$ \gamma$](http://planning.cs.uiuc.edu/img820.gif)
, the final rotation axis will not be vertically aligned with the aircraft because the aircraft is left in an unusual orientation before
![$ \alpha$](http://planning.cs.uiuc.edu/img815.gif)
is applied. The yaw rotation occurs about the
![$ z$](http://planning.cs.uiuc.edu/img704.gif)
-axis of the world frame, not the body frame of
![$ {\cal A}$](http://planning.cs.uiuc.edu/img54.gif)
. Each time a new rotation matrix is introduced from the left, it has no concern for original body frame of
![$ {\cal A}$](http://planning.cs.uiuc.edu/img54.gif)
. It simply rotates every point in
![$ {\mathbb{R}}^3$](http://planning.cs.uiuc.edu/img23.gif)
in terms of the world frame. Note that 3D rotations depend on three parameters,
![$ \alpha$](http://planning.cs.uiuc.edu/img815.gif)
,
![$ \beta$](http://planning.cs.uiuc.edu/img818.gif)
, and
![$ \gamma$](http://planning.cs.uiuc.edu/img820.gif)
, whereas 2D rotations depend only on a single parameter,
![$ \theta $](http://planning.cs.uiuc.edu/img47.gif)
. The primitives of the model can be transformed using
![$ R(\alpha,\beta,\gamma)$](http://planning.cs.uiuc.edu/img823.gif)
, resulting in
![$ {\cal A}(\alpha,\beta,\gamma)$](http://planning.cs.uiuc.edu/img825.gif)
.