3-D Rotations: Using Euler Angles
3-D Rotations: Using Euler Angles
• In his honor, the angles of the rotations are called Euler angles.
Convention For Vehicle Rotation Orientation
• Yaw along Y axis (down)
• Pitch along Z axis (right)
• Roll along X axis (forward)
3-D EULER ROTATION (90°)
UP Y X
IN Y
LEFT RIGHT Y
X
X
OUT Z Z
DOWN Z
Y Y
X Y
X
X X
Y Z
Z Z
Z
Right-Hand Rule
By convention, there are three (3) rotation forms in 3D;
1) Rotate from X to Y around Z,
2) Rotate from Y to Z around X,
3) Rotate from Z to X around Y.
Y Z X
X Y Z
Z X Y
1) 2) 3)
Multiple Rotations Y X
Y X
Y
X Y X
X
Y
Z Z Z
Z
X X
X Y
Y Z
Y X
Z Z
Z Y
( Up, Out, Right ) ( Out, Left,
Representing Orientations
é ù é cy 0 s y ù é cz - sz 0 ù
ê1 0 0 úê úê ú
R x ×R y ×R z =ê 0 cx - sx ú×ê 0 1 0 ú×ê sz cz 0 ú
ê úê 0 cy ú ê 0 ú
ë 0 sx cx û ê - sy ú 0 1 ú
ë ûêë û
é c y cz - c y sz sy ù
ê ú Why would we
care about being
=ê sx sy cz + c x sz - s x s y s z + c x cz - s x cy ú able to convert to
ê ú a matrix ?
ê - c s c +s s
ë x y z x z
c x s y sz + s x c z cx cy ú
û
Euler Angles…Good and Bad
• Euler angles can generate any possible orientation in 3D (Good!)
• Euler angles are used in a lot of applications …they are intuitive (Good!)
• They can suffer from Gimbal lock (Bad! But not as bad as it sounds)
• Airplane orientation
• Rz(roll) Rx(pitch) Ry(yaw)
• Two axes have collapsed onto each other x
User input to rotate around Y and Z do the same thing in the example below