Dec 14 2009
Dec 14 2009
Transformations
X1
Coordinate System
r = x 2 + y 2 , r ∈ [0, ∞)
⎛ y⎞
θ = tan −1 ⎜ ⎟, θ ∈ [0,2π )
⎝x⎠
z = z , z ∈ (−∞, ∞)
x = r cosθ
y = r sin θ
z=z
Spherical Coordinates
r = x 2 + y 2 + z 2 , r ∈ [0, ∞)
⎛ y⎞
θ = tan ⎜ ⎟, θ ∈ [0,2π )
−1
⎝x⎠
⎛z⎞
φ = cos −1 ⎜ ⎟, φ ∈ [0, π )
⎝r⎠
x = r sin φ cosθ
y = r sin φ sin θ
z = r cos φ
Description of a position
V
Vector relative
l i to frame
f
Location
A 3 x 1 position vector
A leading superscript
indicates the coordinate
system ⎡ px ⎤
A ⎢
P = ⎢ py ⎥ ⎥
⎢⎣ pz ⎥⎦
Description of an orientation
⎢⎣ r r
11
A ˆ
r
21
B
r ⎤
12
A ˆ
r ⎥⎥. Z
22
r ⎥⎦
23 ]
⎢
B = ⎢ r21
13
r22 ⎥
r23 ⎥.
⎢⎣r31 r32 r33 ⎥⎦
31 32 33
⎡ Xˆ B ⋅ Xˆ A YˆB ⋅ Xˆ A Zˆ B ⋅ Xˆ A ⎤
⎢ ˆ ˆ ⎥
A
B R = ⎢ B A
X ⋅ Y Yˆ ⋅ Yˆ
B A Zˆ B ⋅ YˆA ⎥.
⎢ Xˆ ⋅ Zˆ Yˆ ⋅ Zˆ Zˆ B ⋅ Zˆ A ⎥⎦
⎣ B A B A
Direction cosines
⎡ Xˆ B ⋅ Xˆ A YˆB ⋅ Xˆ A Zˆ B ⋅ Xˆ A ⎤
⎢ ˆ ˆ ⎥
A
B R = ⎢ B A
X ⋅ Y Yˆ ⋅ Yˆ
B A Z B ⋅ YA ⎥.
ˆ ˆ
⎢ Xˆ ⋅ Zˆ Yˆ ⋅ Zˆ Zˆ B ⋅ Zˆ A ⎥⎦
⎣ B A B A
⎡ Xˆ A ⋅ Xˆ B YˆA ⋅ Xˆ B Zˆ A ⋅ Xˆ B ⎤
⎢ ˆ ˆ ⎥
B
A R = ⎢ A B
X ⋅ Y Yˆ ⋅ Yˆ
A B Z A ⋅ YB ⎥.
ˆ ˆ
⎢ Xˆ ⋅ Zˆ Yˆ ⋅ Zˆ Zˆ A ⋅ Zˆ B ⎥⎦
⎣ A B A B
B
A R= RA
B
T
⎡ A Xˆ BT ⎤
A T A ⎢ A ˆT ⎥ A ˆ
B R B R = ⎢ YB ⎥ X B [ YˆB
A A
]
Zˆ B = I 3
⎢ A Zˆ T ⎥
⎣ B⎦
A
B R = ABR −1 = AB R T .
For convenience
convenience, the point whose position we will describe
is chosen as the origin of the body-attached frame.
A frame: a position and an orientation pair
{B} = { A
B R, A
PBORG .}
Mapping
Changing the description
f
from one frame
f to A
another
T maps
B
The quantity itself is not
changed; only its B
P→ P.
A
description is changed.
Mappings involving translated
frames
Translational mapping
A
P = P + PBORG
B A
o
⎡− 1.000⎤
P = BAR BP = ⎢⎢ 1.732 ⎥⎥
30 A
⎢⎣ 0.000 ⎥⎦
Mappings involving general frames
A
P= T P
A
B
B
an operator
t ini matrix
t i form
f
A Homogeneous Transform
Combines
C bi the
h operations
i off rotation
i and
d translation
l i
into a single matrix multiplication
⎡ P⎤ ⎡
A
R M A
B
A
PBORG ⎤ ⎡ P ⎤
B
⎢ ⎥ ⎢ ⎥⎢ ⎥
L
⎢ ⎥ ⎢= L L L M L ⎥⎢ L ⎥
⎢ 1 ⎥ ⎢0 0 0 M 1 ⎥⎦ ⎢⎣ 1 ⎥⎦
⎣ ⎦ ⎣
A
BT
A Homogeneous Transformation
A
P2 = R AP1
A
P2 = RK (θ ) AP1
⎡cosθ − sin θ 0 0⎤
⎢ sin θ cosθ 0 0⎥⎥
RZ (Θ) = ⎢
⎢ 0 0 1 0⎥
⎢ ⎥
⎣ 0 0 0 1⎦
A homogeneous transform
Transformation operators: Example
2.4
The transform that rotates by R
andd translates by Q is the same
as the transform that describes a
frame rotated by R and
translated by Q relative to the
reference frame.
A
P2 =T P1 A
Compound transformations
B
P = T P,
B
C
C
A
P = T P.
A
B
B
A
P = T T P,
A
B
B
C
C
T = T T.
A
C
A
B
B
C
⎡ A
B
B
R R
C M A
B R PCORG + PBORG ⎤
B A
⎢ ⎥
CT = ⎢L
A
L L M L ⎥
⎢0 0 0 M 1 ⎥
⎣ ⎦
Inverting a transform
⎡ B
A R M B
PAORG ⎤
⎢ ⎥
AT = ⎢L
B
L L M L ⎥
⎢0 0 0 M 1 ⎥⎦
⎣
−1
B
AT= T
A
B
B A T
A R= R
B
A
P = R P + PBORG
A
B
B A
0B
B A
( PBORG )= A R PBORG + PAORG
A B
B
PAORG =− R PBORG =− R
B
A
A A
B
T A
PBORG
⎡ A
B R T
M − R
A
B PBORG ⎤
T A
⎢ ⎥
AT = ⎢L
B
L L M L ⎥
⎢0 0 0 M 1 ⎥
⎣ ⎦
Example 2.5
⎡0.866 − 0.500 0.000 4.0⎤
⎢0.500 0.866 0.000 3.0 ⎥
BT =
A ⎢ ⎥
⎢0.000 0.000 1.000 0.0⎥
⎢ ⎥
⎣ 0 0 0 1 ⎦
U
D T= T T,
U
A
A
D
U
D T = T T T.
U
B
B
C
C
D
U
A T T = T T T.
A
D
U
B
B
C
C
D
−1 U A C −1
T= T
B
C
U
B AT T T .
D D
Example of a transform equation
U
CT =UAT DAT −1 DCT ,
U
CT = T T.
U
B
B
C
−1 D
U
AT= T T T
U
B
B
C
D
C A T.
Example 2.6: Manipulator reaching for
a bolt GT
T
−1 B
T
GT= T
B
T T T.
S
S
G
Proper orthonormal matrices
Rotation matrices are special in that all columns are
mutually
ll orthogonal
h l and
dhhave uniti magnitude.
i d
The determinanat of a rotation matrix is always
equal to +1.
Special Orthogonal group of order n
R T = R −1 ∈ SO(n)
det R = 1.
For any proper orthonormal matrix R, there exists a
skew-symmetric matrix such that
R = ( I 3 − S ) −1 ( I 3 + S ),
)
⎡ 0 − sx sy ⎤
⎢ ⎥
S = ⎢ sx 0 − sz ⎥
⎢− s y sz 0 ⎥⎦
⎣
Xˆ = 1, Yˆ = 1, Zˆ = 1,
Xˆ ⋅ Yˆ = 0, Xˆ ⋅ Zˆ = 0, Yˆ ⋅ Zˆ = 0.
R i
Rotations don’t
d ’ generally
ll commute.
X-Y-Z fixed angles (roll
(roll--pitch
pitch--yaw)
RX (γ ) RY ( β ) RZ (α )
A
B RXYZ (γ , β ,α ) = RZ (α ) RY ( β ) RX (γ )
⎡cα − sα 0⎤ ⎡ cβ 0 sβ ⎤ ⎡1 0 0 ⎤
⎢ ⎥
= ⎢ sα cα 0⎥ ⎢ 0 ⎢ 1 ⎥ ⎢
0 ⎥ ⎢0 cγ − sγ ⎥ ⎥
⎢⎣ 0 0 1⎥⎦ ⎢⎣− sβ 0 cβ ⎥⎦ ⎢⎣0 sγ cγ ⎥⎦
⎡cαcβ cαsβsγ − sαcγ cαsβ cγ + sαsγ ⎤
⎢
= ⎢ sαcβ sαsβsγ + cαcγ ⎥
sαsβcγ − cαsγ ⎥.
⎢⎣ − sβ cβ sγ cβcγ ⎥⎦
Inverse problem:
RZ (α ) RY ( β ) RX (γ )
B′ B′′
A
B R= R R R
A
B′ B′′ B
A
B RZ ′Y ′X ′ = RZ (α ) RY ( β ) RX (γ )
⎡cα − sα 0⎤ ⎡ cβ 0 sβ ⎤ ⎡1 0 0 ⎤
⎢
= ⎢ sα cα 0⎥ ⎢ 0⎥ ⎢ 1 ⎥ ⎢
0 ⎥ ⎢0 cγ − sγ ⎥ ⎥
⎢⎣ 0 0 1⎥⎦ ⎢⎣− sβ 0 cβ ⎥⎦ ⎢⎣0 sγ cγ ⎥⎦
⎡cαcβ cαsβsγ − sαcγ cαsβ cγ + sαsγ ⎤
= ⎢⎢ sαcβ sαsβ sγ + cαcγ sαsβ cγ − cαsγ ⎥⎥.
⎢⎣ − sβ cβsγ cβ cγ ⎥⎦
Three rotations taken about fixed axes yield the same final orientation as the same
three rotations taken in opposite order about the axes of moving frame.
Homework #5 : Z Z--Y-Z Euler Angles
(1 pt.) – Due Dec. 21
Derive the rotational matrix
Extract Z-Y-Z Euler angles
Rules for Composition of Rotational Transformations:
Relative to the current frame: postmultiply
Relative to fixed frame: premultiply
R = Rx (δ ) Rz (α ) Rx (θ ) Rz (φ ) Ry ( β )
Equivalent angle
angle--axis representation
If the
th axis
i is
i a generall direction,
di ti
any orientation may be obtained
through proper axis and
orientation selection.
⎡ k x k x vθ + cθ k x k y vθ − k z sθ k x k z vθ + k y sθ ⎤
⎢ ⎥
RK (θ ) = ⎢k x k y vθ + k z sθ k y k y vθ + cθ k y k z vθ − k x sθ ⎥,
⎢ k x k z vθ − k y sθ k y k z vθ + k x sθ k z k z vθ + cθ ⎥⎦
⎣
vθ = 1− cosθ
⎡cos θ − sin θ 0⎤ ⎡ 0 0 1⎤
Rz (θ ) = ⎢⎢ sin θ cos θ 0⎥⎥, T = BAR = ⎢⎢ 0 1 0⎥⎥
⎢⎣ 0 0 1⎦⎥ ⎢⎣− 1 0 0⎥⎦
= Rz (α ) Ry ( β ) Rz (θ ) Ry (− β ) Rz (−α )
ky kx
sin α = cos α =
k +k
2
x
2
y k +k
2
x
2
y
sin β = k x2 + k y2 cos β = k z
S ppos R iss generated
Suppose g d by a rotation
o o of o 90o about
bo z0
followed by a rotation of 30o about y0 followed by a
rotation of 60o about x0 . Then
⎛ 1⎞
R = Rx (60) Ry (30) Rz (90) θ = cos −1 ⎜ − ⎟ = 120o
⎝ 2⎠
⎡ 3 1 ⎤
⎢ 0 − ⎥ ⎡ 1 ⎤
⎢ 2 2 ⎥ ⎢ 3 ⎥
⎢ ⎥
=⎢ − ⎥
1 3 3
− K̂ = ⎢
1 1
− ⎥
⎢ 4⎥ K
⎢
2 4 ⎢2 3 2⎥
3 1 3⎥ ⎢ 1 1⎥
⎢ ⎥ + ⎥
⎢⎣ 2 4 4 ⎥⎦ ⎢
⎣2 3 2⎦
Example 2.9
⎡0.707⎤
K = ⎢⎢0.707⎥⎥, θ = 30o
A ˆ
⎢⎣ 0.0 ⎥⎦
⎡1.0 ⎤
A
P = ⎢⎢2.0⎥⎥
⎣⎢3.0⎥⎦
⎡1.0 0.0 0.0 1.0 ⎤ ⎡1.0 0.0 0.0 − 1.0 ⎤
⎢0.0 1.0 0.0 2.0⎥⎥ B′ ⎢0.0 1.0 0.0 − 2.0⎥
A′T =
A ⎢ , BT = ⎢ ⎥
⎢0.0 0.0 1.0 3.0 ⎥ ⎢0.0 0.0 1.0 − 3.0 ⎥
⎢ ⎥ ⎢ ⎥
⎣0.0 0.0 0.0 1.0 ⎦ ⎣ 0 .0 0. 0 0. 0 1. 0 ⎦
⎡ 0.933 0.067 0.354 0.0⎤
⎢ 0.067 0.933 − 0.354 0.0⎥⎥
A′
B′T =
⎢
⎢− 0.354 0.354 0.866 0.0⎥
⎢ ⎥
⎣ 0.0 0.0 0.0 1.0 ⎦
⎡ 0.933 0.067 0.354 − 1.13⎤
⎢ 0.067 0.933 − 0.354 1.13 ⎥
A
T = A A′ B′
′ BT =
A′T BT
⎢ ⎥.
B
⎢− 0.354 0.354 0.866 0.05 ⎥
⎢ ⎥
⎣ 0. 000 0 .000 0 .000 1.00 ⎦
A rotation about an axis that does not pass through the origin causes
a change in position,
position plus the same final orientation as if the axis had
passed through the origin.
Euler parameters
The four parameters ε1 , ε 2 , ε 3 , and ε 4 describing a
i θ about
fi i rotation
finite b an arbitrary
bi i Kˆ = [k x k y k z ]T
axis
Defined by
θ θ θ
ε1 = k x sin , ε 2 = k y sin , ε 3 = k z sin
2 2 2
θ
ε 4 = cos
2
Euler parameters (cont’d)
A quaternion in scalar-vector representation
(ε , ε 4 ) = ε1i + ε 2 j + ε 3k + ε 4 .
ε ⋅ ε + ε = ε + ε + ε + ε = 1.
2
4
2
1
2
2
2
3
2
4
B
V = 5 Xˆ , V = 5Yˆ
A
Rigid motions
A rigid
g motion is an ordered pair
p of ((d,, R).
)
d ∈R 3
R ∈ SO(3)
a pure translation
a pure rotation
SE (3) = R × SO(3)
3