Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Euclidean vector wikipedia , lookup
Laplace–Runge–Lenz vector wikipedia , lookup
Cayley–Hamilton theorem wikipedia , lookup
Orthogonal matrix wikipedia , lookup
Covariance and contravariance of vectors wikipedia , lookup
Rotation matrix wikipedia , lookup
Matrix multiplication wikipedia , lookup
The Concepts of Orientation/Rotation ‘Transformations’ ME 4135 -- Lecture Series 2 Fall 2011, Dr. R. Lindeke 1 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 2 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,c p,q,v,w,y,z ω,α,θ,δ,φ F,M,J iˆ, ˆj , kˆ, Iˆ, Jˆ , Kˆ ON 3 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 G B G B G B TB (or alternatively) T TG (or alternatively) T 4 Symbol Interpretation • Left “Superscript” on a vector indicates frame vector is expressed in G r G rP – 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 5 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 G B P r 6 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 For more symbolic interpretations see the text Preface and lists at the end of each chapter! G B B2 G B 1 7 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) 8 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 G r will develop an Orientation Transform to do this (Q) • It is based in the “Inner Product” approach to geometric relationships Qrot ,angle r B 9 Simple (single axial) Rotational Transformations • About Z axis (by or rad): • About Y axis (by or rad): • About X axis (by or rad): QZ , Cos Sin 0 Sin 0 Cos 0 , about ZG 0 1 QY , Cos 0 Sin Sin 1 0 , about YG 0 Cos QX , 0 0 1 0 Cos 0 Sin Sin , about XG Cos 0 10 A Plan View of a “Pure” Z-Rotation 11 By Inner Products Meaning: ri xi iˆ yi ˆj zi kˆ G r X Iˆ Y Jˆ Z Kˆ B i i i i by Inner Products these two definitions are related: X i Iˆ ri Iˆ xi iˆ Iˆ yi ˆj Iˆ zi kˆ Y Jˆ r Jˆ x iˆ Jˆ y ˆj Jˆ z kˆ i i i i i Z i Kˆ ri Kˆ xi iˆ Kˆ yi ˆj Kˆ zi kˆ 12 Leading to matrix Form: Iˆ iˆ Iˆ ˆj Xi Y ˆ iˆ ˆ ˆj J J i ˆ iˆ K ˆ ˆj K Zi and by definition: Iˆ kˆ xi Jˆ kˆ yi ˆ ˆ k ki K a b a b cos a to b Here (example Z rotation): Iˆ to iˆ while Iˆ iˆ 1 so Iˆ iˆ 1 1 Cos ( ) Cos ( ) 13 Considering other terms: Considering Iˆ ˆj Iˆ to ˆj 90 & Iˆ iˆ 1 Iˆ Iˆ ˆj 11 Cos (90 ) ˆj Cos (90)Cos Sin(90) Sin Iˆ ˆj 0 Cos 1 Sin Sin And so on … Until we achieve the original QZ, Matrix 14 These Homogenous Transformation Matrices – A Physical Interpretation 1. A representation of a Coordinate Transformation relating the coordinates of a point ‘P’ between 2 likegeometrid (-- 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 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? 16 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 coincident • Looking at the first rotation we can build a rotational matrix: Cos 45 Sin 45 0 Qz ,45 Sin 45 Cos 45 0 0 0 1 .707 .707 0 Qz ,45 .707 .707 0 0 0 1 Thus : r Qz ,45 G B P1 5 17.678 5 30 24.749 where 30 is B r P1 10 10 10 17 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: 0 0 1 G QX ,45 0 Cos 45 Sin 45 0 Sin 45 Cos 45 0 0 1 G QX ,45 0 0.707 0.707 0 0.707 0.707 we seek: 17.678 17.678 G ' P1 GQX ,45 24.749 10.429 10 24.571 18 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 Cos 90 0 Sin 90 G QY ,90 0 1 0 Sin 90 0 Cos 90 0 0 1 G QY ,90 0 1 0 1 0 0 "Moving" the Body Point to: G P1" GQY ,90 17.678 24.571 10.429 10.429 24.571 17.678 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? 19 Turns out we can Multiply the 3 “back to back” – in reverse order to accomplish it! G QZ X Y GQY , G QZ X Y ( is 90, is 45, is 45) Cos 0 Sin 0 0 0 1 1 0 .4998 .4998 .707 G QX , Sin 1 0 0 Cos 0 1 1 0 0 0 0 .4998 .4998 .707 G QZ , 0 1 0 Cos 0 Sin 0 0 .707 .707 .707 .707 .707 .707 0 Cos Sin Sin Sin Cos Cos 0 0 .707 .707 0 .707 .707 0 0 0 1 0 0 0 1 20 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!) 21 Physical Focus on the Product Matrix xB XG YG ZG yB zB .500 .500 .707 .500 .500 .707 .707 .707 0 • 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 22 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” 23 What will it look like? G ? QZ X Y GQZ ,45 Cos Sin 0 .707 .707 0 .500 .500 .707 Sin Cos 0 .707 .707 0 .500 .500 .707 B1 QX ,45 B2 QY ,45 0 1 0 0 Cos 0 Sin 0 0 Cos Sin 0 1 0 1 0 Sin Cos Sin 0 Cos 0 1 0 0 0 0 1 0 0 .707 .707 0 1 0 1 0 .707 .707 1 0 0 0.707 .707 0 24 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! 25 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 26 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 27 Considering Euler Angles Initial Z rotation leads to orientation B’ Final Z rot leads to the final orientation B‴ Secondary X rotation Leads to orientation B” 28 A last thought about these Q matrices • The inverse of the matrix is simply its transpose! R11 R12 R13 QB R21 R22 R31 R32 then we find: G R23 R33 R11 R21 G QB Inverse R12 R22 R13 R23 "transposed" since: G QB Inverse BQG R31 R32 R33 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 29 defined 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 30 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 31