Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi...
-
date post
15-Jan-2016 -
Category
Documents
-
view
214 -
download
1
Transcript of Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi...
![Page 1: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/1.jpg)
Advanced Computer Graphics Advanced Computer Graphics (Fall 2010)(Fall 2010)
CS 283, Lecture 20:
Inverse Kinematics
Ravi Ramamoorthi
http://inst.eecs.berkeley.edu/~cs283/fa10
Most slides courtesy James O’Brien from CS294-13 Fall 2009
![Page 2: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/2.jpg)
Forward KinematicsForward Kinematics
Root body
Position set by global transform
Root joint: position, rotation
Other bodies relative to root
Inboard toward the root
Outboard away from the root
Tree structure: loop joints break
“tree-ness”
![Page 3: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/3.jpg)
Inboard and OutboardInboard and Outboard
Joints
Inboard body
Outboard body
Body
Inboard joint
Outboard joint (may be several)
![Page 4: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/4.jpg)
Inboard and OutboardInboard and Outboard
Joints
Inboard body
Outboard body
Body
Inboard joint
Outboard joint (may be several)
![Page 5: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/5.jpg)
BodiesBodies
Bodies arranged in a tree
For now, assume no loops
Body’s parent (except root)
Body’s child (may have many children)
![Page 6: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/6.jpg)
JointsJoints
Interior Joints (typically not 6 DOF)
Pin – rotate about one axis
Ball – arbitrary rotation
Prism – translate along one axis
![Page 7: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/7.jpg)
Pin JointsPin Joints
Translate inboard joint to local origin
Apply rotation about axis
Translate origin to location of joint on outboard body
![Page 8: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/8.jpg)
Ball JointsBall Joints
Translate inboard point to local origin
Apply rotation about arbitrary axis
Translate origin to location of joint on outboard body
![Page 9: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/9.jpg)
Prism JointPrism Joint
Translate inboard joint to local origin
Translate along axis
Translate origin to location of joint on outboard
![Page 10: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/10.jpg)
Forward KinematicsForward Kinematics
Composite transformations up the hierarchy
![Page 11: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/11.jpg)
Inverse KinematicsInverse Kinematics
![Page 12: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/12.jpg)
Inverse KinematicsInverse Kinematics
Egon Pasztor
![Page 13: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/13.jpg)
2 Segment Arm in 2D2 Segment Arm in 2D
![Page 14: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/14.jpg)
Direct IKDirect IK Analytically solve for parameters (not general)
![Page 15: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/15.jpg)
Difficult IssuesDifficult Issues
Multiple configurations distinct in config space
Or connected in config space
![Page 16: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/16.jpg)
Infeasible RegionsInfeasible Regions
![Page 17: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/17.jpg)
Numerical SolutionNumerical Solution
Start in some initial config. (previous frame)
Define error metric (goal pos – current pos)
Compute Jacobian with respect to inputs
Use Newton’s or other method to iterate
General principle of goal optimization
![Page 18: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/18.jpg)
Back to 2 Segment ArmBack to 2 Segment Arm
![Page 19: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/19.jpg)
Jacobians and Configuration SpaceJacobians and Configuration Space
![Page 20: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/20.jpg)
Solving for Joint AnglesSolving for Joint Angles
![Page 21: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/21.jpg)
IssuesIssues
Jacobian not always invertible Use an SVD and pseudo-inverse
Iterative approach, not direct The Jacobian is a linearization, changes
Practical implementation Analytic forms for prism, ball joints Composing transformations Or quick and dirty: finite differencing Cyclic coordinate descent (each DOF one at a time)
![Page 22: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/22.jpg)
Prism and Ball JointsPrism and Ball Joints
![Page 23: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/23.jpg)
More on Ball JointsMore on Ball Joints
![Page 24: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/24.jpg)
Multiple LinksMultiple Links
IK requires Jacobian Need generic method for
building one
Can’t just concatenate matrices
![Page 25: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/25.jpg)
Composing TransformationsComposing Transformations
![Page 26: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/26.jpg)
Inverse Kinematics: Final FormInverse Kinematics: Final Form
![Page 27: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/27.jpg)
A Cheap AlternativeA Cheap Alternative
Estimate Jacobian (or parts of it) w. finite diffs.
Cyclic coordinate descent Solve for each DOF one at a time Iterate till good enough / run out of time
![Page 28: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/28.jpg)
More complex systemsMore complex systems
More complex joints (prism and ball)
More links
Other criteria (center of mass or height)
Hard constraints (e.g., foot plants)
Unilateral constraints (e.g., joint limits)
Multiple criteria and multiple chains
Loops
Smoothness over time DOF determined by control points of curve (chain rule)
![Page 29: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/29.jpg)
Practical IssuesPractical Issues
How to pick from multiple solutions?
Robustness when no solutions
Contradictory solutions
Smooth interpolation Interpolation aware of constraints
![Page 30: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi cs283/fa10 Most slides courtesy.](https://reader035.fdocuments.us/reader035/viewer/2022062804/56649d535503460f94a2f334/html5/thumbnails/30.jpg)
Prior on “good” configurationsPrior on “good” configurations