mathematics for mathematics for inverse kinematics
TRANSCRIPT
![Page 1: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/1.jpg)
Mathematics forMathematics for Inverse Kinematics
15‐464: Technical Animation15 464: Technical Animation
Ming Yao
![Page 2: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/2.jpg)
OverviewOverview
• Kinematics
• Forward Kinematics and Inverse KinematicsForward Kinematics and Inverse Kinematics
• Jabobian
• Pseudoinverse of the Jacobian
• Assignment 2Assignment 2
![Page 3: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/3.jpg)
Vocabulary of KinematicsVocabulary of Kinematics
• Kinematics is the study of how things move, it describes the motion of a hierarchical skeleton structure.
• Base and End Effector• Base and End Effector.
Base
End Effector
Kinematic Chain
![Page 4: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/4.jpg)
FK vs IKFK vs. IK
Forward Kinematics
I Ki tiInverse Kinematics
![Page 5: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/5.jpg)
Forward KinematicsForward Kinematics
• The process of computing world space geometric description based on joint DOF g p jvalues.
θ2θ
L1
L3P1 e
θ1
θ3
L2(0,0)
P2
![Page 6: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/6.jpg)
Forward KinematicsForward Kinematics
• We have joint DOF values:
• We want the end effector description in world space (N=3 in our case):p ( )
• FK gives us:
![Page 7: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/7.jpg)
But Sometimes We Want the OppositeBut Sometimes We Want the Opposite
k h h f h• We want to know how the upper joints of the hierarchy would rotate if we want the end effector to reach some goaleffector to reach some goal.
• Animations • RoboticsAnimations Robotics
Images are from google and youtube
![Page 8: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/8.jpg)
Inverse KinematicsInverse Kinematics
• The goal of inverse kinematics is to compute the vector of joint DOFs that will cause the jend effector to reach some desired goal state
θ2θ
θ1
θ3
![Page 9: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/9.jpg)
Inverse KinematicsInverse Kinematics
• We have:
• And we want:
• We need:
![Page 10: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/10.jpg)
Inverse Kinematics IssuesInverse Kinematics Issues
• While FK is relatively easy to evaluate.
• IK is more challenging: several possibleIK is more challenging: several possible solutions, or sometimes maybe no solutions.
R i C l d E i i• Require Complex and Expensive computations to find a solution.
![Page 11: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/11.jpg)
IK SolutionsIK Solutions
• Jacobian
• Cyclic Coordinate Descent (CCD)Cyclic Coordinate Descent (CCD)
• Required to implement in Assignment 2
![Page 12: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/12.jpg)
The JacobianThe Jacobian
• What is Jacobian? A linear approximation to f()
Actual
Linear Approximation
![Page 13: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/13.jpg)
The JacobianThe Jacobian
• Matrix of partial derivatives of entire system.
• Defines how the end effector e changesDefines how the end effector e changes relative to instantaneous changes in the systemsystem.
![Page 14: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/14.jpg)
The JacobianThe Jacobian
![Page 15: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/15.jpg)
The JacobianThe Jacobian
• Recall that
![Page 16: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/16.jpg)
ProblemsProblems
• How to compute J?
Numerically (Required)Numerically (Required)
Analytically (Extra Credit)
H t i t J?• How to invert J?
Pseudoinverse of Jacobian (Required)
Cheat by using transpose (Too easy, we don’t do that)
![Page 17: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/17.jpg)
Computing the Jacobian NumericallyComputing the Jacobian Numerically
• Let’s examine one column of the JacobianMatirx
W dd ll ∆θ θ• We can add a small ∆θ to θi
• Then we can calculate how the end effectormoves: ∆e = e’ – e
N h• Now we have:
![Page 18: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/18.jpg)
Computing the Jacobian NumericallyComputing the Jacobian Numerically
• We can use this method to fill the JacobianWe can use this method to fill the JacobianMatirx!
![Page 19: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/19.jpg)
Computing the Jacobian AnalyticallyComputing the Jacobian Analytically
i l j i h li h i h• For a rotational joint, the linear change in the end effector is the cross product of the axis of revolution and a vector from the joint to the end effector.
• Important to make sure all the coordinate l i th di t tvalues are in the same coordinate system.
(Hard to get right.)
![Page 20: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/20.jpg)
Computing the Jacobian Analytically —A 2D example
gg
L
θ
θ2
θ3
P1 eL1
L3
θ1P2L2
![Page 21: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/21.jpg)
Inverting the JacobianInverting the Jacobian
• No guarantee it is invertible– Typically not a square matrix.yp y q
– Singularities.
Even it’s invertible as the pose vector changes– Even it s invertible, as the pose vector changes, the properties of the matrix will change.
![Page 22: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/22.jpg)
Inverting the Jacobian—Pseudo Inverse
• We can try using the pseudo inverse to find a matrix that effectively inverts a non‐square y qmatrix:
![Page 23: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/23.jpg)
Inverting the Jacobian—Pseudo Inverse
![Page 24: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/24.jpg)
Inverting the Jacobian—Jacobian Transpose
• Another technique is just to use the transpose of the Jacobian matrix.
• The Jacobian is already an approximation to f() Cheat moref()—Cheat more
• It is much faster.
• But if you prefers quality over performance, the pseudo inverse method would be betterthe pseudo inverse method would be better.
![Page 25: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/25.jpg)
Solving IK Incremental ChangesSolving IK—Incremental Changes
• FK is nonlinear
• Implies that the Jacobian can only be used asImplies that the Jacobian can only be used as an approximation that is valid near the current configurationconfiguration
• So we must Repeat the process of computing a Jacobian and then taking a small step towards the goal until we get close enoughtowards the goal until we get close enough
![Page 26: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/26.jpg)
Solving IK—Algorithm of the Jacobian Method
![Page 27: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/27.jpg)
Cyclic Coordinate Descent (CCD)Cyclic Coordinate Descent (CCD)
• Much easier than the Jacobian Method
• Read two articles “Oh My God, I inverted Kine!”Read two articles Oh My God, I inverted Kine! and “Making Kine More Flexible”
Will b lk d b i• Will be talked about next time
![Page 28: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/28.jpg)
Assignment 2Assignment 2
• Will be out later today.
• Require to implement the Jacobian MethodRequire to implement the Jacobian Method and CCD.
L d ASF fil i M d dd IK h• Load ASF file into Maya and add IK to the skeleton.
• Start early! More challenging than Assignment 11.
![Page 29: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/29.jpg)
Assignment 1 is Due TonightAssignment 1 is Due Tonight
• Handin videos and presentation materials
• Presentation on Thursday!Presentation on Thursday!
![Page 30: Mathematics for Mathematics for Inverse Kinematics](https://reader034.vdocuments.mx/reader034/viewer/2022051404/58676f851a28ab87408ba4dd/html5/thumbnails/30.jpg)
Questions?Questions?
• Thank you and See you Thursday!