Chapter 2 Math Fundamentals

Similar documents
CSE 167: Introduction to Computer Graphics Lecture #2: Linear Algebra Primer

PHYS 705: Classical Mechanics. Rigid Body Motion Introduction + Math Review

CSE 167: Introduction to Computer Graphics Lecture #2: Linear Algebra Primer

Linear Algebra Primer

Jim Lambers MAT 610 Summer Session Lecture 1 Notes

Linear Algebra March 16, 2019

Systems of Linear Equations and Matrices

Systems of Linear Equations and Matrices

Minimal representations of orientation

Elementary maths for GMT

MATH 315 Linear Algebra Homework #1 Assigned: August 20, 2018

Chapter 7. Linear Algebra: Matrices, Vectors,

Chapter Two Elements of Linear Algebra

Linear Algebra for Machine Learning. Sargur N. Srihari

Equality: Two matrices A and B are equal, i.e., A = B if A and B have the same order and the entries of A and B are the same.

Homogeneous Transformations

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz

COMP 175 COMPUTER GRAPHICS. Lecture 04: Transform 1. COMP 175: Computer Graphics February 9, Erik Anderson 04 Transform 1

Linear Algebra Homework and Study Guide

Mobile Robotics 1. A Compact Course on Linear Algebra. Giorgio Grisetti

MATH 221: SOLUTIONS TO SELECTED HOMEWORK PROBLEMS

Elementary Linear Algebra

Ridig Body Motion Homogeneous Transformations

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Bastian Steder

Math review. Math review

Position and orientation of rigid bodies

Notes on Mathematics

MCE/EEC 647/747: Robot Dynamics and Control. Lecture 2: Rigid Motions and Homogeneous Transformations

Linear Algebra Review. Fei-Fei Li

MATH 304 Linear Algebra Lecture 20: Review for Test 1.

Chapter 1. Matrix Algebra

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

a11 a A = : a 21 a 22

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Dot Products. K. Behrend. April 3, Abstract A short review of some basic facts on the dot product. Projections. The spectral theorem.

Linear Algebra and Matrix Inversion

MIT Final Exam Solutions, Spring 2017

Math Camp II. Basic Linear Algebra. Yiqing Xu. Aug 26, 2014 MIT

Eigenvalues and Eigenvectors

EE731 Lecture Notes: Matrix Computations for Signal Processing

Knowledge Discovery and Data Mining 1 (VO) ( )

Linear Algebra. Linear Equations and Matrices. Copyright 2005, W.R. Winfrey

Math Linear Algebra Final Exam Review Sheet

Jordan normal form notes (version date: 11/21/07)

Matrix & Linear Algebra

BASIC NOTIONS. x + y = 1 3, 3x 5y + z = A + 3B,C + 2D, DC are not defined. A + C =

GG303 Lecture 6 8/27/09 1 SCALARS, VECTORS, AND TENSORS

YORK UNIVERSITY. Faculty of Science Department of Mathematics and Statistics MATH M Test #1. July 11, 2013 Solutions

Foundations of Matrix Analysis

Vector Spaces, Orthogonality, and Linear Least Squares

MATH2210 Notebook 2 Spring 2018

SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to Linear Algebra

MTH Linear Algebra. Study Guide. Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Cyrill Stachniss, Maren Bennewitz, Diego Tipaldi, Luciano Spinello

APPENDIX A. Background Mathematics. A.1 Linear Algebra. Vector algebra. Let x denote the n-dimensional column vector with components x 1 x 2.

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

APPENDIX: MATHEMATICAL INDUCTION AND OTHER FORMS OF PROOF

Fundamentals of Linear Algebra. Marcel B. Finan Arkansas Tech University c All Rights Reserved

6 Inner Product Spaces

1. General Vector Spaces

Introduction to Matrix Algebra

LINEAR SYSTEMS AND MATRICES

Math 321: Linear Algebra

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

Elementary Linear Algebra Review for Exam 2 Exam is Monday, November 16th.

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

Definition 5.1. A vector field v on a manifold M is map M T M such that for all x M, v(x) T x M.

APPM 3310 Problem Set 4 Solutions

A Review of Matrix Analysis

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

MATH 240 Spring, Chapter 1: Linear Equations and Matrices

Linear Algebra and Robot Modeling

A Brief Outline of Math 355

Linear Algebra. Solving Linear Systems. Copyright 2005, W.R. Winfrey

CHAPTER 6. Direct Methods for Solving Linear Systems

Lecture Notes in Linear Algebra

Math 3108: Linear Algebra

Lagrange Multipliers

Artificial Intelligence & Neuro Cognitive Systems Fakultät für Informatik. Robot Dynamics. Dr.-Ing. John Nassour J.

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

[3] (b) Find a reduced row-echelon matrix row-equivalent to ,1 2 2

3 Matrix Algebra. 3.1 Operations on matrices

Introduction to Quantitative Techniques for MSc Programmes SCHOOL OF ECONOMICS, MATHEMATICS AND STATISTICS MALET STREET LONDON WC1E 7HX

STEP Support Programme. STEP 2 Matrices Topic Notes

Rotational Motion. Chapter 4. P. J. Grandinetti. Sep. 1, Chem P. J. Grandinetti (Chem. 4300) Rotational Motion Sep.

1. Let m 1 and n 1 be two natural numbers such that m > n. Which of the following is/are true?

Chapter 3 Numerical Methods

Linear Algebra. Preliminary Lecture Notes

Chapters 5 & 6: Theory Review: Solutions Math 308 F Spring 2015

Properties of Transformations

Rigid Geometric Transformations

11 a 12 a 21 a 11 a 22 a 12 a 21. (C.11) A = The determinant of a product of two matrices is given by AB = A B 1 1 = (C.13) and similarly.

Linear Algebra. Preliminary Lecture Notes

MATH 1120 (LINEAR ALGEBRA 1), FINAL EXAM FALL 2011 SOLUTIONS TO PRACTICE VERSION

Linear Algebra V = T = ( 4 3 ).

Vectors To begin, let us describe an element of the state space as a point with numerical coordinates, that is x 1. x 2. x =

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Conceptual Questions for Review

Transcription:

Chapter 2 Math Fundamentals Part 1 2.1 Conventions and Definitions 2.2 Matrices 2.3 Fundamentals of Rigid Transforms 1

Outline 2.1 Conventions and Definitions 2.2 Matrices 2.3 Fundamentals of Rigid Transforms Summary 2

Outline 2.1 Conventions and Definitions 2.1.1 Notational Conventions 2.1.2 Embedded Coordinate Frames 2.2 Matrices 2.3 Fundamentals of Rigid Transforms Summary 3

Physical Quantities Mechanics is about properties of / relations between objects. a is r-related to b r property of a relative to b Example velocity (v) of robot (r) relative to earth (e): Relationship is directional and (often) asymmetric. b rr aa bb vv rr ee rr aa bb rr bb aa r a 4

Properties? r is not quite a property of a. the velocity of an object is not defined. It s a property of a relative to b. a and b are real objects. In rare instances, we do not need a b. unit vectors always of length 1. rr aa bb z x y z x y 5

Vectors, Matrices, and Tensors With one exception (e.g. c light ) all require a datum (def n of zero). May be scalars (density), vectors (velocity), tensors (_?_). All are tensors of varying order. We write: ρρ bbbbbbbb rr bbbbbbbb vv bbbbbbbb aa bbbbbbbb II bbbbbbbb The vectors at least can be of 1, 2, or 3 dimensions. 6

Frames of Reference and Coordinate Systems Objects of interest are real: wheels, sensors, obstacles. Abstract them by sets of axes fixed to the body. These axes: Have a state of motion Can be used to express vectors. Call them coordinate frames. x Reference Frame Coordinate System y z 7

Coordinate Frames Points possess position but not orientation: Particle (orientation undefined) Rigid Bodies possess position and orientation: Ball (can rotate) A rigid body: does not have one position. does have one orientation 8

Outline 2.1 Conventions and Definitions 2.1.1 Notational Conventions 2.1.2 Embedded Coordinate Frames 2.2 Matrices 2.3 Fundamentals of Rigid Transforms Summary 9

Vectors and Coordinates Many laws of physics relate vectors and hold regardless of coordinate system. Notation: rr is expressed in some coordinate system. rr is coordinate system independent. c b a 10

Vectors and Coordinates Vectors of physics are coordinate system independent: c a + b Tool World Addition is defined geometrically. c a b 11

Vectors and Coordinates Vectors of linear algebra are coordinate system dependent: c a + b c x a x + b x c y a y b y Addition is defined algebraically. A relation to physical vectors (directed line segments) requires a coordinate system. 12

Free and Bound Transformations Distinguishes what happens when the reference frame changes. Bound: the vector may change and its expression may change. Transformation of frame of reference (physics). Free: the vector remains the same and its expression may change Transformation of coordinates (mathematics). a a r p p rb p b a r p 13

c Notational Conventions d o r o c d r r relationship / property o object to which property is attributed d object serving as datum c object providing the coordinate system 14

Box 2.1 Notation for Physical Quantities rr aa : the r property of a expressed in the default coordinate system associated with object a. rr aa bb : the r property of a relative to b in coordinate system independent form. rr aa bb : the r property of a relative to b expressed in the default coordinate system associated with object b. cc rraa bb : the r property of a relative to b expressed in the default coordinate system associated with object c. 15

16

Sub/Super Scripts Physics Vectors Leading subscripts denote the frame/ object possessing the vector quantity: Leading superscripts denote the frame/object with respect to which the quantity is measured (i.e. the datum): world v ball v ball train v ball + world v train World 17

Sub/SuperScripts LA Vectors Leading subscripts denote the object frame possessing the quantity: v wheel Leading superscripts denote the datum (also the implied coordinate system within which the quantity is expressed). world v wheel Trailing superscripts denote the coordinate system, and leading denotes datum when necessary. body wheel vworld 18

Notational Conventions Position vectors: r xyz T Also sometimes as r or as r to emphasize it is a vector. Matrices: t xx t xy t xz T t yx t yy t yz t zx t zy t zz 19

Why All The Fuss? Accelerometer: acceleration of the sensor wrt inertial space: Strapdown: acceleration of the sensor wrt inertial space referred to body coordinates: Nav Solution: Acceleration of the body wrt earth referred to earth coordinates: i a s b ai s e ae b 20

WMR kinematics are much easier to do in the body frame. Velocity of the front right wheel wrt the earth ( world ) frame: Velocity of front right wheel wrt earth referred to body coordinates: b e Why All The Fuss? v fr e v fr e e v fr 21

Why All The Fuss? b vw fr e v fr Coordinate system may be unrelated to either the object or the datum. So you need a third symbol to be precise. e w 22

Converting Coordinates r b T a b r a T a b We will see later that notation satisfies our conventions where it means the T property of object a wrt object b. 23

Outline 2.1 Conventions and Definitions 2.2 Matrices 2.3 Fundamentals of Rigid Transforms Summary 24

Tensors For our purposes, these are multidimensional arrays: Consider T(I,j,k) to be a 3D box of numbers. Suppose it is 3X3X3, then there are three slices extending out of the page. T 2 3.6 7 1 T 2 3 5 12 T 3 7 9.2 18 8 4.3 0 4 2 1 8 4 0 13 T213 [,, ] T2 [ ][ 1] [ 3] t 213 12 25 25

Block Notation: Some Notation A A 11 A 12 A 21 A 22 Tensor Notation: A [.. ] means a set that can be arranged in a rectangle that is ordered in each dimension. a ijk 26 26

Vector dot product: Also written Matrix multiplication: Operations Dot product of i-th row and j-th column a b a T b k a k b k C AB [ c ij ] a ik b kj k Cross product Also written: c a b c a b a X b a y b z a z b x a x b y a z b y a x b z a y b x Skew matrix a a z 0 a x X 0 a z a y a y a x 0 27 27

Operations 2.2.1.7 Outer Product: c ab a y b x a y b y a y b z T a x b x a x b y a x b z a z b x a z b y a z b z 2.2.1.8 Block Multiplication: A A 11 A 12 B A 21 A 22 B 11 B 12 B 21 B 22 AB A 11 B 11 + A 12 B 21 A 11 B 12 + A 12 B 22 A 21 B 11 + A 22 B 21 A 21 B 12 + A 22 B 22 28 28

2.2.1.9 Linear Mappings Of course, this is: y Ax every element of y depends on every element of x in a linear manner. Two views: A operates on x : y is the list of projections of x on each row of A. mx1 mxn x operates on A : y is a weighted sum of the columns of A. x is the weights. nx1 A turns x into y or x collapses A s rows to produce y 29 29

2.2.2 Matrix Functions Function of a scalar: A() t a 11 ()a t 12 () t a 21 ()a t 22 () t a ij () t Function of a vector: Ax ( ) a 11 ( x) a 12 ( x) a 21 ( x) a 22 ( x) a ij ( x) 30 30

Exponentiation Powers of matrices automatically commute: A 3 AA ( 2 ) ( A 2 )A AAA Hence, we can define matrix polynomials : Y AX 2 + BX+ C Not so useful in practice but: Y ax 2 +bx +c (scalar coefficients) is super useful. 31 31

Arbitrary Functions of Matrices Recall the Taylor Series: df d f d f fx ( ) f0 ( ) + x dx + ---- 2! d + ---- x 3! d + x 0 0 Taylor series for exponential function: e x Hence, define the matrix exponential as: 0 x 2 2 x 2 x 3 x 3 exp( x) 1 + x + ---- + ---- + 2! 3! A 3 exp( A) I + A+ A2 ------ + ------ + 2! 3! 3 32 32

2.2.3 Matrix Inversion & Inverse Mapping Matrix inverse defined s.t.: A 1 A I Therefore: y A 1 Ax x A 1 x A 1 y 33 33

2.2.3.2 Determinant Scalar-valued function of a matrix. det ( A ) Matrix not invertible if distinct inputs map to same output. Determinant measures: Volume spanned by rows of A. Ratio of the volumes spanned by two input and the associated two output vectors. ab ad cd Matrix A (c,d) (a,b) cb 34 34

2.2.3.3 Rank Rank dimension of largest invertible submatrix Unlike determinant, defined for nonsquare matrices. A nonsquare matrix can have a rank no larger than the smaller of its two dimensions. The rank of a matrix product cannot exceed the minimum of the ranks of the two operands. For an mxn matrix A with (m < n) Rank m is of full rank Rank < m is rank deficient For an n X n matrix A: Rank n nonsingular, invertible Rank < n singular, noninvertible 35 35

2.2.3.4 Positivity A square matrix A is called positive definite if: x T Ax > 0 x 0 Matrix equivalent to positive scalars: E.g. sum of two pos def. matrices is pos. def. Covariance, inertia, are always positive definite (in absence of bugs). f(x)x T Ax is a parabloid in n dimensions. 36 36

2.2.3.5 Homogeneous Linear Systems Special form of system: AAxx 0 Is called a homogeneous system. When AA is nonsingular, the solution is, of course: xx AA 1 00 If AA is singular, there are an infinite number of nonzero solutions and xx is in the nullspace of A (see below for more on nullspace). 37

2.2.3.6 Eigenvalues and Eigenvectors The vector ee is an eigenvector of AA when it satisfies: AAee λλee For some scalar λλ called the eigenvalue associated with ee. To solve, rewrite first equation as: λλii AA ee 0 Therefore, for this homogeneous system, nonzero ee implies: dddddd λλλλ AA 0 38

Consider: 2.2.4 Subspaces yy AAxx ; AA R mm nn Range or columnspace of AA, denoted C AA is the set of all possible values for yy R mm 1. equivalently all possible linear combinations of columns of A The rowspace of AA, denoted R AA is the set of all vectors xx R nn 1 for which yy AAxx 0. equivalently all possible linear combinations of the rowsof A. The nullspace of AA, denoted N AA is the set of all vectors xx R nn 1 for which yy AAxx 0. Its rank is called nullity. 39

2.2.4 Rank Nullity Theorem Every vector in the rowspace is orthogonal to every vector in the nullspace: RR(AA) NN(AA) The union of these two subspaces of R nn is R nn. RR AA NN AA R nn The dimensions of these two sum to m: rrrrrrrr AA + nnnnnnnnnnnnnn AA nn 40

2.2.5.3 Blockwise Matrix Elimination Given: AB CD x A x B y A y B n m n m n n m n 1 1 n m Assuming A is invertible, multiply first block row by CA -1 : C CA 1 B C D x A CA 1 x B y A Subtract two blocks of m rows to produce: Solve for x B and substitute into original 1st equation to get x A. y B ( D CA 1 B)x B y B CA 1 y A 41 41

This is: 2.2.5.4 Matrix Inversion Lemma [ A BD 1 C ] 1 A 1 A 1 Derived in the text using block matrix inversion. The matrix inversion on left is nxn. The one on the right is mxm. Therefore, the inversion lemma is less work. Often m1 so its a lot less work. Special case is the Sherman Morrison formula often used to give a rank 1 update to an inverse. Kalman filter is based on this. + B[ D CA 1 B] 1 CA 1 42 42

2.2.6.2 Expansion Operations Derivative of a matrix with respect to a vector is a 3 rd order tensor. Y( x) x yij ( x) x k Each k is a different matrix [y ij ]: Use this to perturb a matrix-valued function: Y Y( x) x x 43 43

2.2.6.4 Product Rules - 1 Derivative of a matrix product w.r.t a scalar: Cx ( ) { Ax ( )Bx ( )} { Ax ( )}Bx ( ) + Ax ( ) { Bx ( )} x x x x Example: d{ xt () T Ax() t } dt x TAx + x T Ax 44 44

2.2.6.7 Product Rules - 2 Derivative of a matrix product w.r.t a vector: Cx ( ) { Ax ( )Bx ( )} x Ax ( )Bx ( ) + A( x) Bx ( ) x x Examples: { a T x} a T x { x} { Ix} x x { x T Ax } x x T A T I + x T A { x T A} x A T { x T a} x a T { x T } { x T I} x x I 45 45

2.2.6.8 Names and Notation for Derivatives 46

Outline 2.1 Conventions and Definitions 2.2 Matrices 2.3 Fundamentals of Rigid Transforms 2.3.1 Definitions 2.3.2 Why Homogeneous Transforms 2.3.3 Semantics and Interpretations Summary 47

2.3.1 Affine Transformation Most general linear transformation x 2 r 11 r 12 x 1 t + 1 y 2 r 21 r 22 y 1 t 2 R s and t s are the transform constants Can be used to effect translation, rotation, scale, reflections, and shear. Preserves linearity but not distance (hence, not areas or angles). 48

2.3.1 Homogeneous Transformation Set t1 t2 0: Homogeneous x 2 r 11 r 12 x 1 y 2 r 21 r 22 y 1 + nothing r s are the transform constants Can be used to effect rotation, scale, reflections, and shear (not translation). Preserves linearity but not distance (hence, not areas or angles). 49

2.3.1 Orthogonal Transformation Looks the same but: x 2 r 11 r 12 x 1 y 2 r 21 r 22 y 1 r 11 r 12 + r 21 r 22 0 r 11 r 11 + r 21 r 21 1 r 12 r 12 + r 22 r 22 1 But: Can be used to effect rotation. Preserves linearity and distance (hence, areas and angles). 50

Outline 2.1 Conventions and Definitions 2.2 Matrices 2.3 Fundamentals of Rigid Transforms 2.3.1 Definitions 2.3.2 Why Homogeneous Transforms 2.3.3 Semantics and Interpretations Summary 51

2.3.2 Homogeneous Coordinates Coordinates which are unique up to a scale factor. i.e x 6x 12 x 3.14 x same thing The numbers in the vectors are not the same but we interpret them to mean the same thing (in fact, the thing whose scale factor is unity). w1 w r r x --- y w w --- z w --- 1 T xyzw T 52

Pure Directions Its also possible to represent pure directions Pure in the sense they are everywhere (i.e. have no position and cannot be moved). We use a scale factor of zero to get a pure direction: d It will shortly be clear why this works. x y z 0 53

Why Bother? Points in 3D can be rotated, reflected, scaled, and sheared with 3 X 3 matrices. r' x' t xx t xy t xz x y' Tr t yx t yy t yz y z' t zx t zy t zz z But not translated. r' r + r What 3X3 matrix is Trans( r)? x 1 y 1 z 1 t xx x + t xy y + t xz z t yx x + t yy y + t yz z t zx x + t zy y+ t zz z + x y z 54

Trick: Move to 4D x x 100 x x r' r+ r y + y 010 y y z z 001 z z 1 1 000 1 1 Trans( r)r x 1 x + x y 1 y+ y z 1 z+ z The scale factor in the vector is used to add a scaled amount of the 4 th matrix column. 55

HT Matrix Format input x y z w x output y z w 56

Outline 2.1 Conventions and Definitions 2.2 Matrices 2.3 Fundamentals of Rigid Transforms 2.3.1 Definitions 2.3.2 Why Homogeneous Transforms 2.3.3 Semantics and Interpretations Summary 57

Trig Function Shorthand sin(θ) sθ cos(θ) cθ tan(θ) tθ sin(θ 1 )cos(θ 2 ) sθ 1 cθ 2 s1c2 sin(θ 1 +θ 2 ) sθ 1 θ 2 s12 58

Mapping: Operators Point Point (both expressed in same coordinates) x p p z y 59

Operators p x p Transuvw (,, ) 100u 010v 001w 0001 z y 60 Note capital T in Trans().

Operators p x p Rotx( φ) 1 0 0 0 0cφ sφ 0 0sφ cφ 0 0 0 0 1 φ z y Note capital R in Rotx(). 61

Operators y cθ 0sθ 0 p p Roty( θ ) 0 1 0 0 sθ 0cθ 0 0 0 0 1 θ x z Note capital R in Roty(). 62

Operators z cψ sψ 00 p p Rotz( ψ) sψ cψ 00 0 0 10 0 0 01 x ψ y Note capital R in Rotz(). 63

Mapping: Compound Operators Point Point (both expressed in same coordinates) Compound mapping: Point Point (still in same coordinates) Operators have fixed axis compounding semantics. 64

Example: Operating on a Point A point at the origin is translated along the y axis by v units and then the resulting point is rotated by 90 degrees around the x axis. o'' x 65 00v1 T z v o' o'' 1 0 0 0 1000 0 1 0 0 0 0 00 10 010v 0 00 10 v 0 1 0 0 0010 0 0 1 0 0 0 0 0 0 1 0001 1 0 0 0 1 1 y o'' Rotx( π 2)Trans( 0, v, 0)o 0v01 T Result 0 0 v 1

Example: Operating on a Direction The y axis unit vector is translated along the y axis by v units and then rotated by 90 degrees around the x axis. j' 0010 T z j' j ' Rotx( π 2)Trans( 0, v, 0) j 1 0 0 0 1000 0 1 0 0 0 0 00 10 010v 1 00 10 1 0 1 0 0 0010 0 0 1 0 0 0 0 0 0 1 0001 0 0 0 0 1 0 0 0 1 0 x 66 j y 0100 T Same! Having a zero scale factor disables translation.

i HTs as Coordinate Frames The columns of the identity HT can be considered to represent 3 directions and a point the coordinate frame itself. o 0001 T 1000 T x z j k 0010 T y 0100 T ijko 3 directions point { { 1000 0100 0010 0001 I 67

Example: Operating on a Frame Each resulting column of this result is the transformation of the corresponding column in the original identity matrix. 0 1 00 T k i z j 0010 T y I ' Rotx( π 2)Tra ns( 0, v, 0)I I' 10 0 0 00 10 01 0 0 00 0 1 1000 010v 0010 0001 1000 0100 0010 0001 10 0 0 00 10 01 0 v 00 0 1 x 68

Epiphany 1: HTs are Operators, and Operands, and Displacements. 1) The operator that moves points as desired also moves axes in the same way. But because the columns of an input matrix are treated independently in matrix multiplication 2) the operator also moves entire frames (4 columns) in one shot when you express them as a matrix. Note that the HT matrix can now be either operator or operand. As Operand: But because frames can be embedded to track the motions of rigid bodies. We can use this idea to computationally track the position and orientation of rigid bodies. As Operator: Every orthogonal matrix can be viewed as a displacement in translation and rotation. Can be visualized as one set of axes located with respect to another set. 69

Epiphany 2 : Operator Transformed Old Frame Notice the result is: Rotx(ππ/2) [TTTTTTTTTT(0, vv, 0) II] Which is: [Rotx(ππ/2) TTTTTTTTTT(0, vv, 0)] II Which is the compound operator: [Rotx(ππ/2) TTTTTTTTTT(0, vv, 0)] When the operand is the identity, the result is also the operator itself. 70

Epiphany 3 : Operator Transform Because the operator, like all operators, expresses the new frame in the coordinates of the original frame. 1) The operator has columns that express the new axes in the coordinates of the old ones. Because yy AAxx aa 1 xx 1 + aa 2 xx 2 + (where aa 1 is 1 st col of A) And because the columns of the operator are the transformed unit vectors and origin. Then the operator [Rotx(ππ/2) TTTTTTTTTT(0, vv, 0)] must convert coordinates from the primed frame to the unprimed frame. See below for more.. 71

Conversion of Basis Operator: the result is the movement of frame a s unit vectors ( basis ) to those of frame b. So the result must express the unit vectors of frame b in coordinates of frame a. k a j b I b a a Rotx( π 2)Trans0v0 (,, )I a 10 0 0 00 10 01 0 v k b i b 00 0 1 j a We have converted coordinates of the basis b from frame b to frame a. i a 72

Converting Frames of Reference Converting frames is about expressing the same physical point with respect to a new origin and set of unit vectors. z a z b x a r p a y a x b r p b y b p 73

Converting Coordinates Consider a general point expressed relative to frame b in the coordinates of frame b. By Definition: r p b The unit vectors can be expressed in any coordinate system we like. Choose a. r p a x p b x p b a ( i ) yb a p ( j ) z b a + + p ( k ) + o b b b ( i ) + yb p ( j ) + zb p ( k ) + b ob b b b b b b a b Origin change r p a x b a p ( I b ib ) y b a p ( I bjb ) z b a a + + p ( I bkb ) + I bob 74

This is: r p a Or more simply: Converting Coordinates [ ( i ) + yb p ( j ) + z b p ( k ) + b ob ] I b a xp b a Because I b converts the coordinates of the basis, it converts to coordinates of an arbitrary vector too: because an arbitrary vector is just a linear combination of the basis vectors. and matrices are linear operators b b r p a b b I b a rp b b b r p b 75

Operator/Transform Duality The homogeneous transform that moves frame a into coincidence with frame b (operator) also converts the coordinates (transform) of points in the opposite direction - from frame b to frame a. Because, of the opposite direction semantics, its sometimes more convenient to use the matrices which convert coordinates from frame a to frame b. These are just the matrix inverses. 76

Aligning Operations We can ask of any two frames: What operations, applied to one frame, bring it into coincidence with the other. To formulate the aligning operations. is equivalent to formulating the coordinate transformation. One of the biggest ideas in 3D kinematics. 77

Mapping: Transforms Point a Point b (same physical point) Think now of moving frame a into coincidence with frame b. z a z b p y b y a x b x a 78

Transforms x a x b z a p z b y a transuvw (,, ) y b 100 u 010 v 001 w 000 1 (u,v,w) are defined as the position of the origin of b wrt a expressed in frame a coords. Note lowercase t in trans(). 79

Note Phi and theta may need to be swapped on the following slides. 80

Transforms x a,x b p y a 81 θ y b θ z b rotx( θ) 1 0 0 0 0 cθ sθ 0 0 sθ cθ 0 0 0 0 1 z a Note lowercase r in rotx().

Transforms y a,y b rot y( φ) cφ 0 sφ 0 0 1 0 0 sφ 0 cφ 0 0 0 0 1 p z a 82 φ z b φ x b x a Note lowercase r in roty().

Transforms cψ sψ 00 z a,z b p rotz( ψ ) sψ cψ 00 0 0 10 0 0 01 x a 83 ψ x b ψ y b y a Note lowercase r in rotz().

Mapping: Compound Transforms Point a Point b (same physical point) Result expressed in frame b Compound mapping Point b Point c (same physical point) Result now expressed in frame c. Transforms have moving axis compounding semantics. Result is not expressed in the original frame but rather in the last one. 84

Example: Compound Transformation The origin of frame b has coordinates [0 0 v 1] T in frame a. Prove it. Takes two fundamental operations. Compound transforms to convert o b o a. z a y b x i z i y i Intermediate frame oa b b trans( 0, 0, v)rotx( π 2)o b z b x b v y a o b a 1000 0100 001v 0001 10 0 0 00 10 01 0 0 00 0 1 0 0 0 1 10 0 0 00 10 01 0 v 00 0 1 0 0 0 1 0 0 v 1 x a 85

Format of HTs Rotation Matrix Position Vector Perspective Scale We will not use the perspective part much 86

Inverse of a HT -1 R p R T -R T p 0 0 0 1 0 0 0 1 87

Duality Theorem Note that transforms and operators of the same name are (matrix) inverses: trans00v (,, ) Tra ns( 0, 0, v) 1 rotx( θ) Rotx( θ) 1 roty( φ) Roty( φ) 1 rotz( ψ) Rotz( ψ) 1 This implies that a sequence of transforms in one order (say, left to right) is identical to the same sequence of operators in the opposite order. The latter view is traditional in robotics. Without loss of generality, we will use operators only from now on. 88

Outline 2.1 Conventions and Definitions 2.2 Matrices 2.3 Fundamentals of Rigid Transforms 2.3.1 Definitions 2.3.2 Why Homogeneous Transforms 2.3.3 Semantics and Interpretations Summary 89

Summary Tensors are just matrices with 3 or more indices. Arbitrary functions on matrices can be defined. The row space is orthogonal to the null space. Gaussian Elimination can be performed blockwise to express solution to big problems in terms of solutions to small problems. Matrix valued functions can be differentiated with respect to scalars and vectors. Layout of resulting tensor is implicit in the latter case. 90 90

Summary An operator formed from an orthogonal HT preserves distances and hence is rigid. Homogeneous Transforms are: Operators Transforms Frames They can be both the things that operate on other things and the things operated upon. 91 91

Summary Such a 4X4 operator matrix has these properties. It rotates and/or translates points and directions and hence rotates and translates coordinate frames. Its columns represent the unit vectors and origin of the result of operating on a coordinate frame expressed in the coordinates of the original frame. It converts coordinates of points and directions from the result to the original frame. 92 92

Summary Everything is relative. There is no way to distinguish moving a point forward from moving the coordinate system backward. In both cases, the resulting (red) point has the same relationship to the redframe. 93 93