cs 184 computer graphics
play

CS-184: Computer Graphics Lecture #19: Forward and Inverse - PDF document

CS-184: Computer Graphics Lecture #19: Forward and Inverse Kinematics ! ! ! Prof. James OBrien ! University of California, Berkeley ! ! ! V2015-S-19-1.0 1 19-Kinematics.key - April 13, 2015 Today Forward kinematics ! Inverse


  1. CS-184: Computer Graphics Lecture #19: Forward and Inverse Kinematics ! ! ! Prof. James O’Brien ! University of California, Berkeley ! ! ! V2015-S-19-1.0 1 19-Kinematics.key - April 13, 2015 Today • Forward kinematics ! • Inverse kinematics ! • Pin joints ! • Ball joints ! • Prismatic joints 2 2 19-Kinematics.key - April 13, 2015

  2. Forward Kinematics • Articulated skeleton ! • Topology (what’s connected to what) ! • Geometric relations from joints ! • Independent of display geometry ! • Tree structure ! • Loop joints break “tree-ness” 3 3 19-Kinematics.key - April 13, 2015 Forward Kinematics • Root body ! • Position set by “global” transformation ! • Root joint ! • Position ! • Rotation ! • Other bodies relative to root ! • Inboard toward the root ! • Outboard away from root 4 4 19-Kinematics.key - April 13, 2015

  3. Forward Kinematics • A joint ! • Joint’s inboard body ! • Joint’s outboard body 5 5 19-Kinematics.key - April 13, 2015 Forward Kinematics • A body ! • Body’s inboard joint ! • Body’s outboard joint ! • May have several outboard joints 6 6 19-Kinematics.key - April 13, 2015

  4. Forward Kinematics • A body ! • Body’s inboard joint ! • Body’s outboard joint ! • May have several outboard joints ! • Body’s parent ! • Body’s child ! • May have several children 7 7 19-Kinematics.key - April 13, 2015 Forward Kinematics • Interior joints ! • Typically not 6 DOF joints ! • Pin - rotate about one axis ! • Ball - arbitrary rotation ! • Prism - translation along one axis 8 8 19-Kinematics.key - April 13, 2015

  5. Forward Kinematics • Pin Joints ! • Translate inboard joint to local origin ! • Apply rotation about axis ! • Translate origin to location of joint on outboard body 9 9 19-Kinematics.key - April 13, 2015 Forward Kinematics • Ball Joints ! • Translate inboard joint to local origin ! • Apply rotation about arbitrary axis ! • Translate origin to location of joint on outboard body 10 10 19-Kinematics.key - April 13, 2015

  6. Forward Kinematics • Prismatic Joints ! • Translate inboard joint to local origin ! • Translate along axis ! • Translate origin to location of joint on outboard body 11 11 19-Kinematics.key - April 13, 2015 Forward Kinematics • Composite transformations up the hierarchy 12 12 19-Kinematics.key - April 13, 2015

  7. Forward Kinematics • Composite transformations up the hierarchy 13 13 19-Kinematics.key - April 13, 2015 Forward Kinematics • Composite transformations up the hierarchy 14 14 19-Kinematics.key - April 13, 2015

  8. Forward Kinematics • Composite transformations up the hierarchy 15 15 19-Kinematics.key - April 13, 2015 Forward Kinematics • Composite transformations up the hierarchy 16 16 19-Kinematics.key - April 13, 2015

  9. Inverse Kinematics • Given ! • Root transformation ! • Initial configuration ! • Desired end point location ! • Find ! • Interior parameter settings 17 17 19-Kinematics.key - April 13, 2015 Inverse Kinematics Egon Pasztor 18 18 19-Kinematics.key - April 13, 2015

  10. Inverse Kinematics • A simple two segment arm in 2D 19 Warning: Z − up Coordinate System 19 19-Kinematics.key - April 13, 2015 Inverse Kinematics • Direct IK: solve for the parameters 20 20 19-Kinematics.key - April 13, 2015

  11. Inverse Kinematics • Why is the problem hard? ! • Multiple solutions separated in configuration space 21 21 19-Kinematics.key - April 13, 2015 Inverse Kinematics • Why is the problem hard? ! • Multiple solutions connected in configuration space 22 22 19-Kinematics.key - April 13, 2015

  12. Inverse Kinematics • Why is the problem hard? ! • Solutions may not always exist 23 23 19-Kinematics.key - April 13, 2015 Inverse Kinematics • Numerical Solution ! • Start in some initial configuration ! • Define an error metric ( e.g. goal pos - current pos) ! • Compute Jacobian of error w.r.t. inputs ! • Apply Newton’s method (or other procedure) ! • Iterate... 24 24 19-Kinematics.key - April 13, 2015

  13. Inverse Kinematics • Recall simple two segment arm: 25 Warning: Z − up Coordinate System 25 19-Kinematics.key - April 13, 2015 Inverse Kinematics • We can write of the derivatives 26 26 19-Kinematics.key - April 13, 2015

  14. Inverse Kinematics Direction in Config. Space 27 27 19-Kinematics.key - April 13, 2015 Inverse Kinematics The Jacobian (of p w.r.t. θ ) Example for two segment arm 28 28 19-Kinematics.key - April 13, 2015

  15. Inverse Kinematics The Jacobian (of p w.r.t. θ ) 29 29 19-Kinematics.key - April 13, 2015 Inverse Kinematics Solving for and 30 30 19-Kinematics.key - April 13, 2015

  16. Inverse Kinematics Solving for and 31 Is the Jacobian invertible? 31 19-Kinematics.key - April 13, 2015 Inverse Kinematics • Problems ! • Jacobian may (will!) not always be invertible ! • Use pseudo inverse (SVD) ! • Robust iterative method ! • Jacobian is not constant ! ! • Nonlinear optimization, but problem is (mostly) well behaved 32 32 19-Kinematics.key - April 13, 2015

  17. Inverse Kinematics Jacobian is not always invertible ! • Use pseudo inverse (SVD) ! ! Computing a linear approximation ! • End effector only locally moves linearly ! • So iterate (choosing proper step size) and update Jacobian after each step ! • Choosing step size requires line search at each step ! • Choose some step size (say 5 degrees) and compute how to update joint parameters ! • Calculate distance of end effector from goal ! • If distance decreased take step ! • Is distance did not decrease set parameters to be half the current change and try again ! ! 33 33 19-Kinematics.key - April 13, 2015 Inverse Kinematics • More complex systems ! • More complex joints (prism and ball) ! • More links ! • Other criteria (COM or height) ! • Hard constraints (joint limits) ! • Multiple criteria and multiple chains 34 34 19-Kinematics.key - April 13, 2015

  18. Inverse Kinematics • Some issues ! • How to pick from multiple solutions? ! • Robustness when no solutions ! • Contradictory solutions ! • Smooth interpolation ! • Interpolation aware of constraints ! ! • Numerical evaluation of Jacobian 35 35 19-Kinematics.key - April 13, 2015 Inverse Kinematics Prism Joints } } 36 36 19-Kinematics.key - April 13, 2015

  19. Inverse Kinematics Ball Joints 37 37 19-Kinematics.key - April 13, 2015 Inverse Kinematics Ball Joints (moving axis) { That is the Jacobian for this joint 38 38 19-Kinematics.key - April 13, 2015

  20. Inverse Kinematics Ball Joints (fixed axis) { That is the Jacobian for this joint 39 39 19-Kinematics.key - April 13, 2015 Inverse Kinematics • Many links / joints ! • Need a generic method for building Jacobian 2 b 2 a 3 1 40 40 19-Kinematics.key - April 13, 2015

  21. Inverse Kinematics • Can’t just concatenate individual matrices 2 b 2 a 3 1 41 41 19-Kinematics.key - April 13, 2015 Inverse Kinematics Transformation from body to world Rotation from body to world 42 42 19-Kinematics.key - April 13, 2015

  22. Inverse Kinematics Need to transform Jacobians to common coordinate system (WORLD) 2 b 2 a 3 3 1 2 b 43 43 19-Kinematics.key - April 13, 2015 Inverse Kinematics Note: Each row in the above should be transposed.... 44 44 19-Kinematics.key - April 13, 2015

  23. Suggested Reading • Advanced Animation and Rendering Techniques by Watt and Watt ! • Chapters 15 and 16 45 45 19-Kinematics.key - April 13, 2015

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