1 / 78

CSCE 441: Computer Graphics Forward/Inverse kinematics

CSCE 441: Computer Graphics Forward/Inverse kinematics. Jinxiang Chai. Outline. Animation basics: Forward kinematics Inverse kinematics. Kinematics. The study of movement without the consideration of the masses or forces that bring about the motion. Animation.

marthabaker
Download Presentation

CSCE 441: Computer Graphics Forward/Inverse kinematics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSCE 441: Computer Graphics Forward/Inverse kinematics Jinxiang Chai

  2. Outline Animation basics: • Forward kinematics • Inverse kinematics

  3. Kinematics The study of movement without the consideration of the masses or forces that bring about the motion

  4. Animation • Robot arm animation (click here) • Pixar lamp animation (click here)

  5. Degrees of Freedom (Dofs) The set of independent displacements that specify an object’s pose

  6. Degrees of Freedom (Dofs) The set of independent displacements that specify an object’s pose • How many degrees of freedom when flying?

  7. Degrees of Freedom (Dofs) The set of independent displacements that specify an object’s pose • How many degrees of freedom when flying? • So the kinematics of this airplane permit movement anywhere in three dimensions • Six • x, y, and z positions • roll, pitch, and yaw

  8. Degrees of Freedom • How about this robot arm? Click (here) • Six • 2-shoulder, 1-elbow, 3-wrist

  9. Configuration Space vs. Work Space • Configuration space • The space that defines the possible object configurations • Degrees of Freedom • The number of parameters that are necessary and sufficient to define position in configuration • Work space • The space in which the object exists • Dimensionality • R3 for most things, R2 for planar arms

  10. Forward vs. Inverse Kinematics • Forward Kinematics • Compute configuration (pose) given individual DOF values • Inverse Kinematics • Compute individual DOF values that result in specified end effector’s position

  11. End Effector Base Example: Two-link Structure • Two links connected by rotational joints θ2 l2 l1 θ1 X=(x,y)

  12. End Effector Base Example: Two-link Structure • Animator specifies the joint angles: θ1θ2 • Computer finds the position of end-effector: x θ2 l2 l1 θ1 X=(x,y) (0,0) x=f(θ1, θ2)

  13. End Effector Base Example: Two-link Structure • Animator specifies the joint angles: θ1θ2 • Computer finds the position of end-effector: x θ2 θ2 l2 l1 θ1 X=(x,y) (0,0) x = (l1cosθ1+l2cos(θ2+ θ2) y = l1sinθ1+l2sin(θ2+ θ2))

  14. End Effector Base Forward Kinematics • Create an animation by specifying the joint angle trajectories θ2 θ2 l2 l1 θ1 X=(x,y) (0,0) θ1 θ2

  15. Forward Kinematics lower arm middle arm Upper arm base A 2D lamp with 6 degrees of freedom

  16. Base Inverse Kinematics • What if an animator specifies position of end-effector? θ2 θ2 l2 l1 End Effector θ1 X=(x,y) (0,0)

  17. Base Inverse Kinematics • Animator specifies the position of end-effector: x • Computer finds joint angles: θ1θ2 θ2 θ2 l2 l1 End Effector θ1 X=(x,y) (0,0) (θ1, θ2)=f-1(x)

  18. Base Inverse Kinematics • Animator specifies the position of end-effector: x • Computer finds joint angles: θ1θ2 θ2 θ2 l2 l1 End Effector θ1 X=(x,y) (0,0)

  19. Why Inverse Kinematics? • Motion capture • Basic tools in character animation - key frame generation - animation control - interactive manipulation • Computer vision (video-based mocap) • Robotics • Bioinfomatics (Protein Inverse Kinematics) • Etc.

  20. Inverse Kinematics • Given end effector’s positions, compute required joint angles • In simple case, analytic solution exists • Use trig, geometry, and algebra to solve

  21. Inverse Kinematics • Analytical solution only works for a fairly simple structure • Numerical/iterative solution needed for a complex structure

  22. Numerical Approaches • Inverse kinematics can be formulated as an optimization problem

  23. Function Optimization • Finding the minimum for nonlinear functions F(x) x

  24. Optimization As a Tool • How to use optimization to solve the following linear system? 3x + 2y = 5; 4x – 5y = 6

  25. Optimization As a Tool • How to use optimization to solve the following linear system? 3x + 2y = 5; 4x – 5y = 6 Define a function: F(x,y) = (3x+2y-5)2+(4x-5y-6)2

  26. Optimization As a Tool • How to use optimization to solve the following linear system? 3x + 2y = 5; 4x – 5y = 6 Could be nonlinear equations! Define a function: F(x,y) = (3x+2y-5)2+(4x-5y-6)2 Finding the minimum for F(x,y) : x+,y+= argminx,y (3x+2y-5)2+(4x-5y-6)2

  27. Optimization As a Tool • How to use optimization to solve the following linear system? f(x, y) = 0; g(x,y) = 0 Could be nonlinear equations! Define a function: F(x,y) = f(x,y)2+g(x,y)2 Finding the minimum for F(x,y) : x+,y+= argminx,y f(x,y)2+g(x,y)2

  28. Base Formulation • So how to convert the IK process into an optimization function? Find the pose satisfying: θ2 θ2 l2 l1 θ1 C=(Cx,Cy) (0,0)

  29. Base Iterative Approaches Find the joint angles θ that minimizes the distance between the hypothesized character position and user specified position hypothesized position specified position θ2 θ2 l2 l1 θ1 C=(Cx,Cy) (0,0)

  30. Base Iterative Approaches Find the joint angles θ that minimizes the distance between the hypothesized character position and user specified position θ2 θ2 l2 l1 θ1 C=(c1,c2) (0,0)

  31. Iterative Approaches Mathematically, we can formulate this as an optimization problem: The above problem can be solved by many nonlinear optimization algorithms: - Steepest descent - Gauss-newton - Levenberg-marquardt, etc

  32. Gradient-based Optimization

  33. Gauss-Newton Approach Step 1: initialize the joint angles with Step 2: update the joint angles until the solution converges:

  34. Gauss-Newton Approach Step 1: initialize the joint angles with Step 2: update the joint angles until the solution converges: How can we decide the amount of update?

  35. Gauss-Newton Approach Step 1: initialize the joint angles with Step 2: update the joint angles:

  36. Gauss-Newton Approach Step 1: initialize the joint angles with Step 2: update the joint angles: Known!

  37. Gauss-Newton Approach Step 1: initialize the joint angles with Step 2: update the joint angles: Taylor series expansion

  38. Gauss-Newton Approach Step 1: initialize the joint angles with Step 2: update the joint angles: Taylor series expansion rearrange

  39. Gauss-Newton Approach Step 1: initialize the joint angles with Step 2: update the joint angles: Taylor series expansion: linear approximation rearrange Can you solve this optimization problem?

  40. Gauss-Newton Approach Step 1: initialize the joint angles with Step 2: update the joint angles: Taylor series expansion rearrange This is a quadratic function of

  41. Gauss-Newton Approach • Optimizing an quadratic function is easy • It has an optimal value when the gradient is zero

  42. Gauss-Newton Approach • Optimizing an quadratic function is easy • It has an optimal value when the gradient is zero b J Δθ Linear equation!

  43. Gauss-Newton Approach • Optimizing an quadratic function is easy • It has an optimal value when the gradient is zero b J Δθ

  44. Gauss-Newton Approach • Optimizing an quadratic function is easy • It has an optimal value when the gradient is zero b J Δθ

  45. Jacobian Matrix • Jacobian maps the velocity in joint angle space to velocities in Cartesian space (x,y) A small change of θ1and θ2results in how much change of end-effector position (x,y) θ2 θ1

  46. Jacobian Matrix • Jacobian maps the velocity in joint angle space to velocities in Cartesian space (x,y) A small change of θ2results in how much change of end-effector position f=(x,y) θ2 θ1

  47. Base Jacobian Matrix: 2D-link Structure θ2 θ2 l2 l1 θ1 C=(c1,c2) (0,0)

  48. Base Jacobian Matrix: 2D-link Structure θ2 θ2 l2 l1 θ1 C=(c1,c2) (0,0) f2 f1

  49. Base Jacobian Matrix: 2D-link Structure θ2 θ2 l2 l1 θ1 C=(c1,c2) (0,0)

  50. Base Jacobian Matrix: 2D-link Structure θ2 θ2 l2 l1 θ1 C=(c1,c2) (0,0)

More Related