vectors matrices rotations why are we studying this
play

Vectors, Matrices, Rotations Why are we studying this? You want to - PowerPoint PPT Presentation

Vectors, Matrices, Rotations Why are we studying this? You want to put your hand on the cup Suppose your eyes tell you where the mug is and its orientation in the robot base frame (big assumption) In order to put your hand on the


  1. Vectors, Matrices, Rotations

  2. Why are we studying this? You want to put your hand on the cup… • Suppose your eyes tell you where the mug is and its orientation in the robot base frame (big assumption) • In order to put your hand on the object, you want to align the coordinate frame of your hand w/ that of the object • This kind of problem makes representation of pose important...

  3. Why are we studying this? Puma 500/560

  4. Why are we studying this?

  5. Why are we studying this?

  6. Representing Position: Vectors

  7. Representing Position: vectors p = [ 2 ] y 5 (“column” vector) p 2 [ ] = p 2 5 (“row” vector) x 5 y 2 p     = p 5   x   2   z

  8. Representing Position: vectors The “a” reference frame p 2 5 Basis vectors – unit vectors (length of magnitude 1) – orthogonal (perpendicular to each other) Vector p in written in a reference frame

  9. What is this unit vector you speak of? These are the elements of p : b ˆ y Vector length/magnitude: 2 b ˆ x 5 Definition of unit vector: You can turn an arbitrary vector p into a unit vector of the same direction this way:

  10. And what does orthogonal mean? ⋅ = + a b a b a b First, define the dot product: x x y y = cos( θ a b ) b ⋅ b = = a 0 a 0 when: = or, b 0 θ ( ) ˆ a θ = cos 0 or, Unit vectors are orthogonal iff (if and only if) the dot product is zero: is orthogonal to iff

  11. A couple of other random things b ˆ y n R Vectors are elements of 2 b ˆ b x 5 y y z x x z right-handed left-handed coordinate frame coordinate frame

  12. The importance of differencing two vectors The hand needs to make a Cartesian displacement of this much to reach the object

  13. The importance of differencing two vectors b The hand needs to make a Cartesian displacement of this much to reach the object

  14. Representing Orientation: Rotation Matrices • The reference frame of the hand and the object have different orientations • We want to represent and difference orientations just like we did for positions…

  15. Before we go there – review of matrix transpose a a a a a a     11 12 13 11 21 31     = A a a a T = A a a a   21 22 23   12 22 32   a a a     a a a   31 32 33 13 23 33 a a a   11 12 13   a a a   21 22 23   a a a   31 32 33 5   ( ) T T T [ ] = A B BA Important property: = 2 T p = p 5 2    

  16. and matrix multiplication… a a   b b   11 12 = A 11 12 = B     a a b b     21 22 21 22 + + a a b b a b a b a b a b       11 12 11 12 11 11 12 21 11 12 12 22 = = AB       + + a a b b a b a b a b a b       21 22 21 22 21 11 22 21 21 12 22 22 Can represent dot product as a matrix multiply: b   [ ] x T ⋅ = + = = a b a b a b a a a b   x x y y x y b   y

  17. Same point - different reference frames a ˆ y b ˆ y 3 . 8 p 2 a ˆ x 5 3 . 8 b ˆ x 5   3 . 8   a = 2 p b = p     3 . 8    

  18. Another important use of the dot product: projection b θ ˆ a l = ˆ ⋅ = ˆ θ = θ l a b a b cos( ) b cos( )

  19. Another important use of the dot product: projection b Another way of writing the dot product θ ˆ a l = ˆ ⋅ = ˆ θ = θ l a b a b cos( ) b cos( )

  20. Same point - different reference frames a y a y ˆ B-frame’s y axis written b in A frame 3 . 8 p 2 a x 5 3 . 8 a x ˆ b B-frame’s x axis written in A frame

  21. Same point - different reference frames a y a y ˆ B-frame’s y axis written b in A frame 3 . 8 a p 2 a x θ 5 3 . 8 a x ˆ b B-frame’s x axis written in A frame

  22. Same point - different reference frames a y a y ˆ B-frame’s y axis written b in A frame 3 . 8 a p 2 a x 5 3 . 8 a x ˆ b B-frame’s x axis written in A frame

  23. Same point - different reference frames A y A ˆ where: y B 3 . 8 or p 2 A x 5 3 . 8 A x ˆ B

  24. The rotation matrix To recap: where:

  25. The rotation matrix To recap: where: We will write: so: Notice the way the notation “cancels out” But, can we do this: ???

  26. The rotation matrix But, can we do this: ??? Multiply both sides by inverse: It turns out that: because the columns of are unit, orthogonal

  27. The rotation matrix But, can we do this: ??? Multiply both sides by inverse: It turns out that: This is important! because the columns of are orthogonal

  28. The rotation matrix So, if: Then:

  29. The rotation matrix Both columns are orthogonal But: So, the rows are orthogonal too!

  30. The rotation matrix Both columns are orthogonal The same matrix can be understood both ways! But: So, the rows are orthogonal too!

  31. Example 1: rotation matrix a ˆ y b ˆ y b ˆ x θ a ˆ θ x ( ) θ cos   ( ) ( ) θ − θ  cos sin  ( ) a x ˆ b =    )  ( a a a   = ˆ ˆ = R x y θ sin  )  ( ) (   b b b θ θ sin cos   ( ) ( ) ( ) θ θ cos sin − θ   sin  a y   b R ˆ b = =    )   )  ( ( ) ( θ a cos − θ θ sin cos    

  32. Example 2: rotation matrix ( ) A A A A = ˆ ˆ ˆ R x y z A y B B B B       0   1 1       2   2 A R =  −  0 1 0       B z B           − 0 1 1   A     x   2 2  45   0 1 1   A z 2 2 B x A R = − 0 1 0   B y B   − 0 1 1   2 2

  33. Example 3: rotation matrix ˆ z ˆ x a b ˆ z b ˆ y ˆ y b a φ θ ˆ x a     − − − c c s c c c c s c s     θ φ θ θ θ φ θ θ φ π φ + 2   a = = − R c s c c s c  s c c s s  θ φ θ θ θ φ θ θ φ π φ +     2   s 0 s s 0 c     φ φ φ π φ + 2

  34. Rotations about x, y, z ( ) ( ) α − α cos sin 0     ( ) ( ) ( ) α = α α R sin cos 0   z   0 0 1   ( ) ( ) β β cos 0 sin     ( ) β = R 0 1 0   y  )  ( ) ( − β β sin 0 cos   1 0 0     ( ) ( ) ( ) γ = γ − γ R 0 cos sin   x  ( )  ( ) γ γ 0 sin cos   These rotation matrices encode the basis vectors of the after- rotation reference frame in terms of the before-rotation reference frame

  35. Remember those double-angle formulas… ( ) ( ) ( ) ( ) ( ) θ ± φ = θ φ ± θ φ sin sin cos cos sin ( ) ( ) ( ) ( ) ( ) θ ± φ = θ φ  θ φ cos cos cos sin sin

  36. Example 1: composition of rotation matrices a ˆ y b ˆ y c ˆ y θ θ 1 2 p a ˆ x A A B R = R R C B C b ˆ x c ˆ x ( ) ( ) ( ) ( ) θ − θ θ − θ − − −  cos sin   cos sin   c c s s c s s c  1 1 2 2 1 2 1 2 1 2 1 2 a       = = R c       ( ) ( ) ( ) ( ) θ θ θ θ + − sin cos sin cos s c c s c c s s       1 1 2 2 1 2 1 2 1 2 1 2 −  c s  12 12 =     s c   12 12

  37. Example 2: composition of rotation matrices ˆ z ˆ x a c ˆ y a φ ˆ x b θ ˆ x a − c s 0      −  c 0 s c 0 s θ θ       − φ − φ φ φ a = R b s c 0 b   = = R c 0 1 0 0 1 0     θ θ       0 0 1   − s 0 c s 0 c     − φ − φ φ φ

  38. Example 2: composition of rotation matrices ˆ z ˆ x a c ˆ y a φ ˆ x b θ ˆ x a     − − − − c s 0 c 0 s c c s c s       θ θ φ φ θ φ θ θ φ   a a b = = = − R R R s c 0  0 1 0   s c c s s    c b c θ θ θ φ θ θ φ       0 0 1 s 0 c s 0 c       φ φ φ φ

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend