Difference between revisions of "Roll-Pitch-Yaw"
(8 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
There are different notations to define the axes of an object. Usually and in recent publications the vertical axis is the z-axis, the longitudal axis is x and then the lateral axis is the y-axis and directed to the left. | There are different notations to define the axes of an object. Usually and in recent publications the vertical axis is the z-axis, the longitudal axis is x and then the lateral axis is the y-axis and directed to the left. | ||
− | So the roll-pitch-yaw | + | So the roll-pitch-yaw transformation matrix of the orientation is defined as follows: |
:<math> | :<math> | ||
\begin{align} | \begin{align} | ||
Line 16: | Line 16: | ||
\left[\begin{array}{cccc} | \left[\begin{array}{cccc} | ||
\cos{\psi}\cos{\theta} & -\cos{\theta}\sin{\phi} & \sin{\theta} & 0\\ | \cos{\psi}\cos{\theta} & -\cos{\theta}\sin{\phi} & \sin{\theta} & 0\\ | ||
− | \cos{\psi}\sin{\phi}+\cos{\phi}\sin{\psi}\sin{\theta} & \cos{\phi}\cos{\psi}-\sin{\phi}\sin{\psi}\sin{\theta} & -\cos{\theta}sin{\psi} & 0\\ | + | \cos{\psi}\sin{\phi}+\cos{\phi}\sin{\psi}\sin{\theta} & \cos{\phi}\cos{\psi}-\sin{\phi}\sin{\psi}\sin{\theta} & -\cos{\theta}\sin{\psi} & 0\\ |
− | \sin{\phi}\sin{\psi}-\cos{\phi}\cos{\psi}\sin{\theta} & \cos{\psi}\sin{\phi}\sin{\theta} & \cos{\psi}\cos{\theta} & 0\\ | + | \sin{\phi}\sin{\psi}-\cos{\phi}\cos{\psi}\sin{\theta} & \cos{\phi}\sin{\psi}+\cos{\psi}\sin{\phi}\sin{\theta} & \cos{\psi}\cos{\theta} & 0\\ |
0 & 0 & 0 & 1 | 0 & 0 & 0 & 1 | ||
\end{array}\right] | \end{array}\right] | ||
\end{align} | \end{align} | ||
</math> | </math> | ||
+ | |||
+ | {{Example | ||
+ | |Title=Orientation of a car | ||
+ | |Contents=<br/> | ||
+ | Let the roll, pitch and yaw angles for a car be defined as follows: | ||
+ | :<math> | ||
+ | \begin{align} | ||
+ | &yaw: &\psi&=-&30^\circ \\ | ||
+ | &pitch: &\theta&=&20^\circ \\ | ||
+ | &roll: &\phi&=&35^\circ | ||
+ | \end{align} | ||
+ | </math> | ||
+ | Then the rotation matrix then results as: | ||
+ | :<math> | ||
+ | \begin{align} | ||
+ | RPY(35^\circ,20^\circ,-30^\circ)&=Rot(x,35^\circ)Rot(y,20^\circ)Rot(z,-30^\circ) \\ | ||
+ | &= | ||
+ | \left[\begin{array}{cccc} | ||
+ | 0.8138 & 0.4698 & 0.3420 & 0\\ | ||
+ | -0.2397 & 0.8075 & -0.5390 & 0\\ | ||
+ | -0.5294 & 0.3566 & 0.7698 & 0\\ | ||
+ | 0 & 0 & 0 & 1 | ||
+ | \end{array}\right] \\ | ||
+ | &= | ||
+ | \left[\begin{array}{cccc} | ||
+ | \vec{\mathbf{x}} & \vec{\mathbf{y}} & \vec{\mathbf{z}} & \vec{\mathbf{p}}\\ | ||
+ | 0 & 0 & 0 & 1 \\ | ||
+ | \end{array}\right] | ||
+ | \end{align} | ||
+ | </math> | ||
+ | The figure below shows how the three transformations are applied step by step. First the car is rotated around the z-axis about the yaw angle. Then the rotation around the y-axis follows and finally the car is rotated around the x-axis. The final orientation can be seen in the last view. | ||
+ | |||
+ | [[File:rpy-car-example.png|900px]] | ||
+ | |||
+ | If the matrix and the final orientation of the car are compared, it can be seen, that the vectors <math>\vec{\mathbf{x}}, \vec{\mathbf{y}}</math> and <math>\vec{\mathbf{z}}</math> correspond to the three local coordinate axes of the car. Position vector <math>\vec{\mathbf{p}}</math> is a zero vector in this case. | ||
+ | }} | ||
+ | |||
+ | [[Category:Article]] | ||
+ | [[Category:Orientation]] |
Latest revision as of 18:16, 13 November 2015
← Back: Three-Angle Representations | Overview: Three-Angle Representations | Next: Euler angles → |
The roll, pitch and yaw angles are three angles defined in regard of absolute transformation to describe the orientation of an object, generally vehicles, in three-dimensional space. In the following the common convention will be used, so the three angles can be described as follows (in the order they are applied):
- Yaw: Rotation around the vertical axis of the object or vehicle, respectively
- Pitch: Rotation around the lateral axis
- Roll: Rotation around the longitudinal axis (what is generally the movement axis of a vehicle)
There are different notations to define the axes of an object. Usually and in recent publications the vertical axis is the z-axis, the longitudal axis is x and then the lateral axis is the y-axis and directed to the left.
So the roll-pitch-yaw transformation matrix of the orientation is defined as follows:
Example: Orientation of a car
Then the rotation matrix then results as: The figure below shows how the three transformations are applied step by step. First the car is rotated around the z-axis about the yaw angle. Then the rotation around the y-axis follows and finally the car is rotated around the x-axis. The final orientation can be seen in the last view. If the matrix and the final orientation of the car are compared, it can be seen, that the vectors and correspond to the three local coordinate axes of the car. Position vector is a zero vector in this case. |