four different ways to represent rotation
play

Four different ways to represent rotation my head is spinning... - PowerPoint PPT Presentation

Four different ways to represent rotation my head is spinning... The space of rotations { } ( ) 3 3 T = = = + SO 3 R R | RR I , det( R ) 1 Special orthogonal group(3): = det( R ) 1 Why


  1. Four different ways to represent rotation my head is spinning...

  2. The space of rotations { } ( ) × 3 3 T = ∈ = = + SO 3 R R | RR I , det( R ) 1 Special orthogonal group(3): = ± det( R ) 1 Why ? − = − Rp Rp p p Rotations preserve distance: 1 2 1 2 ( ) ( ) ( ) × = × Rp Rp R p p Rotations preserve orientation: 1 2 1 2

  3. The space of rotations { } ( ) × 3 3 T = ∈ = = + SO 3 R R | RR I , det( R ) 1 Special orthogonal group(3): Why it’s a group: ( ) ( ) ∈ ∈ R , R SO 3 • R R SO 3 Closed under multiplication: if then 1 2 1 2 ( ) • Has an identity: ∃ ∈ = I SO 3 s.t. IR R 1 1 • Has a unique inverse… • Is associative… Why orthogonal: • vectors in matrix are orthogonal = ± = + det( R ) 1 det( R ) 1 Why it’s special: , NOT Right hand coordinate system

  4. Possible rotation representations You need at least three numbers to represent an arbitrary rotation in SO(3) (Euler theorem). Some three-number representations: • ZYZ Euler angles • ZYX Euler angles (roll, pitch, yaw) • Axis angle One four-number representation: • quaternions

  5. ZYZ Euler Angles φ     = θ r   zyz   ψ   φ − φ cos sin 0     To get from A to B: φ = φ φ R ( ) sin cos 0   z   φ 0 0 1 1. Rotate about z axis   θ θ cos 0 sin   θ 2. Then rotate about y axis   θ = R ( ) 0 1 0   ψ y 3. Then rotate about z axis   − θ θ sin 0 cos   ψ − ψ  cos sin 0    ψ = ψ ψ R ( ) sin cos 0   z   0 0 1  

  6. ZYZ Euler Angles ( φ ( θ ( ψ R ) R ) R ) Remember that encode the desired rotation in the pre- z y z rotation reference frame: − ( φ = pre rotation R ) R − z post rotation Therefore, the sequence of rotations is concatentated as follows: ( ) φ θ ψ = φ θ ψ R , , R ( ) R ( ) R ( ) zyz z y z φ − φ θ θ ψ − ψ  cos sin 0   cos 0 sin   cos sin 0        ( ) φ θ ψ = φ φ ψ ψ R , , sin cos 0 0 1 0 sin cos 0       zyz       − θ θ 0 0 1 sin 0 cos 0 0 1         − − − c c c s s c c s s c c s   φ θ ψ φ ψ φ θ ψ φ ψ φ θ ( ) φ θ ψ = + − + R zyz , , s c c c s s c s c c s s   φ θ ψ φ ψ φ θ ψ φ ψ φ θ   − s c s s c   θ ψ θ ψ θ

  7. ZYX Euler Angles (roll, pitch, yaw) φ − φ  cos sin 0    To get from A to B: φ = φ φ R ( ) sin cos 0   z   φ 1. Rotate about z axis 0 0 1   θ θ  cos 0 sin  θ 2. Then rotate about y axis   θ = R ( ) 0 1 0   ψ y 3. Then rotate about x axis   − θ θ sin 0 cos   1 0 0     ψ = ψ − ψ R ( ) 0 cos sin   x   ψ ψ 0 sin cos   ( ) φ θ ψ = φ θ ψ R , , R ( ) R ( ) R ( ) zyx z y x φ − φ θ θ cos sin 0 cos 0 sin 1 0 0             ( ) φ θ ψ = φ φ ψ − ψ R , , sin cos 0 0 1 0 0 cos sin       zyz       − θ θ ψ ψ 0 0 1 sin 0 cos 0 sin cos      

  8. Problems w/ Euler Angles If two axes are aligned, then there is a “don’t care” manifold of Euler angles that represent the same orientation • The system loses one DOF    0 90         = = r 90 r  89    1 2      0 90        − 90     − = r r  1  1 , but the actual distance is 1 2    − 90  

  9. Problem w/ Euler Angles: gimbal lock 1. When a small change in orientation is associated with a large change in rotation representation 2. Happens in “singular configurations” of the rotational representation (similar to singular configurations of a manipulator) 3. This is a problem w/ any Euler angle representation

  10. Problem w/ Euler Angles: gimbal lock

  11. Problem w/ Euler Angles: gimbal lock

  12. Axis-angle representation ( ) R ∈ SO 3 Theorem: (Euler). Any orientation, , is equivalent to a rotation 3 ω ∈ about a fixed axis, , through an angle R θ ∈ π [ 0 , 2 ) (also called exponential coordinates ) k   x   θ Angle: = k k Axis:   y   k   z Converting to a rotation matrix: ( ) ( ) ( ) ( ( ) ) ( ) 2 S k θ = = + θ + − θ R e I S k sin S k 1 cos k θ [ ] = that equation in the book... Rodrigues’ formula

  13. Axis-angle representation Converting to axis angle: − trace ( R ) 1   cos 1 − θ = = k   Magnitude of rotation: 2   − r r   32 23   1 ˆ Axis of rotation: = − k r r   13 31 θ 2 sin   − r r   21 12  r r r  11 12 13   Where: = R r r r   12 22 23   r r r   13 23 33 = + + trace ( R ) r r r and: 11 22 33

  14. Axis-angle problems Still suffers from the “edge” and distance preserving problems of Euler angles:  0    0    0  − = r r 0       1 2 =   r 0   = r 0    358 1   2      179  −   179    2 , but the actual distance is Distance metric changes as you get further from origin.

  15. Axis-angle representation Axis angle is can be encoded by just three numbers instead of four: ≠ θ = k 0 k If then and If the three-number version of axis angle is used, then R = I 0 R For most orientations, , is unique. k  180 For rotations of , there are two equivalent representations:  = k 180 = R R If then k − k

  16. Projection distortions

  17. Example: differencing rotations 0     π 2     Calculate the difference between = k = π k 0     these two rotations: 2 2 1     0 0       π 2   − = − k k This is NOT the right answer: π   2 1 2   0   π According to that, this is the  − = = k k 127 . 27 1 2 magnitude of the difference: 2

  18. Example: differencing rotations Convert to rotation matrices to solve this problem: 0     π 2     = k = π k 0     T 1 B B = R R R 2 2 1 2 1 2     0 0     1 0 0 1 0 0         ( ) ( ) ( ) b = = − = − R R 0 cos sin 0 0 1 π π π     2 2 2 1 x     ( ) ( ) 0 sin cos 0 1 0 π π     2 2 ( ) ( ) cos 0 sin 0 0 1     π π 2 2     ( ) b = = = R R 0 1 0 0 1 0 π     2 2 y     ( ) ( ) − − sin 0 cos 1 0 0 π π     2 2 1 0 0 0 0 1 0 0 1             T 1 B B = = = − R R R 0 0 1 0 1 0 1 0 0       2 1 2       − − − 0 1 0 1 0 0 0 1 0       − −  r r   1  − 1   32 23 2 π       1 1 −  trace ( R ) 1  − 1  ˆ = − = k r r 1 − − θ = 1 = 1 = π     = cos cos k 3 1     2   13 31 3 2 sin θ 2 2     3 3       − − r r 1 − 1       21 12

  19. Quaternions So far, rotation matrices seem to be the most reliable method of manipulating rotations. But there are problems: • Over a long series of computations, numerical errors can cause these 3x3 matrices to no longer be orthogonal (you need to “orthogonalize” them from time to time). • Although you can accurately calculate rotation differences, you can’t interpolate over a difference.’ • Suppose you wanted to smoothly rotate from one orientation to another – how would you do it? Answer: quaternions…

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