Ch. 2: Spatial Descriptions and Transformations
2.1 Coordinate System
• Cartesian coordinate system
• three mutually orthogonal unit vector
• origin point
• Cartesian coordinate frame, e.g.
• usually fixed or attached to the moving body
{ }
ACh. 2: Spatial Descriptions and Transformations
2.2 Representing Position
• attach points to the locations of interest
• the point is the point itself; we know where it is; it is a geometric entity, i.e. no numerical values involved
• we can describe the point by position vector represented in any coordinate system
0
1
5 6
2.8 4.2 p
p
= ⎢ ⎥⎡ ⎤
⎣ ⎦
⎡− ⎤
= ⎢ ⎥
⎣ ⎦
[ ]
[ ]
0 1
1 0 1
0 1 0
10 5
10.6 3.5 ,
T
T
O
O O O
=
= − ∴ ≠
Ch. 2: Spatial Descriptions and Transformations
2.3 Representing Orientation
• attach frames to the bodies of interest
• Rotation is the rotation itself. There are several ways to describe.
• One way is to describe the unit vectors of one frame with respect to the other frame
0 0 0
1 1 1
1 0 1 0
1 0 1 0
1 0 1
0
T T
R
c s
s c
θ θ
θ θ
⎡ ⎤
= ⎣ ⎦
⋅ ⋅ −
⎡ ⎤ ⎡ ⎤
= ⎢⎣ ⋅ ⋅ ⎥ ⎢⎦ = ⎣ ⎥⎦
⎡ ⎤
= ⎢ ⎥
⎣ ⎦
x y
x x y x x y y y
x y
Ch. 2: Spatial Descriptions and Transformations
Basic Rotation Matrix
,
,
,
1 0 0
0 0
0
0 1 0
0
0 0
0 0 1
x
y
z
R c s
s c
c s
R
s c
c s
R s c
θ
θ
θ
θ θ
θ θ
θ θ
θ θ
θ θ
θ θ
⎡ ⎤
⎢ ⎥
= ⎢ − ⎥
⎢ ⎥
⎣ ⎦
⎡ ⎤
⎢ ⎥
= ⎢ ⎥
⎢− ⎥
⎣ ⎦
⎡ − ⎤
⎢ ⎥
= ⎢ ⎥
⎢ ⎥
⎣ ⎦
Ch. 2: Spatial Descriptions and Transformations
Rotation matrix property
•
•
• the columns (rows) are mutually orthogonal
• each column (row) is a unit vector
•
det R =1
1
RT = R−
( )
10R −1 = 01RCh. 2: Spatial Descriptions and Transformations
Ex.
0 1
1/ 2 1/ 2 0
0 0 1
1/ 2 1/ 2 0
R
⎡ ⎤
⎢ ⎥
= ⎢ ⎥
⎢ − ⎥
⎣ ⎦
1 0
0 1
1/ 2 0 1/ 2
1/ 2 0 1/ 2
0 1 0
R RT
⎡ ⎤
⎢ ⎥
= ⎢ − ⎥ =
⎢ ⎥
⎢ ⎥
⎣ ⎦
Ch. 2: Spatial Descriptions and Transformations
2.4 Rotational Transformation
•
• the coordinates of a point in one frame is transformed to the coordinates of the same point in another frame by the rotational matrix
0 0 1
p = 1R p
coordinate transformation
Ch. 2: Spatial Descriptions and Transformations
•
coordinate transformation
0
1 orientation of transformed coordinate frame with respect to fixed coordinate frame
R =
Ch. 2: Spatial Descriptions and Transformations
•
• a point is rotated according to the rotation matrix to a new location; both of which are described in the same coordinate frame
0 0
b a
p = R p
operator
Ch. 2: Spatial Descriptions and Transformations
Similarity Transformation
• is the transformation of same operator from one frame into another frame
• is the operator described in
• is the same operator described in
• is the coordinate transformation
• then,
• first, transform the coordinates from to
• second, operate in by the operator
• third, display the result back from to by
• same as operate in by the operator
A { }
0B { }
10 1T
( )
01 1 01B = T − A T
{ }
1{ }
0{ }
0A
{ }
0{ }
1( )
01T −1{ }
1B
Ch. 2: Spatial Descriptions and Transformations
Ex.
Rotational operator in is
in where the relative rotation between two frames is
,
Rz θ
{ }
01 0 0
0 0
c s
s c
θ θ
θ θ
⎡ ⎤
⎢ ⎥
⎢ ⎥
⎢ − ⎥
⎣ ⎦
{ }
10 1
0 0 1
0 1 0
1 0 0 R
⎡ ⎤
⎢ ⎥
= ⎢ ⎥
⎢− ⎥
⎣ ⎦
Ch. 2: Spatial Descriptions and Transformations
2.5 Composition of Rotations
• Rotation w.r.t. current frame Æ POST-multiply
• Rotation w.r.t. fixed frame Æ PRE-multiply
• Rotational transformation is not commute
Ch. 2: Spatial Descriptions and Transformations
2.6 Parameterization of Rotations
• A 3x3 orthogonal matrix is one of the ways to describe the rotation
• 3 degrees of freedom for arbitrary rotation Æ 3 free variables
• Euler-angles, fixed-angles, angle-axis representation
Ch. 2: Spatial Descriptions and Transformations
Euler-angles representation
• any rotation can be created by three rotations about an axis of the moving frame
• 12 possibilities
•
φ θ ψ
, , ZYZ Euler-angles( )
' ' ' , , , , ,
Z Y Z
Z Y Z
R R R R
c c c s s c c s s c c s s c c c s s c s c c s s
s c s s c
φ θ ψ
φ θ ψ
φ θ ψ φ ψ φ θ ψ φ ψ φ θ φ θ ψ φ ψ φ θ ψ φ ψ φ θ
θ ψ θ ψ θ
=
− − −
⎡ ⎤
⎢ ⎥
= ⎢ + − + ⎥
⎢ − ⎥
⎣ ⎦
see Craig’s Appendix B
Ch. 2: Spatial Descriptions and Transformations
Euler-angles representation
( )
sol #1, s
θ
> 0( )
( )
( )
2
33 33
13 23 31 32
atan2 , 1 atan2 ,
atan2 ,
r r
r r r r θ
φ ψ
= −
=
= −
13 0 || 23 0
r ≠ r ≠
( )
sol #2, s
θ
< 0( )
( )
( )
2
33 33
13 23
31 32
atan2 , 1 atan2 ,
atan2 ,
r r
r r r r θ
φ ψ
= − −
= − −
= −
Yes
Ch. 2: Spatial Descriptions and Transformations
Euler-angles representation
θ
= 0(
11 21)
atan2 r r, φ ψ+ =
13 0 || 23 0
r ≠ r ≠
θ π
=(
11 12)
atan2 r , r φ ψ− = − −
No
r33
= 1 = -1
representational singularity
representational singularity
Ch. 2: Spatial Descriptions and Transformations
Fixed-angles representation
• any rotation can be created by three rotations about an axis of the fixed frame
• 12 possibilities
•
φ θ ψ
, , XYZ (RPY) fixed-angles(
, ,)
, , ,
XYZ Z Y X
R R R R
c c s c c s s s s c s c s c c c s s s c s s s c
s c s c c
φ θ ψ
ψ θ φ
φ θ φ ψ φ θ ψ φ ψ φ θ ψ φ θ φ ψ φ θ ψ φ ψ φ θ ψ
θ θ ψ θ ψ
=
− + +
⎡ ⎤
⎢ ⎥
= ⎢ + − + ⎥
⎢ − ⎥
⎣ ⎦
see Craig’s Appendix B
Ch. 2: Spatial Descriptions and Transformations
Fixed-angles representation
sol #1 sol #2
Yes
Ch. 2: Spatial Descriptions and Transformations
Fixed-angles representation
No
representational singularity
representational singularity
Ch. 2: Spatial Descriptions and Transformations
Angle-axis representation
• A rotation can be obtained by rotating about the specified axis by the particular angle
• this operation can be described easily in the coordinate frame having a principle axis aligned with the axis of
rotation
• what is the representation of the operation in the reference coordinate frame
• similarity transformation
Ch. 2: Spatial Descriptions and Transformations
Angle-axis representation
{ }
0 : reference coordinate frame{ }
1 : coordinate frame having axis aligned with the axis of rotationz
0 1
, 1 , 0
k z
R θ = R R⋅ θ ⋅ R
0
1 , ,
1
0 , ,
z y
y z
R R R
R R R
α β
β α
− −
= ⋅
= ⋅
2
2 ,
2
x x y z x z y
k x y z y y z x
x z y y z x z
k v c k k v k s k k v k s
R k k v k s k v c k k v k s
k k v k s k k v k s k v c
θ
θ θ θ θ θ θ
θ θ θ θ θ θ
θ θ θ θ θ θ
⎡ + − + ⎤
⎢ ⎥
= ⎢ + + − ⎥
⎢ − + + ⎥
⎣ ⎦
Ch. 2: Spatial Descriptions and Transformations
Angle-axis representation
11 22 33 1
acos 2
r r r
θ = ⎛⎜⎝ + + − ⎞⎟⎠
32 23
13 31
21 12
1 2 sin
r r r r r r θ
⎡ − ⎤
⎢ ⎥
= ⎢ − ⎥
⎢ − ⎥
⎣ ⎦
k
Two solutions are and(k,θ ) (− −k, θ)
Representational singularity when orθ = 0 θ π= , k would be undefined
Ch. 2: Spatial Descriptions and Transformations
2.7 Homogeneous Transformation
• general rigid body motion involves both translation and rotation
• affix the coordinate frame to the rigid body; body fixed frame
• motion of the body = motion of the moving frame relative to the fixed frame
• combine the orientation of the moving coordinate frame and the position of its origin Æ homogeneous transformation matrix
0 0
0 1 1
1
0 1
R p
T ⎡ ⎤
= ⎢ ⎥
⎣ ⎦
Ch. 2: Spatial Descriptions and Transformations
Some properties and meanings
•
• three interpretations: relative pose of two frames, coordinate transformation (mapping), and operator
• motion performed relative to the current frame Æ post- multiplication
• motion performed relative to the fixed frame Æ pre- multiplication
•
1 1 0 0 0
( )
1 0 0 1 1 1 0 1
0 1
0 1 0 1
T T
R p R R p
T ⎡ ⎤ ⎡ − ⎤ T
−= ⎢ ⎥ ⎢ = ⎥ =
⎣ ⎦ ⎣ ⎦
0 1
A B A A B
A B C B B C
C
R R p R p
T ⎡ + ⎤
= ⎢ ⎥
⎣ ⎦
Ch. 2: Spatial Descriptions and Transformations
Ex.
A frame is described as initially coincident with . We then rotate about the vector
passing through the point by an amount . Give the frame description of .
{ }
B{ }
A{ }
B Ak =[
0.707 0.707 0]
T[
1 2 3]
TA p =
θ = 30D
{ }
BCh. 2: Spatial Descriptions and Transformations
Sol.
Using the similarity transformation, set up as the frame where its origin is at , but has the same
orientation as . The given operation represented in this frame is
The coordinate transformation between and is
{ }
CA p
0.9330 0.0670 0.3536 0 0.0670 0.9330 0.3536 0 0.3536 0.3536 0.8660 0
0 0 0 1
CT
⎡ ⎤
⎢ − ⎥
⎢ ⎥
= ⎢− ⎥
⎢ ⎥
⎣ ⎦
{ }
A{ }
C{ }
ACh. 2: Spatial Descriptions and Transformations
Sol.
Therefore, the given operation expressed in is
which, after multiplying of gives .
( )
10.9330 0.0670 0.3536 1.1276 0.0670 0.9330 0.3536 1.1276 0.3536 0.3536 0.8660 0.0484
0 0 0 1
A C C C
A A
T = H − T H
⎡ − ⎤
⎢ − ⎥
⎢ ⎥
= ⎢− ⎥
⎢ ⎥
⎣ ⎦
1 0 0 1
0 1 0 2
0 0 1 3
0 0 0 1
C AH
⎡ − ⎤
⎢ − ⎥
⎢ ⎥
= ⎢ − ⎥
⎢ ⎥
⎣ ⎦
{ }
AI4
{ }
A{ }
B