Download presentation

Presentation is loading. Please wait.

Published byDaniela Stevenson Modified over 4 years ago

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
Articulated Robot Robot: usually a rigid articulated structure Geometric CAD models, relative to reference frames A configuration specifies the placement of those frames q1q1q1q1 q2q2q2q2

6
reference point Rigid Transformation in 2D q = (t x,t y, ) with [0,2 ) Robot R 0 R 2 given in reference frame T 0 What’s the new robot R q ? txtx tyty robot reference direction workspace

7
Rigid Transformation in 2D q = (t x,t y, ) with [0,2 ) Robot R 0 R 2 given in reference frame T 0 What’s 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

8
2D Rigid Rotations A rotation matrix A has: 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 cos θ -sin θ sin θ cos θ θ (cos θ, sin θ) (-sin θ, cos θ) (1,0) (0,1)

9
Rigid Transformation in 3D q = (t x,t y,t z,R) with R a 3x3 rotation matrix Robot R 0 R 3 given in reference frame T 0 What’s the new robot R q ? R q = {T q (x,y,z) | (x,y,z) R 0 } Define rigid transformation T q (x,y,z) : R 3 R 3 T q (x,y,z) = R xyzxyz txtytztxtytz + Affine translation3D rotation matrix

10
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 )

11
Coordinate Frames (1,0,0) (0,1,0) (0,0,1) (r 11,r 21,r 31 ) (r 13,r 23,r 33 ) (r 12,r 22,r 32 ) R R -1 = R T Local frame World frame [x,y,z] T R[x,y,z] T

12
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

13
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 θ

14
Parameterization of SO(3) Euler angles: ( x yz x yz x y z x yz 1 2 3 4

15
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

16
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?

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 (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

19
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

20
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|| )

21
Quaternion representation Generalization of complex numbers Complex z=z 0 +i z 1, with |z|=1 can represent a 2D rotation. What’s 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

22
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

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 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, inversion not easy Axis-angle 4 parameters ( v), in [0, Constraint: |v|=1 Advantages: inversion is easy Disadvantages: constraint, interpolation, multiple representation at Moment representation (aka exponential map) 3 parameters w (= v), ||w||<= Advantages: no constraints, inversion is easy Disadvantages: interpolation, multiple representation at Quaternion 4 parameters q=(q 0,q 1,q 2,q 3 ) Constraint: |q|=1 Advantages: interpolation formulas, inversion easy Disadvantages: constraint, multiple representation R(q) = R(-q)

25
Notion of Distance θ(R 1 T R 2 ) = cos -1 ((tr(R 1 T R 2 )-1)/2) measures the minimum angle needed to rotate from frame R 1 to R 2 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(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)!

27
Angular Velocities 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 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

Similar presentations

© 2019 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google