View
216
Download
2
Embed Size (px)
Citation preview
1
The Concepts of Orientation/Rotation ‘Transformations’
ME 4135 -- Lecture Series 2Fall 2011, Dr. R. Lindeke
2
Overview Outline
• Defining Terminology• Defining the Orientation Matrix – By Axial Rotation– By Physical Meaning
• Defining Orientation Effects – RPY Orientation Control– Euler and Robotic Orientation Control
3
Symbol Interpretation
• Lower Case BOLD letters indicate vectors
• Upper Case BOLD letters indicate a Matrix
• Letters w/ “Hat” indicate Unit Vectors (Unbolded)
• Arrow Above 2 Uppercase Letters indication Start/Stop Points of a vector
r , s , d , a , b , cp , q , v , w , y , zω , α , θ , δ , φ
F , M , J
ˆ ˆ ˆ ˆˆ ˆ, , , , ,i j k I J K
ON��������������
4
Symbol Interpretation
• Typically the Capitol Letters: A,T,Q & R indicate translational &/or rotation Transformation Matrices
• Transformation are often (Always?) between different Frames of Reference, thus:
• Here, B is a “Body” Frame and G is the “Ground,” “Global” or “Inertial” Frame – later is often labeled the 0 (zero) frame
(or alternatively)
(or alternatively)
G BB G
B GG B
T T
T T
5
Symbol Interpretation
• Left “Superscript” on a vector indicates frame vector is expressed in– Here a vector ‘r’ expressed in ground
frame• Right “Subscript” on a vector
indicates ‘tip’ point that the vector points to– Here a vector ‘r’ pointing to point ‘P’
expressed in frame G – and implied it is also measured in G frame
Gr
GPr
6
Symbol Interpretation
• Left Subscript in a vector indicates the Frame of measurement– Here we are
indicating a vector ending at point P as measured in the B Frame but Expressed in the G Frame
GB Pr
7
Symbol Interpretation
• Right Subscript on angular velocity indicates a Moving Frame while left subscript indicates frame of measurement– Here angular velocity of Frame B w.r.t. G
Frame• Right Superscript on angular velocity
vector indicates frame in which velocity is expressed– Here angular velocity of Frame B1 measured
in G Frame but expressed into B2 Frame
G B
2
1
BG B
For more symbolic interpretations see the text Preface and lists at the end of each chapter!
8
Dealing With Rotational Kinematics
Note: Vector r positioning point P can be defined in either Frame G (Xp,Yp,Zp) or in Frame B (xp,yp.zp)
9
Dealing With Rotational Kinematics
• Typically we then need a “Quick” tool to relate these two definitions of the same point!
• Since we are talking about rotations only, we will develop an Orientation Transform to do this (Q)
• It is based in the “Inner Product” approach to geometric relationships
,G B
rot angler Q r
10
Simple (single axial) Rotational Transformations
• About Z axis (by or rad):
• About Y axis (by or rad):
• About X axis (by or rad):
,
0
0 , about Z
0 0 1Z G
Cos Sin
Q Sin Cos
,
0
0 1 0 , about Y
0Y G
Cos Sin
Q
Sin Cos
,
1 0 0
0 , about X
0X GQ Cos Sin
Sin Cos
11
A Plan View of a “Pure” Z-Rotation
12
By Inner Products Meaning:
by Inner Products these two definitions are related:
ˆˆ ˆ
ˆ ˆ ˆ
ˆˆ ˆ ˆ ˆˆ ˆ
ˆˆ ˆ ˆ ˆˆ ˆ
ˆˆ ˆ ˆ ˆˆ ˆ
Bi i i i
Gi i i i
i i i i i
i i i i i
i i i i i
r x i y j z k
r X I Y J Z K
X I r I x i I y j I z k
Y J r J x i J y j J z k
Z K r K x i K y j K z k
13
Leading to matrix Form:
ˆˆ ˆ ˆˆ ˆ
ˆˆ ˆ ˆˆ ˆ
ˆˆ ˆ ˆˆ ˆ
and by definition:
cos to
Here (example Z rotation):
ˆ ˆˆ ˆ to while 1
so
ˆ ˆ 1 1 ( ) (
i i
i i
i i
I i I j I kX x
Y J i J j J k y
Z kK i K j K k
a b a b a b
I i I i
I i Cos Cos
)
14
Considering other terms:
ˆ ˆConsidering
ˆ ˆˆ ˆ to 90 & 1
ˆ ˆ 1 1 (90 )
ˆ ˆ (90) (90)
ˆ ˆ 0 1
I j
I j I i
I j Cos
I j Cos Cos Sin Sin
I j Cos Sin Sin
And so on …Until we achieve the original QZ, Matrix
These Homogenous Transformation Matrices – A Physical Interpretation
1. A representation of a Coordinate Transformation relating the coordinates of a point ‘P’ between 2 like-geometrid (-- ie SO3 --) different coordinate systems
2. A representation of the Position and Orientation (POSE) of a transformed coordinate frame in the “space” defined by a fixed coordinate frame
3. An OPERATION that takes a vector rP and rotates and/or translates it to a new vector rP‘ in the same coordinate frame
These same concepts also apply equally to just the effect of simple (one axial) and complex ROTATIONAL operations as well
16
Try an Example:
Now lets rotate about the G frames axes: 1st Z of 45; then X of 45; finally Y of 90. The question often asked is where is the P1 point
moved to?
17
What it means (1)• The point on the
“body” is (5,30,10)G but it is also (5,30,10)B
and the two Frames are originally co-incident
• Looking at the first rotation we can build a rotational matrix:
1 1
,45
,45
,45
45 45 0
45 45 0
0 0 1
.707 .707 0
.707 .707 0
0 0 1
:
5 17.678 5
30 24.749 where 30 is
10 10 10
z
z
G BB P z P
Cos Sin
Q Sin Cos
Q
Thus
r Q r
18
What it means (2)
• The body Frame (and the body point!) have now moved – as expected, [except for the Z coordinate]
• Now lets take the second rotation (about XG) by 45
• Leading to a new position:
,45
,45
'1 ,45
1 0 0
0 45 45
0 45 45
1 0 0
0 0.707 0.707
0 0.707 0.707
we seek:
17.678 17.678
24.749 10.429
10 24.571
GX
GX
G GX
Q Cos Sin
Sin Cos
Q
P Q
19
What it means (3)• Again the point
and body frame geometry have changed (except for the X coordinate!)
• Finally lets take a look at the effect of the last Y rotation
,90
,90
"1 ,90
90 0 90
0 1 0
90 0 90
0 0 1
0 1 0
1 0 0
"Moving" the Body Point to:
17.678 24.571
10.429 10.429
24.571 17.678
GY
GY
G GY
Cos Sin
Q
Sin Cos
Q
P Q
But can’t there be an easier way than all of these individual steps – to get final B Frame orientation and a tool for finding the position?
20
Turns out we can Multiply the 3 “back to back” – in reverse order to accomplish it!
, , ,
( is 90, is 45, is 45)
0 1 0 0 0
0 1 0 0 0
0 0 0 0 1
0 0 1 1 0 0
0 1 0 0 .707 .707
1 0 0 0 .707 .
G G G GZ X Y Y X Z
GZ X Y
Q Q Q Q
Q
Cos Sin Cos Sin
Cos Sin Sin Cos
Sin Cos Sin Cos
.707 .707 0
.707 .707 0
707 0 0 1
.4998 .4998 .707
.4998 .4998 .707
.707 .707 0
21
Computed in MathCad
And note: Using this Matrix Product “Qeff” built in reverse order when multiplied by the original vector location of PB we get the same answer!
(whew!)
22
Physical Focus on the Product Matrix
• It is the physical orientation of the Body frame after the three rotations taken w.r.t. the Ground frame
• 1st Column is the projection of xB to the Ground Frame’s axes• And note that each of the columns – or rows – is a unit vector
.500 .500 .707
.500 .500 .707
.707 .707 0
xB yB zB
XG
YG
ZG
23
Now, What Happens if we “redefine” the Rotating Frame between each step?
• This should take us to a new place!• We can build this overall Orientation Matrix
too – but it must be different if it is ‘moving’ P1 to a new place!?!
• Lets guess that we need just reverse the individual matrix order before doing the overall product … well it sound good …
Our Text’s Author calls this “Local Rotation”
24
What will it look like?1 2?
,45 ,45 ,45
0 1 0 0 0
0 0 0 1 0
0 0 1 0 0
.707 .707 0 1 0 0
.707 .707 0 0 .707 .707
0 0 1 0 .707 .707
B BG GZ X Y Z X YQ Q Q Q
Cos Sin Cos Sin
Sin Cos Cos Sin
Sin Cos Sin Cos
0 0 1
0 1 0
1 0 0
.500 .500 0.707
.500 .500 .707
.707 .707 0
25
Now using this matrix (from MathCad)
A different final position (as expected) -- so changing frames of reference between individual operations can be “easily” accounted for by multiplying matrices – in the order of the individual operational events!
26
So Why do I care in Robotics?
• We will be most interested in Orientation of the End Effectors
• In the “Real World” orientation is defined in various ways:– By Roll-Pitch-Yaw (RPY)– By Euler Angles (EA)
• We find– RPY defines orientation w.r.t. a fixed frame of reference– EA defines orientation in a relative sense with a simple
rotation about a base frame and two subsequent re-defined frames (one axial rotation about a single axis in each frame )• Zinit followed by Xinterm1 followed by Zinterm2
27
RPY by our Text (I grew up with a different thought as to axis of Roll wrt Z and Yaw wrt X but it is of no consequence)
Meaning Globally
As applied Locally
28
Considering Euler Angles
Initial Z rotation leads to orientation B’
Secondary X rotation Leads to orientation B”
Final Z rot leads to the final orientation B‴
29
A last thought about these Q matrices
• The inverse of the matrix is simply its transpose!
11 12 13
21 22 23
31 32 33
11 21 31
12 22 32
13 23 33
then we find:
"transposed" since:
GB
G InverseB
G Inverse BB G
R R R
Q R R R
R R R
R R R
Q R R R
R R R
Q Q
Effectively the “inverse” is a mathematical way of looking at the ground from the viewpoint of the body frame so we must simply reverse which directions are ‘local’ and which are ‘remote’ as the matrix was fundamentally defined
30
Looking at this Idea (From last MathCad effort)
Wow – That worked!So we can “move” round and round and then back again with
the Orientation matrices
31
Summary• Orientation effects can be “accounted for” by using a directed series of
Simple Rotations about individual axes when they are multiplied in an appropriate order
• The Orientation Matrix (NQM) defines the axes (XM, YM, ZM) – of the M frame – in the space defined by the N Frame
• The inverse of a Q matrix is simply its transpose and it is (REALLY) just the space being define with the original subscript and superscript exchanging roles (rows exchanged for columns in the 3x3 matrix)!– That is (NQM )
-1 MQN
• Using a Q matrix we are able to define geometries known in the M space into the N space (either way in reality!)
• These Orientations are of interest to robotics in the various ways we define the orientation problem of robot manipulation