cs 184 foundations of computer graphics
play

CS 184: Foundations of Computer Graphics Kinematics of Articulated - PowerPoint PPT Presentation

CS 184: Foundations of Computer Graphics Kinematics of Articulated Bodies Rahul Narain Kinematics vs. dynamics Kinematics = motion but no forces Keyframing, motion capture, etc. Dynamics = motion from forces Simulation


  1. CS 184: Foundations of Computer Graphics Kinematics of Articulated Bodies Rahul Narain

  2. Kinematics vs. dynamics • Kinematics = motion but no forces • Keyframing, motion capture, etc. • Dynamics = motion from forces • Simulation

  3. If you want to know more about dynamics and simulation... • Particles and rigid bodies: • Baraff and Witkin, “Physically Based Modeling”, 2001 • Deformable bodies: • James O’Brien’s CS 283 slides and readings on elastic simulation • Fluids: • Bridson and Müller-Fischer, “Fluid Simulation for Computer Animation”, 2007

  4. Articulated bodies • Rigid bodies connected with joints • Topology (what’s connected to what) • Geometric relations from joints • Not necessarily what’s displayed in the end

  5. Articulated bodies • Root body • Position and orientation set by “global” transformation • Other bodies move relative to root

  6. Articulated bodies • A joint • Inboard body (towards root) • Outboard body (away from root)

  7. Articulated bodies • A body • Inboard joint • Outboard joint(s) • Parent • Child(ren)

  8. Articulated bodies • A body • Inboard joint • Outboard joint(s) • Parent • Child(ren)

  9. Articulated bodies • Interior joints are typically not 6 DOF Pin joint: Ball: Prism joint: rotation about one axis arbitrary rotation translation along one axis Wikimedia Commons

  10. Forward and inverse kinematics • Forward kinematics: • Given all the joint parameters, where are the bodies? • Inverse kinematics: • Given where I want some body to be, what joint parameters do I need to set?

  11. Forward kinematics • Each body gets its own local coordinate system • Position of a vertex is fixed relative to local coordinate system • What is its position relative to world coordinates?

  12. Forward kinematics • Pin joints • Translate inboard joint to origin • Apply rotation about axis • Translate origin to location of outboard joint on parent body

  13. Forward kinematics • Ball joints • Translate inboard joint to origin • Apply rotation about arbitrary axis • Translate origin to location of outboard joint on parent body

  14. Forward kinematics • Prism joints • Translate inboard joint to origin • Translate along axis • Translate origin to location of outboard joint on parent body

  15. Forward kinematics • Composite transformations up the hierarchy 1. 3. ? 2. • M world ← forearm = M world ← hip ∙ M hip ← torso ∙ M torso ← upperarm ∙ M upperarm ← forearm

  16. Forward kinematics • Composite transformations up the hierarchy 1. 3. ? 2.

  17. Inverse kinematics • Given • Root transformation * • Initial configuration • Desired location of end point • Find * • Internal parameter settings

  18. Inverse kinematics • A simple two segment arm in 2D o Segment Arm James O’Brien inate System

  19. Direct IK • Just solve for the parameters! What’s the problem? r and

  20. Why is this hard? Multiple connected solutions Multiple disconnected solutions

  21. Why is this hard? Solutions don’t always exist

  22. Numerical IK • Start in some initial configuration • Define an error metric (e.g. p goal − p current ) • Compute Jacobian of error w.r.t joint angles θ • Apply Newton’s method (or other procedure) • Iterate...

  23. Inverse kinematics • Recall the simple two segment arm: o Segment Arm inate System

  24. Numerical IK • We can write the derivatives o Segment Arm

  25. Numerical IK o Segment Arm • If we change the angles by a small amount d θ 1 and d θ 2 , this tells us how p x and p z change.

  26. The Jacobian J ij = ∂ p i • Matrix of partial derivatives ∂θ j • For a two segment arm in 2D, " # ∂ p x ∂ p x ∂θ 1 ∂θ 2 J = ∂ p z ∂ p z ∂θ 1 ∂θ 2

  27. The Jacobian • A small change in θ leads to a small change in p d p x = ∂ p x d θ 1 + ∂ p x d θ 2 " # ∂ p x ∂ p x  d θ 1 � ∂θ 1 ∂θ 2 ∂θ 1 ∂θ 2 d p = = J · d θ · ∂ p z ∂ p z d θ 2 d p z = ∂ p z d θ 1 + ∂ p z ∂θ 1 ∂θ 2 d θ 2 ∂θ 1 ∂θ 2 • So... if we want to change p , this tells us how to change θ ? d p = J · d θ d θ = J − 1 · d p ?

  28. The Jacobian Bill Baxter

  29. Back to inverse kinematics d = J · d θ • We want p to change by d p • Can we simply change θ by ertible? d θ = J − 1 d p ? • ...Is J invertible?

  30. Inverse kinematics • Problems: • Jacobian may (will!) not be invertible → use pseudo-inverse, or use more robust numerical method • Jacobian is not constant → take small steps • Nonlinear optimization, but (mostly) well-behaved

  31. More complex systems • More complex joints (prism and ball) • More links • Other goals (e.g. center of mass) • Hard constraints (joint limits, collisions) • Multiple criteria and multiple chains

  32. Multiple links • We need a generic way of building the Jacobian 2 b 2 a 3 1

  33. Multiple links 2 b 2 a 3 1 • Can’t just stack the Jacobians together!   θ 1 d 2 a ˜   d p 6 = ˜ J = [ J 1 J 2 a J 2 b J 3 ] J · d q q =   θ 2 b   θ 3

  34. Remember forward kinematics • World position of point is given by composition of transformations p = M 0 ← 1 · M 1 ← 2 a · M 2 a ← 2 b · M 2 b ← 3 · x • If joint 2b moves, only M 2a ← 2b changes ∂ p ∂ = M 0 ← 1 · M 1 ← 2 a · M 2 a ← 2 b · M 2 b ← 3 · x ∂θ 2 b ∂θ 2 b = M 0 ← 1 · M 1 ← 2 a · J 2 b ( θ 2 b ) · M 2 b ← 3 · x J 2b M 2b ← 3 x b 2 b a 2 a 3 3 M 2b ← 3 x 1 2 b M 0 ← 2a J 2b M 2b ← 3 x

  35. Multiple links • Compute each joint’s Jacobian locally (between outboard and inboard bodies)     · J 1 ( θ 1 ) · M 1 ← 3 x , θ 1 M 0 ← 1 · J 2 a ( d 2 a ) · M 2 a ← 3 x , d 2 a     J = q =     M 0 ← 2 a · J 2 b ( θ 2 b ) · M 2 b ← 3 x , θ 2 b     M 0 ← 2 b · J 3 ( θ 3 ) · x θ 3 (each entry here is a d p = J · d q column of the matrix)

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