Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai.

Similar presentations


Presentation on theme: "CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai."— Presentation transcript:

1 CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai

2 Outline Kinematics –Forward kinematics –Inverse kinematics

3 Required Readings IK survey paper IK using nonlinear programming

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

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? Six again 2-base, 1-shoulder, 1-elbow, 2-wrist

9 Work Space vs. Configuration Space Work space –The space in which the object exists –Dimensionality R 3 for most things, R 2 for planar arms 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

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 position

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

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

13 Example: Two-link Structure Animator specifies the joint angles: θ 1 θ 2 Computer finds the position of end-effector: x Base End Effector θ2θ2 θ1θ1 x = (l 1 cosθ 1 +l 2 cos(θ 2 + θ 2 ) y = l 1 sinθ 1 +l 2 sin(θ 2 + θ 2 )) (0,0) θ2θ2 l2l2 l1l1 X=(x,y)

14 Forward kinematics Base End Effector θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 Create an animation by specifying the joint angle trajectories θ1θ1 θ2θ2 X=(x,y)

15 Inverse kinematics What if an animator specifies position of end- effector? Base End Effector θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 X=(x,y)

16 Inverse kinematics Animator specifies the position of end-effector: x Computer finds joint angles: θ 1 θ 2 Base End Effector θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 (θ 1, θ 2 )=f -1 (x) X=(x,y)

17 Inverse kinematics Animator specifies the position of end-effector: x Computer finds joint angles: θ 1 θ 2 Base End Effector θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 X=(x,y)

18 Why Inverse Kinematics? Basic tools in character animation - key frame generation - animation control - interactive manipulation Computer vision (vision based mocap) Robotics Bioinfomatics (Protein Inverse Kinematics)

19 Inverse kinematics Given end effector position, compute required joint angles In simple case, analytic solution exists –Use trig, geometry, and algebra to solve

20 Inverse kinematics Analytical solution only works for a fairly simple structure Iterative approach needed for a complex structure

21 Iterative approach Inverse kinematics can be formulated as an optimization problem

22 Iterative approaches Find the joint angles θ that minimizes the distance between the character position and user specified position Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(Cx,Cy)

23 Iterative approaches Find the joint angles θ that minimizes the distance between the character position and user specified position Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

24 Iterative approach 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

25 Gauss-newton approach Step 1: initialize the joint angles with Step 2: update the joint angles:

26 Gauss-newton approach Step 1: initialize the joint angles with Step 2: update the joint angles: How can we decide the amount of update?

27 Gauss-newton approach Step 1: initialize the joint angles with Step 2: update the joint angles:

28 Gauss-newton approach Step 1: initialize the joint angles with Step 2: update the joint angles: Known!

29 Gauss-newton approach Step 1: initialize the joint angles with Step 2: update the joint angles: Taylor series expansion

30 Gauss-newton approach Step 1: initialize the joint angles with Step 2: update the joint angles: Taylor series expansion rearrange

31 Gauss-newton approach Step 1: initialize the joint angles with Step 2: update the joint angles: Taylor series expansion rearrange Can you solve this optimization problem?

32 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

33 Gauss-newton approach Optimizing an quadratic function is easy It has an optimal value when the gradient is zero

34 Gauss-newton approach Optimizing an quadratic function is easy It has an optimal value when the gradient is zero b J Δθ Linear equation!

35 Gauss-newton approach Optimizing an quadratic function is easy It has an optimal value when the gradient is zero b J Δθ

36 Gauss-newton approach Optimizing an quadratic function is easy It has an optimal value when the gradient is zero b J Δθ

37 Jacobian matrix Jacobian is a M by N matrix that relates differential changes of θ to changes of C Jacobian maps the velocites in joint space to velocities in Cartesian space Jacobian depends on current state Dofs (N) The number of constraints (M)

38 Jacobian matrix Jacobian maps the velocity in joint angle space to velocities in Cartesian space (x,y) θ1θ1 θ2θ2

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

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

41 Jacobian matrix Jacobian maps the velocity in joint angle space to velocities in Cartesian space (x,y) θ1θ1 θ2θ2 The ratio between angular velocities and linear velocities

42 Jacobian matrix: 2D-link structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

43 Jacobian matrix: 2D-link structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 ) f1f1 f2f2

44 Jacobian matrix: 2D-link structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

45 Jacobian matrix: 2D-link structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

46 Jacobian matrix: 2D-link structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

47 Jacobian matrix: 2D-link structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

48 Jacobian matrix: 2D-link structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

49 Gauss-newton approach Step 1: initialize the joint angles with Step 2: update the joint angles: Step size: specified by the user

50 Another Example A 2D lamp character 50

51 Composite 2D Transformation What’s the current coordinate A ? 51

52 More Complex Characters? A 2D lamp with 6 degrees of freedom base Upper arm lower arm middle arm If you do inverse kinematics with position of this point What’s the size of Jacobian matrix?

53 More Complex Characters? A 2D lamp with 6 degrees of freedom base Upper arm lower arm middle arm If you do inverse kinematics with position of this point What’s the size of Jacobian matrix? 2-by-6 matrix

54 More Complex Characters? How to compute the Jacobian matrix, e.g. base Upper arm lower arm middle arm

55 More Complex Characters? How to compute the Jacobian matrix, e.g. base Upper arm lower arm middle arm The ratio between angular velocities and linear velocities!

56 More Complex Characters? base The ratio between angular velocities and linear velocities! Rotation axis v 2 How to compute the Jacobian matrix, e.g.

57 More Complex Characters? base The ratio between angular velocities and linear velocities! x Rotation axis v 2 How to compute the Jacobian matrix, e.g. From college physics

58 More Complex Characters? base The ratio between linear velocities and linear velocities! - For more details, check the paper from required readings How to compute the Jacobian matrix, e.g.

59 Human Characters 59

60 Inverse kinematics Analytical solution only works for a fairly simple structure Iterative approach needed for a complex structure

61 Inverse kinematics Is the solution unique? Is there always a good solution?

62 Ambiguity of IK Multiple solutions

63 Ambiguity of IK Infinite solutions

64 Failures of IK Solution may not exist

65 Inverse kinematics Generally ill-posed problem when the number of Dofs is higher than the number of constraints

66 Inverse kinematics Generally ill-posed problem when the number of Dofs is higher than the number of constraints Additional objective –Minimal Change from a reference pose θ 0

67 Inverse kinematics Generally ill-posed problem when the number of Dofs is higher than the number of constraints Additional objective –Minimal Change from a reference pose θ 0

68 Inverse kinematics Generally ill-posed problem when the number of Dofs is higher than the number of constraints Additional objective –Minimal Change from a reference pose θ 0 Satisfy the constraints Minimize the difference between the solution and a reference pose

69 Inverse kinematics Generally ill-posed problem when the number of Dofs is higher than the number of constraints Additional objective –Minimal Change from a reference pose θ 0 –Naturalness g(θ) (particularly for human characters)

70 Inverse kinematics Generally ill-posed problem when the number of Dofs is higher than the number of constraints Additional objective –Minimal Change from a reference pose θ 0 –Naturalness g(θ) (particularly for human characters)

71 Inverse kinematics Generally ill-posed problem when the Dofs is higher than the number of constraints Additional objective –Minimal Change from a reference pose θ 0 –Naturalness g(θ) (particularly for human characters) Satisfy the constraints How natural is the solution pose?

72 Interactive Human Character Posing video


Download ppt "CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai."

Similar presentations


Ads by Google