3D Kinematics: Eric Whitman 1/24/2010
3D Kinematics: Eric Whitman 1/24/2010
Eric Whitman
1/24/2010
Rigid Body State: 2D
p
u
x
x
'
y
'
z
x
Rotation Matrix
Linear Algebra definition
Orthogonal matrix: R
-1
= R
T
square
det(R) = 1
2D: 4 numbers
3D: 9 numbers
Unit Vectors
p
z z y z x z z
z y y y x y y
z x y x x x x
z y x
z y x
z y x
'
'
' '
'
'
' '
'
'
' '
+ + =
+ + =
+ + =
(
(
(
=
z z z
y y y
x x x
z y x
z y x
z y x
R
' ' '
' ' '
' ' '
'
x
'
y
'
z
x
x
'
y
'
z
x
A
a
a R p A
+ =
Pros and Cons
Rotates Vectors Directly
Easy composition
9 numbers
Difficult to enforce
constraints
Simple Rotation Matrices
(
=
) cos( ) sin(
) sin( ) cos(
) (
u u
u u
u R
2D 3D
(
(
(
=
(
(
(
=
(
(
(
=
) cos( ) sin( 0
) sin( ) cos( 0
0 0 1
) (
) cos( 0 ) sin(
0 1 0
) sin( 0 ) cos(
) (
1 0 0
0 ) cos( ) sin(
0 ) sin( ) cos(
) (
u u
u u u
u u
u u
u
u u
u u
u
x
y
z
R
R
R
Degrees of Freedom
2D
2x2 matrix has 4
numbers
Only one DoF
3D
3x3 matrix has 9
numbers
6 constraints
3 DoF
Euler Angle Combinations
Can use body or world coordinates
2 consecutive angles must be different
Can alternate (3-1-3) or be all different (3-1-2)
24 possibilities (12 pairs of equivalent)
For aircraft, 3-2-1 body is common
Yaw, pitch, roll
For spacecraft, 3-1-3 body is common
Construct a Rotation Matrix
(
(
(
+
+
=
u | u | u
u | u | | u |
u | u | | u |
u |
c c s s s
s c c c c s s s c c c s
s s c c s s c s c s c c
R ) , , (
3-1-3 Body Convention Common for spacecraft
Recover Euler Angles
(
(
(
+
+
=
u | u | u
u | u | | u |
u | u | | u |
u |
c c s s s
s c c c c s s s c c c s
s s c c s s c s c s c c
R ) , , (
) arctan(
) arctan(
) arccos(
23 , 13
32 , 31
33
R R
R R
R
=
=
=
|
u
Gimbal Lock
Physically: two gimbal axes line up, making
movement in one direction impossible
Mathematically describes a singularity in Euler
angle systems
For the 3-1-3 body convention, this occurs
when angle 2 equals 0 or pi
For the 3-1-2 body convention, this occurs
when angle 2 +/- pi/2
Switching helps
Pros and Cons
Minimal Representation
Human readable
Gimbal Lock
Must convert to RM to
rotate a vector
No easy composition
Axis Angle (4 numbers)
A special case of Eulers Rotation Theorem:
any combination of rotations can be
represented as a single rotation
3 numbers to represent the axis of rotation
1 number to represent the angle of rotation
Has singularity for small rotations
( ) | , a
|
Pros and Cons
Minimal Representation
Human readable (sort
of)
Singularity for small
rotations
Must convert to RM to
rotate a vector
No easy composition
(Unit) Quaternions
All schemes with 3 numbers will have a
singularity
So says math (topology)
) 2 / cos(
) 2 / sin(
4
3
2
1
4
4
3
2
1
|
|
=
=
(
(
(
=
(
(
(
(
q
a
q
q
q
q
q
q
q
q
q
q
q
Constraint
Easy to enforce
1
2
4
2
3
2
2
2
1
= + + + = q q q q q q
T
Conversion with RM
(
(
(
+ + +
+ + +
+ +
=
2
4
2
3
2
2
2
1 1 4 2 3 2 4 1 3
1 4 3 2
2
4
2
3
2
2
2
1 3 4 1 2
2 4 3 1 3 4 2 1
2
4
2
3
2
2
2
1
) ( 2 ) ( 2
) ( 2 ) ( 2
) ( 2 ) ( 2
q q q q q q q q q q q q
q q q q q q q q q q q q
q q q q q q q q q q q q
R
) (
4
1
) (
4
1
) (
4
1
1
2
1
21 12
4
3
13 31
4
2
32 23
4
1
33 22 11 4
R R
q
q
R R
q
q
R R
q
q
R R R q
=
=
=
+ + + =
Composition
(
+
=
' '
' ' '
'
4 4
4 4
q q
q q
q q
Pros and Cons
No Singularity
Almost minimal
representation
Easy to enforce
constraint
Easy composition
Interpolation possible
Not quite minimal
Somewhat confusing
Summary of Rotation Representations
Need rotation matrix to rotate vectors
Often more convenient to use something else
and convert to rotation matrix
Euler angles good for small angular deviations
Quaternions good for free rotation
Homogeneous Transformations
1 0
1
0
1
0
p R o p + =
Define:
(
(
(
(
=
1
~
p
p
(
(
(
(
=
1 0
0
1
0
1 0
1
T
o R
A
Composition
n n
n
p A A A p
1 1
2
0
1
0
...
~
=