CS I400/B659: Intelligent Robotics Rigid Transformations

download CS I400/B659: Intelligent Robotics Rigid Transformations

of 25

  • date post

    23-Dec-2015
  • Category

    Documents

  • view

    240
  • download

    1

Embed Size (px)

Transcript of CS I400/B659: Intelligent Robotics Rigid Transformations

  • Slide 1
  • CS I400/B659: Intelligent Robotics Rigid Transformations
  • Slide 2
  • 3D Rigid Objects
  • Slide 3
  • Rigid Transformation in 2D q = (t x,t y, ) with [0,2 ) Robot R 0 R 2 given in reference frame T 0 Whats the new robot R q ? {T q (x,y) | (x,y) R 0 } Define rigid transformation T q (x,y) : R 2 R 2 T q (x,y) = cos -sin sin cos xyxy txtytxty + 2D rotation matrixAffine translation
  • Slide 5
  • 3-D Rigid Rotations r 11 r 12 r 13 r 21 r 22 r 23 r 31 r 32 r 33 (1,0,0) (0,1,0) (0,0,1) (Right-handed coordinate system) det(A) = +1 Orthogonal rows and columns: A T A=I, AA T =I ||Ax|| = ||x|| for any x, L 2 norm ||.|| Product of two rotations is a rotation (1,0,0) (r 11,r 21,r 31 ) (0,0,1) (r 13,r 23,r 33 ) (r 12,r 22,r 32 )
  • Slide 6
  • Coordinate Frames (1,0,0) (0,1,0) (0,0,1) R R -1 = R T Local frame World frame
  • Slide 7
  • 3 representations Euler angles R Euler ( Axis angle R AA (v, ) Quaternion R Quat (q) All representations are equivalent but may have certain mathematical or computational advantages
  • Slide 8
  • Axis-aligned rotations cos -sin 0 sin cos 0 0 0 1 Rotate about: Z axis Y axis X axis cos 0 sin 0 1 0 -sin 0 cos 1 0 0 0 cos -sin 0 sin cos
  • Slide 9
  • Parameterization of SO(3) Euler angles: ( x yz x yz x y z x yz 1 2 3 4
  • Slide 10
  • Euler Angles Which axes to pick, and what order? Convention A,B,C R Euler ( ) = R A ( )R B ( )R C ( ) E.g., ZYZ, ZYX (roll-pitch-yaw), etc
  • Slide 11
  • Euler Angles Which axes to pick, and what order? Convention A,B,C R Euler ( ) = R A ( )R B ( )R C ( ) E.g., ZYZ, ZYX (roll-pitch-yaw), etc Disadvantages Must constrain to range of values Singularities, e.g. ZYZ when =0 or (Gimbal lock) Interpolation?
  • Slide 12
  • Axis-Angle Representation Every rotation matrix R can be obtained by rotating the identity matrix by some angle about some axis v! R v = v
  • Slide 13
  • Axis-Angle Representation Axis v (||v||=1), angle Rodrigues formula: rotate x about v -> x x = x cos + (v x x) sin + v (v T x) (1 - cos ) R AA (,v) = cos I + sin [v] + (1 - cos ) v v T Cross product matrix Or in matrix form 0 -v z v y v z 0 -v x -v y v x 0
  • Slide 14
  • Recovering Axis and Angle from the Rotation Matrix = Angle(R) = cos -1 ((r 11 +r 22 +r 33 -1)/2) = cos -1 ((tr(R)-1)/2) v = Axis(R) = 1/(2 sin ) r 32 -r 23 r 13 -r 31 r 21 -r 12
  • Slide 15
  • Properties of Axis-Angle Disadvantages: Non unique: R AA (,v)=R AA (-,-v) (can constrain to range [0, ]) 4 parameters + one unit length constraint ||v||=1; dealing with this constraint is sometimes annoying, for example, in interpolation, optimization, or sampling Unique encoding: vector w = v = ||w||, v = w/||w|| Exponential map R EM (w) = R AA ( ||w||, w/||w|| )
  • Slide 16
  • Quaternion representation Generalization of complex numbers Complex z=z 0 +i z 1, with |z|=1 can represent a 2D rotation. Whats the 3D analogue? Quaternions were a forerunner of vectors and were once mandatory of all students of physics and math! q = q 0 +q 1 i + q 2 j +q 3 k, where i 2 = j 2 = k 2 = -1 i = jk = -kj j = ki = -ik k = ij = -ji
  • Slide 17
  • Unit quaternion representation q = (q 0,q 1,q 2,q 3 ), ||q||=1 Related to axis angle: q = (cos /2,v x sin /2, v y sin /2, v z sin /2) R Q (q) = 2(q 0 2 +q 1 2 )-12(q 1 q 2 -q 0 q 3 )2(q 1 q 3 +q 0 q 2 ) 2(q 1 q 2 +q 0 q 3 ) 2(q 0 2 +q 2 2 )-1 2(q 2 q 3 -q 0 q 1 ) 2(q 1 q 3 -q 0 q 2 ) 2(q 2 q 3 +q 0 q 1 ) 2(q 0 2 +q 3 2 )-1
  • Slide 18
  • Properties of Unit Quaternions 4-sphere: 3D manifold in 4D space Non-unique: Double cover of SO(3) Advantages (widely used in computer animation): Quaternion multiplication = rotation composition (slightly faster than matrix *) Curve interpolation formulas (Shoemake, 85)
  • Slide 19
  • Summary Rotation matrix 9 parameters R ij in range [-1,1] Constraint: determinant +1 Advantages: composition, inversion are easy Euler angles 3 parameters ( in range [0,2 ) Axes picked by convention (e.g., Roll-Pitch-Yaw) Advantages: no constraints, simple interpolation works Disadvantages: multiple representation, singularities, composition & inversion not easy Axis-angle 4 parameters ( v), in [0, Constraint: |v|=1 Advantages: inversion is easy Disadvantages: constraint, composition & interpolation not easy, multiple representation at Moment representation (aka exponential map) 3 parameters w (= v), ||w||
  • Rotation in Motion Interpolating between two rotation matrices A and B We want a path X(s) : [0,1] -> SO(3) with R(0) = A and R(1) = B Let v = Axis(A T B), = Angle(A T B) Verify that X(s) = A R AA (s,v) satisfies the desired properties Actually a geodesic in SO(3)!
  • Slide 22
  • Angular Velocities in 2D
  • Slide 23
  • Angular Velocities in 3D For parameterized rotation trajectory R EM (wt), we can show: d/dt R EM (wt) = [w] R EM (wt) => |w| is the speed of rotation [w] is the cross product matrix => w x x is the velocity of some point x, specified in world coordinates, attached to the frame as it rotates => w is the angular velocity
  • Slide 24
  • Recap Multiple representations of SO(3) All four implemented robustly in C++ in KrisLibrary Rotation matrix, axis angle, moment representations are implemented in Python klampt.so3 module Notion of distance, geodesic, speed in SO(3)
  • Slide 25
  • Next Weel Read Principles Ch. 3.8 Optional: A Mathematical Introduction to Robotic Manipulation, Ch. 3.1-4 http://www.cds.caltech.edu/~murray/mlswiki/?title=First_edition