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

Slides:



Advertisements
Similar presentations
COMP Robotics: An Introduction
Advertisements

Kinematic Synthesis of Robotic Manipulators from Task Descriptions June 2003 By: Tarek Sobh, Daniel Toundykov.
Animating Speed Position and Orientation Presented by Kailash Sawant Hemanth Krishnamachari.
Inverse Kinematics Professor Nicola Ferrier ME 2246,
Outline: Introduction Link Description Link-Connection Description
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.
Trajectory Generation
Path planning, 2012/2013 winter1 Robot Path Planning CONTENTS 1. Introduction 2. Interpolation.
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 Editing and Retargetting Jinxiang Chai. Outline Motion editing [video, click here]here Motion retargeting [video, click here]here.
Methods For Nonlinear Least-Square Problems
CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai.
IK: Choose these angles!
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!
CSCE 689: Forward Kinematics and Inverse Kinematics
Chapter 5: Path Planning Hadi Moradi. Motivation Need to choose a path for the end effector that avoids collisions and singularities Collisions are easy.
Animation CS 551 / 651 Kinematics Lecture 09 Kinematics Sarcos Humanoid.
CSCE 641 Computer Graphics: Image-based Modeling (Cont.) Jinxiang Chai.
Inverse Kinematics (part 1) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
Inverse Kinematics Jacobian Matrix Trajectory Planning
1cs426-winter-2008 Notes  SIGGRAPH crunch time - my apologies :-)
역운동학의 구현과 응용 Implementation of Inverse Kinematics and Application 서울대학교 전기공학부 휴먼애니메이션연구단 최광진
Goal Directed Design of Serial Robotic Manipulators
Advanced Graphics (and Animation) Spring 2002
Definition of an Industrial Robot
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Kinematic Linkages.
Chap 5 Kinematic Linkages
Inverse Kinematics.
Inverse Kinematics Kris Hauser
Lecture 2: Introduction to Concepts in Robotics
Inverse Kinematics.
Simulation and Animation
Chapter 5 Trajectory Planning 5.1 INTRODUCTION In this chapters …….  Path and trajectory planning means the way that a robot is moved from one location.
Chapter 5 Trajectory Planning 5.1 INTRODUCTION In this chapters …….  Path and trajectory planning means the way that a robot is moved from one location.
Robotics Chapter 5 – Path and Trajectory Planning
KINEMATICS ANALYSIS OF ROBOTS (Part 2)
CSCE 441: Computer Graphics Forward/Inverse kinematics Jinxiang Chai.
Inverting the Jacobian and Manipulability
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.
Kinematics. The function of a robot is to manipulate objects in its workspace. To manipulate objects means to cause them to move in a desired way (as.
1cs426-winter-2008 Notes  Will add references to splines on web page.
Outline: Introduction Solvability Manipulator subspace when n<6
Trajectory Generation
Robotics II Copyright Martin P. Aalund, Ph.D.
Rick Parent - CIS681 Reaching and Grasping Reaching control synthetic human arm to reach for object or position in space while possibly avoiding obstacles.
1cs426-winter-2008 Notes. 2 Kinematics  The study of how things move  Usually boils down to describing the motion of articulated rigid figures Things.
Numerical Methods for Inverse Kinematics Kris Hauser ECE 383 / ME 442.
Fundamentals of Computer Animation
Robotics Chapter 3 – Forward Kinematics
Assignment 6 IK + Interpolation. Objective Get key poses by IK Implement the Catmull-Rom algorithm to interpolate poses for in-between frames Display.
CSCE 441: Computer Graphics Forward/Inverse kinematics
IK: Choose these angles!
IK: Choose these angles!
Trajectory Generation
Character Animation Forward and Inverse Kinematics
Inverse Manipulator Kinematics
INVERSE MANIPULATOR KINEMATICS
Inverse Kinematics (Reza N. Jazar, Ch. 6)
CSCE 441: Computer Graphics Forward/Inverse kinematics
Computer Animation Algorithms and Techniques
Outline: Introduction Solvability Manipulator subspace when n<6
Chapter 4 . Trajectory planning and Inverse kinematics
CHAPTER 3-2. Planar Cartesian Kinematics
Presentation transcript:

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 Robot arm animation (click here)here Pixar lamp animation (click here)here

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

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

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

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

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 R 3 for most things, R 2 for planar arms

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

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

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)

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)

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)

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

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)

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)

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)

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.

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

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

Numerical Approaches Inverse kinematics can be formulated as an optimization problem

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

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

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

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 Finding the minimum for F(x,y) : x +,y + = argmin x,y (3x+2y-5) 2 +(4x-5y-6) 2 Could be nonlinear equations!

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

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

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

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

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

Gradient-based Optimization

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

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?

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

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

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

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

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?

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

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

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

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

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

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

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

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)

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’s position (x,y)

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)

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

Jacobian Matrix: 2D-link Structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

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

Jacobian Matrix: 2D-link Structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

Jacobian Matrix: 2D-link Structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

Jacobian Matrix: 2D-link Structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

Jacobian Matrix: 2D-link Structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

Jacobian Matrix: 2D-link Structure Base θ2θ2 θ1θ1 (0,0) θ2θ2 l2l2 l1l1 C=(c 1,c 2 )

Gauss-Newton Approach Step 1: initialize the joint angles with Step 2: update the joint angles: Step size: specified by the user

When to stop Option #1: when the change of solution from previous iteration to the current one is below a user-specified threshold. Option #2: When the number of iteration reaches a user-specified threshold. Option #3: either #1 or #2 is satisfied.

Iterative Approaches for IK 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

C/C++ Optimization Library levmar : Levenberg-Marquardt nonlinear least squares algorithms in C/C+ - Works with/without analytical Jacobian matrix - Speeds up the optimization process with analytical Jacobian matrix.

Another Example A 2D lamp character 62

Another Example A 2D lamp character 63

Forward Kinematics A 2D lamp character Given,, how to compute the global position of the point A? ? 64

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

Inverse Kinematics 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?

Inverse Kinematics 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

Human Characters 68

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

Inverse Kinematics Is the solution unique? Is there always a good solution?

Ambiguity of IK Multiple solutions

Ambiguity of IK Infinite solutions

Failures of IK Solution may not exist

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

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

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

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

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)

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)

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) Satisfy the constraints How natural is the solution pose?

Interactive Human Character Posing Video (click here)here

Summary of IK Very simple structure allows an analytic solution Most of complex articulated figures requires a numerical solution May not always get the “right” solution - need additional objectives