Jason Clark (jason@essentialmath.com) Inverse Kinematics Jason Clark (jason@essentialmath.com)

Slides:



Advertisements
Similar presentations
An Analytical Algorithm for a Seven-DOF Limb Real-time inverse kinematics techniques for anthropomorphic limbs Deepak Tolani, Ambarish Goswami, Norman.
Advertisements

My Adventure with Inverse Kinematics
COMP Robotics: An Introduction
Rigid Body Dynamics Jim Van Verth
Inverse Kinematics Professor Nicola Ferrier ME 2246,
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
Manipulator’s Inverse kinematics
Review: Homogeneous Transformations
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
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)
Motion Analysis (contd.) Slides are from RPI Registration Class.
“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.
Inverse Kinematics (part 2)
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.
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 :-)
역운동학의 구현과 응용 Implementation of Inverse Kinematics and Application 서울대학교 전기공학부 휴먼애니메이션연구단 최광진
Collaborative Filtering Matrix Factorization Approach
Advanced Graphics (and Animation) Spring 2002
February 21, 2000Robotics 1 Copyright Martin P. Aalund, Ph.D. Computational Considerations.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Kinematic Linkages.
Chap 5 Kinematic Linkages
Game Physics – Part I Dan Fleck Coming up: Rigid Body Dynamics.
Advanced Programming for 3D Applications CE Bob Hobbs Staffordshire university Human Motion Lecture 3.
Inverse Kinematics.
Lecture 2: Introduction to Concepts in Robotics
Inverse Kinematics.
Simulation and Animation
Outline: 5.1 INTRODUCTION
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Optimization & Constraints Add mention of global techiques Add mention of calculus.
CSCE 441: Computer Graphics Forward/Inverse kinematics Jinxiang Chai.
Review: Differential Kinematics
CS-378: Game Technology Lecture #13: Animation Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
ME451 Kinematics and Dynamics of Machine Systems Review of Differential Calculus 2.5, 2.6 September 11, 2013 Radu Serban University of Wisconsin-Madison.
M. Zareinejad 1. 2 Grounded interfaces Very similar to robots Need Kinematics –––––– Determine endpoint position Calculate velocities Calculate force-torque.
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.
Outline: Introduction Solvability Manipulator subspace when n<6
Lecture 5: inverse kinematics.  The local and world matrix construction within the skeleton is an implementation of forward kinematics  Forward kinematics.
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.
Jacobian Implementation Ryan Keedy 5 / 23 / 2012.
Numerical Methods for Inverse Kinematics Kris Hauser ECE 383 / ME 442.
Fundamentals of Computer Animation
CSCE 441: Computer Graphics Forward/Inverse kinematics
Inverse Kinematics.
IK: Choose these angles!
IK: Choose these angles!
Character Animation Forward and Inverse Kinematics
Computer Animation Algorithms and Techniques
Zaid H. Rashid Supervisor Dr. Hassan M. Alwan
Collaborative Filtering Matrix Factorization Approach
CSCE 441: Computer Graphics Forward/Inverse kinematics
Chapter XIII Character Animation
Computer Animation Algorithms and Techniques
Skeletal Motion, Inverse Kinematics
Inverse Kinematics (part 2)
Chapter 4 . Trajectory planning and Inverse kinematics
CHAPTER 3-2. Planar Cartesian Kinematics
Presentation transcript:

Jason Clark (jason@essentialmath.com) Inverse Kinematics Jason Clark (jason@essentialmath.com)

Essential Math for Games Inverse Kinematics Actors are animated in game. Animations are independent of the world Want to have more realistic response to what the Actors are interacting with. Need a mechanism for reacting to goals specified during the game. Essential Math for Games

Essential Math for Games Kinematics Have a hierarchical skeleton structure Each joint is defined local to its parent Rotation Constant Translation defines set for entire structure. Is the global position of end joint Essential Math for Games

Essential Math for Games Kinematics Consider the kinematic chain below. Essential Math for Games

Essential Math for Games Inverse Kinematics Animations can be thought of as driving the kinematics in a game Want reaction to world. I.e. Position a limb based on a goal defined by game situation. Need method given goal position to update to achieve it. Essential Math for Games

Essential Math for Games Inverse Kinematics Kinematics. Therefore Inverse Kinematics is. As a general problem this is hard. G D1 Q2 D3 E Q1 Q3 D2 Essential Math for Games

Essential Math for Games Types of solutions Analytical Equation that can be directly solved Preferred, practically impossible as a general solution Numerical Expensive In-accurate Unfortunately only practical option for general solver. Essential Math for Games

Essential Math for Games Three Common Methods Jacobian (Numerical) Cyclic Coordinate Descent. (Numerical) Anthropomorphic. (Analytical? Depends) Essential Math for Games

Essential Math for Games The Jacobian What is it? A linear approximation to Matrix of partial derivatives of entire system. In this case, defined relative to Defines how changes relative to instantaneous changes in the system. Essential Math for Games

Essential Math for Games The Jacobian Linear approximation Actual E Linear Approximation Essential Math for Games

Essential Math for Games The Jacobian Limiting discussion to positional goals only. Essential Math for Games

Essential Math for Games The Jacobian Essential Math for Games

Essential Math for Games Not quite right Jacobian defines changes in relative to changes in Want to know how a desired change in maps to changes in Recall that the equation of inverse kinematics is defined as Therefore we need Essential Math for Games

Inverse Jacobian Problems Typically system is over specified (under defined) Ameliorate problem by limiting joints. E.g. Specify elbow as a 1DOF joint. No guarantee it is invertible. Typically not a square matrix. Singularities. Essential Math for Games

Essential Math for Games Cheat. Pseudo Inverse Square so can be inverted. But why is it okay to use this? Principle of Virtual Work Essential Math for Games

Principle of Virtual Work Tends towards the right solution. (I.e. It’s the right idea, if not completely accurate) Take small steps to minimize error. Calculate error, and if too large adjust step size, or size of Error = Essential Math for Games

Calculating the Jacobian Given angle and axis of rotation is relative to as defined by Velocity of relative to change in Gives one column of Jacobian V1 V2 N2 E N1 Essential Math for Games

Essential Math for Games Algorithm Only considering positional goals. Define the following variables – end effector – ith Joint position – ith Joint axis of rotation Essential Math for Games

Essential Math for Games Algorithm Calculate the Jacobian Calculate: Determine error = If error > tolerance then repeat 4 till within tolerance. Essential Math for Games

Essential Math for Games Algorithm Calculate: Apply to entire system Repeat until Or max steps is reached. Essential Math for Games

Essential Math for Games Addendum Minimizes joint angle rates. Configuration produced may not be natural looking Add gain values for each joint. Add “stiffness” I.e. Bias which joints are moved Add constraints, Clamp joint angles. Both these ideas slow down convergence of the algorithm. Need more steps as force. transforms to internal velocities Essential Math for Games

Essential Math for Games One last thing As stated previously, the Jacobian is a linear approximation to the problem. Using the pseudo inverse is an approximation to solve for intractability of the problem. So already cheating, why not cheat more? Can simply use as approximation. Slower convergence, but much cheaper to compute than Essential Math for Games

Cyclic Coordinate Descent The Jacobian is hard. It deals with entire system as a whole. Good results, more complicated to code, and expensive. That’s too much work, lets deal with each joint individually. Heuristic only. Not as mathematically grounded as the Jacobian. Essential Math for Games

Essential Math for Games CCD Reduce problem to local consideration at each joint. Start at leaf and move up. Calculate change in joint needed to minimize “error”. Error = Calculate Essential Math for Games

Essential Math for Games CCD Calculate rotation necessary to align into Modify current joint by and adjust entire chain below. This is important. Move up chain and repeat. Repeat over entire chain till. Done! Essential Math for Games

Essential Math for Games Addendum Pretty easy. Much simpler than the Jacobian. Problems. Takes more updates of chain and steps than Jacobian does. Simpler individual steps, need more of them. Essential Math for Games

Essential Math for Games Addendum Moves end joints first. Heuristic inherently favors them. Local minima problem Results in unnatural configurations. E.g Wrist bent oddly to reach goal. Worse than Jacobian about this. Basically Gauss-Seidel. SOR can help. Essential Math for Games

Essential Math for Games Demo Snake From Jeff Lander darwin3d.com/gdm/1998.htm Essential Math for Games

Essential Math for Games Anthropomorphic Other 2 solutions are general purpose solutions Most games have people. We know something about them. Standard principle of computer science. Use knowledge of problem domain to simplify problem Essential Math for Games

Essential Math for Games Rainbow 6: Lockdown Leave wrist alone. Inaccurate, but good enough and difficult to get right. Treat elbow as a 1DOF joint. Not precisely accurate. But good enough. Treat the shoulder as 3DOF joint with no constraints. Again, not entirely true but good enough. Essential Math for Games

Essential Math for Games Rainbow 6: Lockdown Leg can be run through same algorithm as Arm. (mostly) Knee can be simulated as a 1DOF joint. (Elbow) Hip can be simulated as a 3DOF joint (Shoulder) Have second pass to fix Ankle. Essential Math for Games

Essential Math for Games Algorithm Elbow defines the distance between the shoulder and the end effector. Simple Trig problem Law of Cosines B A Q C Essential Math for Games

Essential Math for Games Algorithm After that, simply run one step of the CCD algorithm on the shoulder. Done! Simple, accurate within a tolerable margin, and cheap. Essential Math for Games

Essential Math for Games References Welman, Chris, “Inverse Kinematics and Geometric Constraints for Articulated Figure Manipulation”, Simon Fraser University. 1993. Meredith, Michael and Maddock, Steve, “Real-Time Inverse Kinematics: The Return of the Jacobian” University of Sheffield Tolani, Goswami, and Badler, “Real-Time Inverse Kinematics Techniques for Anthropomorphic Limbs”, University of Pennsylvania. 2000 Blow, Jonathan, “Oh My God! I Inverted Kine”. Game Developer. September 1998 Parent, Rick, “Computer Animation: Algorithms and Techniques”, Morgan-Kaufmann, San Francisco, 2001. Essential Math for Games

Questions?