Professional Documents
Culture Documents
(ECEg5332)
1
Contents
Spatial Descriptions and Transformations
2
Description Positions, orientations and frames
px
Positions
A
p py
• The position of a point p relative to a p
z
coordinate system A (Ap):
Orientation
• The orientation of a body is described
by a coordinate system B attached to
the body, relative to A (a known
coordinate system).
3
Description Positions, orientations and frames
• Rotation Matrix A
B R describes {B} with respect to {A}
A
B R A X B A
YB A
Z B
X B X A YB X A Z B X A
X B YA YB YA Z B YA
X B Z A YB Z A Z B Z A
A
B R A X B A
YB A
Z B
X B X A YB X A Z B X A
X B YA YB YA Z B YA
X B Z A YB Z A Z B Z A
cosines of the angle
4
Description Positions, orientations and frames
XA
5
Translated, Rotated, and General frames
Translated frames:
• from frame to frame expressing a point Bp A
B
p
in terms of frame {A}, when {A} has the
p ZB
XA YB
6
Example:1
• Frame {B} is rotated relative to frame {A} about
Z by 30 degrees, and BP. Find AP
X B X A YB X A Z
X X
BAXRXA Y X
YBXXY A ZZ Y
BX YXA Z
A R B B A
B B AA B B AA
Bp A
X Y Y Y Z Y
BR X B BYA A YXB BBYAZAA ZYB BBY ZA AA Z
B
YB
X BZ Z A Y YBZ Z A Z ZBZ ZA
X A
Bp
YA
B A cos
B 30 A cos120
B 0
YB cos
cos cos120 0 0exact
3030cos120 30 0
cos 60 cos
XA
computation
YA
cos
cos 6060 cos cos 30
0 30 0 0 0!?
1
= ZB XA XB 0 0 0 0 1 1
ZA And :
And: :
ZA= ZB XB And A
P BA R B P !
A
A PA A
P BR P ! R B
B P !
B
7
Translated, Rotated, and General frames
XA
Example 2:Frame {B} is initially coincident with frame {A}. Frame {B} is then
rotated about YB by 30o, then about XB by 60o and then about ZB by 30o.
Finally ,the origin of {B} is translated to [XA ,YA ,ZA ]T =[10,-5,4 ]T.
a) Find A
B R in the order given
b) A point in {B} is BP =[6,-4,1 ]T , find the coordinates of this point in {A}.
8
Translated Rotated, and General frames
Compound Transformation Matrices
• Frame {C} is known relative to frame {B}, and frame {B} is
known relative to frame {A}. Given Cp we want to find Ap.
ZC
C
p
𝐵
𝑃 = 𝐶𝐵𝑅 𝐶 𝑃 + 𝐵𝑃𝐶𝑜𝑟𝑔 A
p ZB
YC
𝐴
𝑃 = 𝐵𝐴𝑅 𝐵𝑃 + 𝐴𝑃𝐵𝑜𝑟𝑔 XC
𝐴 𝐵 𝐶 𝐴 𝐵 ZA
𝐴𝑃 = 𝐴
𝐵𝑅 𝐶 𝑅 𝑃 + 𝐵𝑅 𝑃𝐶𝑜𝑟𝑔 + 𝑃𝐵𝑜𝑟𝑔 XB
YB
YA
XA
Properties of the rotation matrix
9
Represented of Rotation
Euler angles
• A common method of specifying a rotation matrix in terms of
three independent quantities.
• Rotation with respect to the current frame.
• Assuming we limit ourselves to 3 rotations without successive
rotations about the same axis. Most used Euler angles ZYZ
10
Euler Angles ZYZ
1. A rotation of φ1 about axis Z
2.A rotation of the new frame an angle φ2 about axis Y’ (current axis)
3.A rotation of the new frame an angle φ3 about axis Z’’ (current axis)
11
Euler Angles ZYZ
The rotation matrix Find the ZYZ Euler angles
∅1 , ∅2 ,∅3
12
Euler Angles ZYZ
13
Roll-Pitch-Yaw/Fixed Angles
A sequence of rotations about a given fixed frame.
1. A rotation of φy about axis x axis (yaw)
2. A rotation of φp about axis y axis (pitch)
3. A rotation of φr about axis z axis (roll)
𝒄𝒐𝒔φp 𝟎 𝒔𝒊𝒏φp
𝑹𝒚 φp = 𝟎 𝟏 𝟎
−𝒔𝒊𝒏φp 𝟎 𝒄𝒐𝒔φp
𝒄𝒐𝒔φr −𝒔𝒊𝒏φr𝟎 𝟎
𝑹𝒛 φr = 𝒔𝒊𝒏φr 𝒄𝒐𝒔φr 𝟎
𝟎 𝟎 𝟏
𝟏 𝟎 𝟎
𝑹𝒙 φy = 𝟎 𝒄𝒐𝒔φy −𝒔𝒊𝒏φy
Equivalent rotation matrix 𝟎 𝒔𝒊𝒏φy 𝒄𝒐𝒔φy
∅𝑟 , ∅𝑝 ,∅𝑦
15
Roll-Pitch-Yaw/Fixed Angles
16
Roll-Pitch-Yaw/Fixed Angles
17
Axis/angle Representation
• We are interested in rotation about an arbitrary axis in
space. Any rotation matrix R can be represented as a
rotation of an angle q about a unit axis w.
• Rot(𝜔, 𝜃)
• 𝜔: rotation axis (global) w𝑧
• 𝜃: rotation angle (rad. or deg.)
• follow right-handed rule w
• Perform rotation
• Rodrigues formula w𝑦
w𝑥
18
Axis/angle Representation
Find Axis/angle from rotation matrix
ω, θ
Solution: Using the Rodrigues formula
• Comparing terms:
19
Axis/angle Representation
20
Axis/angle Representation
Example 6: Compute the axis and angle equivalent to the
following rotation matrix
21
Homogeneous Transformations
AP
Borg
Borg Origin of frame B
AP
with respect to frame A
𝐴 AP 𝐵
𝐵𝑅
𝐴 𝑃
𝑃
= Borg
𝟏 0 1 1
𝐴 𝐴𝑻 𝐵
𝑷 𝐴
𝑷
𝑷 𝑩 𝐻o𝑚𝑜𝑔𝑒𝑛𝑒𝑜𝑢𝑠
𝐵
Homogeneous 𝑷 𝑐𝑜𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠
Transformation matrix
22
Homogeneous Transformations
They represent the position and orientation (pose) of a frame
with respect to another frame.
𝑻=
𝑅 𝑃
𝑻−𝟏 = 𝑅𝑇 −𝑅𝑇 𝑃
0 1 0 1
23
Homogeneous Transformations
Composition
• When a transformation is applied with respect to the fixed
frame
A pre -multiplication is used
• When a transformation is applied with respect to the
mobile (current, new ) frame
A post -multiplication is used
24
Defining a robot task
𝑊𝑻 = 𝑊𝑻 𝐵𝑻 𝐸𝑻
𝑭 𝐵 𝐸 𝑭
known,
once robot direction kinematics of the
is placed robot arm (function of q)
𝐵
𝑻𝐸 (𝑞) = 𝑻𝐵 𝑻𝑭 𝐸𝑻−1
𝑊 −1 𝑊
𝑭 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡
2525
Example 8
1. A camera is attached to a gripper in robot arm. The camera can
focus on an object to determine its frame relative to the camera.
Find the transformation matrix for the object relative to the
robot arm using the matrices below
26