My Adventure with Inverse Kinematics

Slides:



Advertisements
Similar presentations
Neat Stuff from Vector Calculus & Related Subjects Chris Hecker definition six, inc. & Maxis.
Advertisements

Four Five Physics Simulators for a Human Body Chris Hecker definition six, inc.
Five Physics Simulators for Articulated Bodies Chris Hecker definition six, inc.
Chris Hecker spyparty.com …plus some ranting. SpyParty A Game About AI…
Jason Clark Inverse Kinematics Jason Clark
COMP Robotics: An Introduction
Animation Following “Advanced Animation and Rendering Techniques” (chapter 15+16) By Agata Przybyszewska.
Forward and Inverse Kinematics CSE 3541 Matt Boggus.
Simulation and Animation
Inverse Kinematics Set goal configuration of end effector
Chapter 4: IMD Chapter 4: Character Animation Character Animation 1 Lecturer: Norhayati Mohd Amin.
CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai.
1Notes  Handing assignment 0 back (at the front of the room)  Read the newsgroup!  Planning to put 16mm films on the web soon (possibly tomorrow)
Ch. 7: Dynamics.
“Inverse Kinematics” The Loop Closure Problem in Biology Barak Raveh Dan Halperin Course in Structural Bioinformatics Spring 2006.
CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai.
IK: Choose these angles!
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi Most slides courtesy.
Kinematics. ILE5030 Computer Animation and Special Effects2 Kinematics The branch of mechanics concerned with the motions of objects without regard to.
Inverse Kinematics How do I put my hand here? IK: Choose these angles!
Articulated Body Dynamics The Basics Comp 768 October 23, 2007 Will Moss.
CSCE 689: Forward Kinematics and Inverse Kinematics
Animation. Outline  Key frame animation  Hierarchical animation  Inverse kinematics.
Animation CS 551 / 651 Kinematics Lecture 09 Kinematics Sarcos Humanoid.
Inverse Kinematics (part 1) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
1cs426-winter-2008 Notes  SIGGRAPH crunch time - my apologies :-)
Last lecture summary Fundamental system in linear algebra : system of linear equations Ax = b. nice case – n equations, n unknowns matrix notation row.
역운동학의 구현과 응용 Implementation of Inverse Kinematics and Application 서울대학교 전기공학부 휴먼애니메이션연구단 최광진
Advanced Graphics (and Animation) Spring 2002
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Kinematic Linkages.
Chap 5 Kinematic Linkages
Advanced Programming for 3D Applications CE Bob Hobbs Staffordshire university Human Motion Lecture 3.
Inverse Kinematics.
Inverse Kinematics Kris Hauser
Lecture 2: Introduction to Concepts in Robotics
Inverse Kinematics.
INVERSE KINEMATICS IN A ROBOTIC ARM AND METHODS TO AVOID SINGULARITIES Submitted By :-Course Instructor :- Avinash Kumar Prof. Bhaskar Dasgupta Roll No.-
Simulation and Animation
 d.s. wu 1 Penalty Methods for Contact Resolution interactive contact resolution that usually works pi david s wu.
CSCE 441: Computer Graphics Forward/Inverse kinematics Jinxiang Chai.
Kinematics Jehee Lee Seoul National University. Kinematics How to animate skeletons (articulated figures) Kinematics is the study of motion without regard.
CS-378: Game Technology Lecture #13: Animation Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
Kinematic Redundancy A manipulator may have more DOFs than are necessary to control a desired variable What do you do w/ the extra DOFs? However, even.
1cs426-winter-2008 Notes  Will add references to splines on web page.
Inverse Kinematics for Robotics using Neural Networks. Authors: Sreenivas Tejomurtula., Subhash Kak
Outline: Introduction Solvability Manipulator subspace when n<6
1cs426-winter-2008 Notes. 2 Kinematics  The study of how things move  Usually boils down to describing the motion of articulated rigid figures Things.
CSCE 441: Computer Graphics Forward/Inverse kinematics Jinxiang Chai.
Numerical Methods for Inverse Kinematics Kris Hauser ECE 383 / ME 442.
CGDD 4003 Character Animation. The Skeletal Hierarchy (aka the “rig”) Based on the concept of bones Each bone has exactly one parent Each bone has a transform.
Singularity-Robust Task Priority Redundancy Resolution for Real-time Kinematic Control of Robot Manipulators Stefano Chiaverini.
Fundamentals of Computer Animation
Physically-Based Motion Synthesis in Computer Graphics
CSCE 441: Computer Graphics Forward/Inverse kinematics
Inverse Kinematics.
IK: Choose these angles!
Character Animation Forward and Inverse Kinematics
Inverse Manipulator Kinematics
INVERSE MANIPULATOR KINEMATICS
Computer Animation Algorithms and Techniques
Bones Skeletal Unity-2D How & When
Zaid H. Rashid Supervisor Dr. Hassan M. Alwan
Bowei Tang, Tianyu Chen, and Christopher Atkeson
CSCE 441: Computer Graphics Forward/Inverse kinematics
Chapter XIII Character Animation
Computer Animation Algorithms and Techniques
Computer Graphics Lecture 15.
Outline: Introduction Solvability Manipulator subspace when n<6
Chapter 4 . Trajectory planning and Inverse kinematics
Computer Graphics Matrix Hierarchies / Animation
Presentation transcript:

My Adventure with Inverse Kinematics Chris Hecker definition six, inc. checker@d6.com

What is this lecture about? the path I took while solving a problem with inverse kinematics how I use math to model and [sometimes] solve problems decisions I made, both good and bad learn from my successes and failures work in progress!

What isn’t this lecture about? not an IK tutorial or introduction not going to give you the One True Way to do IK has nothing to do with graphics not about my rock climbing game Experimental Gameplay Workshop Friday, 4pm - 7pm

Takeaway You will get insight into how IK on a whole human body is different from IK on a single arm. You will see how IK is a building block, but not a complete solution to character animation.

Prerequisites must be very comfortable with math doesn’t mean you know tons of math does mean you follow quickly and aren’t afraid of it probably best if you’ve implemented a simple IK system foot placement, arm grabbing door, etc.

Talk Structure (linear with occasional branches) ... attempted solution problem statement and discussion related theory

Problem: How to move a guy with the mouse? move like a [rock climbing] human interactive direct body/limb control did not want to use physics

Theory: How to move a guy with the mouse? inverse kinematics vs. forward kinematics FK: p=f(q) IK: q = f-1(p) p is Euclidean, angles q is configuration space p g p = (x, y) q = (q1, q2) q2 q1

Theory: How to move a guy with the mouse? (cont.) p q2 q1 degrees of freedom (DOF) incredibly important concept “ways in which system can change” configuration space find DOF of system to understand it control & constrain DOF to control it examples physical system, polynomial, etc. fundamental task of IK is to control degrees of freedom to attain goal p = (x, y) q = (q1, q2)

Solution: How to move a guy with the mouse? analytical IK invert p = f(q) to get q from p relatively easy for the 2D arm inverse trig, some vector algebra gets complicated as n increases

Problem: Analytical IK can’t handle human. human has lots of DOF even 2D arm with shoulder has more DOF than needed to reach goal solving p = f(q) requires certain characteristics q3 g q2 q1 p = (x, y) q = (q1 , q2 , q3)

Theory: Analytical IK can’t handle human. p p = f(q) is a set of nonlinear equations generally no closed forms must iterate numerically must be square, nDOF = ngoal over-, under-constrained system “redundant manipulator” ex. human reaching for point and/or orientation vast literature on solving f(q) = p q3 q2 q1 p = (x, y) q = (q1 , q2 , q3)

Solution: Analytical IK can’t handle human. p use Cyclic Coordinate Descent (CCD) to solve arms iterative, recursive position-space algorithm fast, easy, robust start from last position not path independent, but faster I draw every outside iteration looks like animation, but it’s not q3 g q2 q1 p = (x, y) q = (q1 , q2 , q3)

Problem: CCD only handles serial chains. multiple goals are necessary for human stack up vectors in p=f(q) coupled at branches g2 q3 g1 q5 q4 q2 q1 p = (x1, y1, x2, y2) q = (q1 , q2 , q3 , q4 , q5)

Theory: CCD only handles serial chains. p2 p1 coupling between goals either solvable alone, neither solvable together how to distribute desired-angle error? g2 q3 g1 q5 q4 q2 q1 p = (x1, y1, x2, y2) q = (q1 , q2 , q3 , q4 , q5)

Solution: CCD only handles serial chains. p2 p1 simply average desired angles at branch parents to attain multiple goals and distribute error q1 in example, imagine p1, p2 pulled in opposite directions q3 q5 q4 q2 q1 p = (x1, y1, x2, y2) q = (q1 , q2 , q3 , q4 , q5)

Problem: Drift on multiple goals. average can’t satisfy all goals or even prioritize them I specifically want to drag climber hand with mouse and have other end effectors stay on holds q

Theory: Drift on multiple goals. want a rigid constraint at end effectors closed loops are hard, CCD doesn’t handle them, nor do common IK algorithms must solve simultaneously not hierarchical anymore closed loops don’t have local behavior q

Solution: Drift on multiple goals. attempt to “Gram-Schmidt” off any movement that would result in error b c a

Problem: Gram-Schmidt removes the wrong direction sometimes. could have tried real Jacobian force mapping Gram-Schmidt

Problem: Human is not rooted tree. Which end effector (hand, foot) is the root? There is no persistent fixed root in a rock climber or walking person CCD must start at a fixed root

Theory: Human is not rooted tree. switching root is basically a datastructure problem relative angles must change joint limits (see below) behavior will change slightly as well, since CCD isn’t symmetric with respect to the root

Solution: Human is not rooted tree. just type it in invert tree to new root Caml is pretty good at this sort of thing see last year’s GDC talk dragging torso is done by inverting to a torso node, then changing the root position the hands and feet are all end-effectors hack!

Problem: Joint limits elbow can’t bend backwards should lend believability and intuition

Theory: Joint limits inequality constraints: q ³ qmin abandon all (most) hope of analytical solution these inequalities are axis aligned planes in configuration space qmax q qmin

Solution: Joint limits CCD makes parent-child limits easy do min/max clamp in CCD inner iteration easy, and rest of system compensates issue: CCD doesn’t “know” about the joint limits often compensates, but doesn’t know to avoid them

Problem: Child-child limits parent-child not enough with moving root pelvis example: left foot root right foot root chest root

Problem: Child-child limits parent-child not enough with moving root pelvis example: left foot root right foot root chest root

Problem: Child-child limits parent-child not enough with moving root pelvis example: left foot root right foot root chest root ?

Theory: Child-child limits both angles are dependent on each other, coupled parent is fixed in CCD constraints are now non-axis aligned planes in C-space simultaneous solution necessary at branches with child-child limits

Solution: Child-child limits Good solution should: satisfy constraints always have zero error in goals if possible have least squares error if not possible Nonlinear Least Squares with Linear Inequalities: minimize (q1 - d1)2 + (q2 - d2)2 w.r.t. qmin12 £ q1 - q2 £ qmax12 lots of literature on NLSLI I convert to LCP and use Lemke’s algorithm works great!

Accomplishments We extended CCD to handle: multiple end effector goals dynamically changing root node arbitrary joint limits

Problems drift on multi-goals is still a problem CCD doesn’t know about joint limits sometimes non-physical movement CCD isn’t doing physics, not conserving energy, or anything else for that matter rooted hierarchies are inconvenient how to control redundant DOF?

Body Knowledge System system to manage movement and keep it natural “situation” & “reaction” ex. joint limits handled in body knowledge huge rules system allocates redundant DOF this is the key to natural movement!

Body Knowledge System (cont.) IK just a rough initial guess for body knowledge system; should be: physically plausible no added energy, etc. easy to layer conflicting goals able to cope with over-constrained goals don’t know enough about this yet, but I think it will be more important than IK for good dynamic animation

What I Didn’t Talk About development process stuff developing on lower dimensional subproblems using visualizations to help debug math Mathematica and Matlab for development and debugging running multiple techniques on top of each other physics-based techniques I tried

What I Didn’t Try I should have done a weighted average based on error for multi-goals, duh. even weighted average wouldn’t be rigid although could make weight very big... similar to a stiff system Wrong: “CCD must have fixed root” now that I understand better, this isn’t actualy true the root’s position is just more DOF CCD probably wouldn’t deal with this very well?

What I Didn’t Try (cont.) pseudo-inverse methods give explicit control over redundant DOF data-based methods (model-based) functions as lookup tables totally ad-hoc methods

References two great theses: google & citeseer GDC talks Paolo Baerlocher Chris Welman google & citeseer GDC talks David Wu Ken Perlin Jeff Lander’s articles & code Experimental Gameplay Workshop