1 / 29

CS B659: Principles of Intelligent Robot Motion

CS B659: Principles of Intelligent Robot Motion. Rigid Transformations. Agenda. Principles, Ch. 3.5-8. Rigid Objects. Biological systems, virtual characters. q 2. q 1. Articulated Robot. Robot: usually a rigid articulated structure Geometric CAD models, relative to reference frames

senona
Télécharger la présentation

CS B659: Principles of Intelligent Robot Motion

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS B659: Principles of Intelligent Robot Motion Rigid Transformations

  2. Agenda • Principles, Ch. 3.5-8

  3. Rigid Objects

  4. Biological systems, virtual characters

  5. q2 q1 Articulated Robot • Robot: usually a rigid articulated structure • Geometric CAD models, relative to reference frames • A configuration specifies the placement of those frames

  6. Rigid Transformation in 2D workspace robot reference direction q ty reference point tx q = (tx,ty,q) with q [0,2p) Robot R0R2 given in reference frame T0 What’s the new robot Rq?

  7. q = (tx,ty,q) with q [0,2p) Robot R0R2 given in reference frame T0 What’s the new robot Rq?{Tq(x,y) | (x,y)  R0} Define rigid transformation Tq(x,y) : R2 R2 Rigid Transformation in 2D cos θ -sin θ sin θ cos θ x y tx ty Tq(x,y) = + 2D rotation matrix Affine translation

  8. A rotation matrix A has: det(A) = +1 Orthogonal rows and columns: ATA=I, AAT=I ||Ax|| = ||x|| for any x, L2 norm ||.|| Product of two rotations is a rotation 2D Rigid Rotations cos θ -sin θ sin θ cos θ (0,1) (cos θ, sin θ) (-sin θ, cos θ) θ (1,0)

  9. q = (tx,ty,tz,R) with R a 3x3 rotation matrix Robot R0R3given in reference frame T0 What’s the new robot Rq?Rq= {Tq(x,y,z) | (x,y,z)  R0} Define rigid transformation Tq(x,y,z) : R3 R3 Rigid Transformation in 3D R x y z tx ty tz Tq(x,y,z) = + 3D rotation matrix Affine translation

  10. 3-D Rigid Rotations • det(A) = +1 • Orthogonal rows and columns: ATA=I, AAT=I • ||Ax|| = ||x|| for any x, L2 norm ||.|| • Product of two rotations is a rotation r11 r12 r13 r21 r22 r23 r31 r32 r33 (0,1,0) (r11,r21,r31) (Right-handed coordinate system) (r13,r23,r33) (1,0,0) (1,0,0) (r12,r22,r32) (0,0,1) (0,0,1)

  11. Coordinate Frames World frame Local frame (0,1,0) (r11,r21,r31) R (r13,r23,r33) [x,y,z]T R[x,y,z]T (1,0,0) (r12,r22,r32) (0,0,1) = RT R-1

  12. 3 representations • Euler angles REuler(f,q,y) • Axis angle RAA(v,q) • Quaternion RQuat(q) • All representations are “equivalent” but may have certain mathematical or computational advantages

  13. Axis-aligned rotations Rotate about: Z axis Y axis X axis cos θ -sin θ 0 sin θ cos θ 0 0 0 1 cos θ 0 sin θ 0 1 0 -sin θ 0 cos θ 1 0 0 0 cos θ -sin θ 0 sin θ cos θ

  14. Euler angles: (f,q,y) z z z z y f y q y y y x x x x Parameterization of SO(3) 1 2  3 4

  15. Euler Angles • Which axes to pick, and what order? • Convention A,B,C • REuler(f,q,y) = RA(f)RB(q)RC(y) • E.g., ZYZ, ZYX (roll-pitch-yaw), etc

  16. Euler Angles • Which axes to pick, and what order? • Convention A,B,C • REuler(f,q,y) = RA(f)RB(q)RC(y) • E.g., ZYZ, ZYX (roll-pitch-yaw), etc • Disadvantages • Must constrain to range of values • Singularities, e.g. ZYZ when q=0 or p (Gimbal lock) • Interpolation?

  17. 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

  18. Axis-Angle Representation • Axis v (||v||=1), angle θ • Rodrigues’ formula: rotate x about v -> x’ x’ = x cos θ + (v x x) sin θ + v (vT x) (1 - cos θ) Or in matrix form… RAA(θ,v) = cosθ I+ sin θ [v] + (1 - cosθ) vvT Cross product matrix 0 -vz vy vz 0 -vx -vy vx 0

  19. Recovering Axis and Angle from the Rotation Matrix • θ = Angle(R) = cos-1((r11+r22+r33-1)/2) = cos-1((tr(R)-1)/2) • v = Axis(R) = 1/(2 sin θ) r32-r23r13-r31r21-r12

  20. Properties of Axis-Angle • Disadvantages: • Non unique: RAA(θ,v)=RAA(-θ,-v) (can constrain θ to range [0,p]) • 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” REM(w) = RAA( ||w|| , w/||w|| )

  21. Quaternion representation • Generalization of complex numbers • Complex z=z0+i z1, with |z|=1 can represent a 2D rotation. What’s the 3D analogue? q = q0+q1i + q2j +q3k, where i2 = j2 = k2 = -1i = jk = -kjj = ki = -ikk = ij = -ji Quaternions were a forerunner of vectors and were once mandatory of all students of physics and math!

  22. Unit quaternion representation • q = (q0,q1,q2,q3), ||q||=1 • Related to axis angle: • q = (cosq/2,vx sin q/2, vysin q/2, vzsin q/2) 2(q02+q12)-1 2(q1q2-q0q3) 2(q1q3+q0q2) 2(q1q2+q0q3) 2(q02+q22)-1 2(q2q3-q0q1) 2(q1q3-q0q2) 2(q2q3+q0q1) 2(q02+q32)-1 RQ(q) =

  23. 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)

  24. Summary • Rotation matrix • 9 parameters Rij in range [-1,1] • Constraint: determinant +1 • Advantages: composition, inversion are easy • Euler angles • 3 parameters (f,q,y) in range [0,2p) • Axes picked by convention (e.g., Roll-Pitch-Yaw) • Advantages: no constraints, simple interpolation “works” • Disadvantages: multiple representation, singularities, inversion not easy • Axis-angle • 4 parameters (q,v), q in [0,p] • Constraint: |v|=1 • Advantages: inversion is easy • Disadvantages: constraint, interpolation, multiple representation at p • Moment representation (aka exponential map) • 3 parameters w (= q*v), ||w||<=p • Advantages: no constraints, inversion is easy • Disadvantages: interpolation, multiple representation at p • Quaternion • 4 parameters q=(q0,q1,q2,q3) • Constraint: |q|=1 • Advantages: interpolation formulas, inversion easy • Disadvantages: constraint, multiple representation R(q) = R(-q)

  25. Notion of Distance • θ(R1TR2) = cos-1 ((tr(R1TR2)-1)/2) measures the minimum angle needed to rotate from frame R1 to R2 • Makes a good distance metric

  26. 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(ATB), θ = Angle(ATB) • Verify that X(s) = A RAA(sθ,v) satisfies the desired properties Actually a geodesic in SO(3)!

  27. Angular Velocities • For parameterized rotation trajectory REM(wt), we can show: d/dt REM(wt) = [w] REM(wt) • => |w| is the speed of rotation • => 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

  28. Recap • Multiple representations of SO(3) • All four implemented robustly in C++ in KrisLibrary • Axis angle / moment implemented in Python • Notion of distance, straight line, speed in SO(3)

  29. Next Lecture • 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

More Related