Inverse Kinematics. Mike Bailey.

Similar documents
Inverse Kinematics. Mike Bailey. Oregon State University. Inverse Kinematics

DIFFERENTIATION AND INTEGRATION PART 1. Mr C s IB Standard Notes

Numerical Methods for Inverse Kinematics

3 Algebraic Methods. we can differentiate both sides implicitly to obtain a differential equation involving x and y:

Numerical Optimization Algorithms

MATH 312 Section 2.4: Exact Differential Equations

Vector, Matrix, and Tensor Derivatives

0 MATH Last Updated: September 7, 2012

MATH 312 Section 8.3: Non-homogeneous Systems

8-1: Backpropagation Prof. J.C. Kao, UCLA. Backpropagation. Chain rule for the derivatives Backpropagation graphs Examples

EDEXCEL NATIONAL CERTIFICATE UNIT 4 MATHEMATICS FOR TECHNICIANS OUTCOME 4 TUTORIAL 1 - INTEGRATION

Note: Please use the actual date you accessed this material in your citation.

Solutions for the Practice Final - Math 23B, 2016

x+ y = 50 Dividing both sides by 2 : ( ) dx By (7.2), x = 25m gives maximum area. Substituting this value into (*):

Instructions: No books. No notes. Non-graphing calculators only. You are encouraged, although not required, to show your work.

Displacement, Velocity, and Acceleration AP style

Stokes and the Surveyor s Shoelaces

18.02 Multivariable Calculus Fall 2007

Dr. Allen Back. Sep. 10, 2014

MATH 280 Multivariate Calculus Fall Integrating a vector field over a surface

Vector calculus background

Tangent Planes, Linear Approximations and Differentiability

N-CN Complex Cube and Fourth Roots of 1

(A) Opening Problem Newton s Law of Cooling

Robotics: Tutorial 3

EDEXCEL NATIONAL CERTIFICATE UNIT 4 MATHEMATICS FOR TECHNICIANS OUTCOME 4 - CALCULUS

17 Solution of Nonlinear Systems

Mechanics, Heat, Oscillations and Waves Prof. V. Balakrishnan Department of Physics Indian Institute of Technology, Madras

Integration is the reverse of the process of differentiation. In the usual notation. k dx = kx + c. kx dx = 1 2 kx2 + c.

Some Notes on Linear Algebra

Vectors, metric and the connection

Lecture 13 - Wednesday April 29th

Math 265 (Butler) Practice Midterm III B (Solutions)

Review for the Final Exam

Mathematics Algebra. It is used to describe the world around us.

Module 2: Reflecting on One s Problems

Robot Control Basics CS 685

1 Last time: inverses

Calculus III - Problem Solving Drill 18: Double Integrals in Polar Coordinates and Applications of Double Integrals

Representation of Functions as Power Series

SOLUTIONS TO THE FINAL EXAM. December 14, 2010, 9:00am-12:00 (3 hours)

Math 3C Lecture 20. John Douglas Moore

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim

42. Change of Variables: The Jacobian

3. On the grid below, sketch and label graphs of the following functions: y = sin x, y = cos x, and y = sin(x π/2). π/2 π 3π/2 2π 5π/2

AP Calculus BC Chapter 4 AP Exam Problems. Answers

Solution. This is a routine application of the chain rule.

PHYSICS 234 HOMEWORK 2 SOLUTIONS. So the eigenvalues are 1, 2, 4. To find the eigenvector for ω = 1 we have b c.

Review for the First Midterm Exam

Contraction Mappings Consider the equation

One important way that you can classify differential equations is as linear or nonlinear.

Multistep Methods for IVPs. t 0 < t < T

Announcements Monday, October 02

Modeling and Solving Constraints. Erin Catto Blizzard Entertainment

Announcements Wednesday, October 10

A FIRST COURSE IN LINEAR ALGEBRA. An Open Text by Ken Kuttler. Lecture Notes by Karen Seyffarth Adapted by LYRYX SERVICE COURSE SOLUTION

2t t dt.. So the distance is (t2 +6) 3/2

The Cross Product. Philippe B. Laval. Spring 2012 KSU. Philippe B. Laval (KSU) The Cross Product Spring /

THEODORE VORONOV DIFFERENTIABLE MANIFOLDS. Fall Last updated: November 26, (Under construction.)

Chapter 2. Motion in One Dimension. AIT AP Physics C

Multiple Integrals. Introduction and Double Integrals Over Rectangular Regions. Philippe B. Laval KSU. Today

The Relation between the Integral and the Derivative Graphs. Unit #10 : Graphs of Antiderivatives, Substitution Integrals

MATH The Chain Rule Fall 2016 A vector function of a vector variable is a function F: R n R m. In practice, if x 1, x n is the input,

REVIEW OF DIFFERENTIAL CALCULUS

Here is a summary of our last chapter, where we express a periodic wave as a Fourier series.

Exam 3 MATH Calculus I

ENGINEERING MATH 1 Fall 2009 VECTOR SPACES

Graphs of Antiderivatives, Substitution Integrals

All of my class notes can be found at

Quaternions. Mike Bailey. Computer Graphics Quaternions.pptx

For those who want to skip this chapter and carry on, that s fine, all you really need to know is that for the scalar expression: 2 H

Multiple Integrals. Introduction and Double Integrals Over Rectangular Regions. Philippe B. Laval. Spring 2012 KSU

Mathematical Concepts & Notation

Chapter 5: Integrals

. =. a i1 x 1 + a i2 x 2 + a in x n = b i. a 11 a 12 a 1n a 21 a 22 a 1n. i1 a i2 a in

SECTION 5: POWER FLOW. ESE 470 Energy Distribution Systems

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

A FIRST COURSE IN LINEAR ALGEBRA. An Open Text by Ken Kuttler. Matrix Arithmetic

Matrices and Determinants

MITOCW ocw feb k

D(f/g)(P ) = D(f)(P )g(p ) f(p )D(g)(P ). g 2 (P )

2.20 Fall 2018 Math Review

MATH Harrell. An integral workout. Lecture 21. Copyright 2013 by Evans M. Harrell II.

Information About Ellipses

Multiplying matrices by diagonal matrices is faster than usual matrix multiplication.

18.02 Multivariable Calculus Fall 2007

Math 265H: Calculus III Practice Midterm II: Fall 2014

SYDE 112, LECTURE 7: Integration by Parts

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2

Chapter 2: Numeric, Cell, and Structure Arrays

Ch 4 Differentiation

Math Refresher Course

LESSON 21: DIFFERENTIALS OF MULTIVARIABLE FUNCTIONS OCTOBER 18, 2017

Note: Please use the actual date you accessed this material in your citation.

Math 216 Final Exam 14 December, 2012

16.2 Iterated Integrals

AIMS Exercise Set # 1

LESSON 21: DIFFERENTIALS OF MULTIVARIABLE FUNCTIONS MATH FALL 2018

Rotational Kinematics

Terminology and notation

Transcription:

Inverse Kinematics This work is licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International License Mike Bailey mjb@cs.oregonstate.edu inversekinematics.pptx

Inverse Kinematics Forward Kinematics solves the problem if I know the link transformation parameters, where are the links?. Inverse Kinematics (IK) solves the problem If I know where I want the links to be (X,Y), what link transformation parameters will put them there? (X,Y) 3 3 1 1 Ground

Inverse Kinematics (IK): Things Need to Move What Parameters Will Make Them Do That?

Remember the Idea Behind Newton s Method? Pick an initial guess of the input parameter and keep refining it until the answer it produces is close enough 1. y dy dx x. x y have dy dx 3. x x x Now we just need to do it with more than one input parameter

Jacobian Method Our input parameters (in this case) are the three rotation angles. If (X, Y) are where we want the end of the third link to end up, then: X f(,, ) 1 3 and Y If you have a good guess for ( 1,, 3), which currently produce an (X, Y) that is not quite what you want, then you can refine your values for ( 1,, 3) and try again. The fundamental equations for this are: g(,, ) 1 3 X X approx X X 1 1 X X 3 3 Y Y approx Y Y 1 1 Y Y 3 3

3 1 3 1 Y Y Y X X X Or, in matrix form: is called the Jacobian, and is abbreviated as [ J ]: Y X Y Y Y X X X 3 1 3 1 3 1 The matrix: Y X J 3 1 x 3 3 x 1 x 1 The Jacobian Matrix

Solving the Equations Note that [J] is not a square matrix, so this system of equations cannot be solved for directly. But, if we pre-multiply by the transpose of [ J ], we get: [ J ] T J 1 3 [ J ] T X Y ( 3 x x 3 ) 3 x 1 ( 3 x x 1 ) 3 x 3 3 x 1 3 x 1 which is solvable because it is 3-equations-3-unknowns. It is not obvious, but this is the Least Squares formulation. It will give an optimum (ΔΘ 1, ΔΘ,ΔΘ 3 ) to make (X,Y) move closer to the desired values.

Iterating to get a Solution (note similarity to Newton s Method) Differentiate the equations X f(,, ) and Pick a starting Θ1, Θ, and Θ3 1. Compute X approx and Y approx from 1 3 ( 1,, 3). Compute ΔX=X-X approx and ΔY=Y-Y approx 3. If ΔX and ΔY are small enough, we re done Y g(,, ) 1 3 4. Compute: X 1, X, X 3, Y 1, Y, Y 3 5. Form the Jacobian [ J ] 6. Solve the system of equations: [ J ] T J 1 [ J ] 3 T X Y 7. Refine: ; ; 1 1 1 3 3 3

The Calculus Product Rule Tells us How to Differentiate Scalar Variables that have been Multiplied c ab dc d( ab) da db ba d d d d

[ M] [ T][ R ] The Calculus Product Rule Tells us How to Differentiate Matrices that have been Multiplied dm [ ] d([ T][ R ]) dt [ ] d[ R ] [ R ] [ T] d d d d 0 dr [ ] d cos sin 0 0 sin cos 0 0 d sin cos 0 0 cos sin 0 0 d 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0

Numerical Differentiation Rather then explicitly differentiating an equation, it is often easier to calculate the derivative numerically. This is known as the Central Difference method, where you look both forward and backwards to see how the dependent variable is changing with respect to the independent variable: X X( ) X( ) Pick a delta that is small, but not so small that floating point accuracy becomes an issue

Numerical Differentiation If there are other independent variables, hold them constant: X X( 11,, 3) X( 11,, 3) 1 1

Numerical Differentiation In case you ever need it, here is how to compute the second derivative X X X X ( ) ( ) ( ) As before, if there are other independent variables, hold them constant:

Another IK Approach: Cyclic Coordinate Descent (CCD) Method The idea is to change Θ1 so that (X,Y) are as close to (X,Y) as possible. Then change Θ. Then change Θ3. Then change Θ1. Then change Θ. Then change Θ3. Then change Θ1.... 3 (X,Y) 1 Ground (X,Y)

Changing Θ1 Holding Θ and Θ3 constant, rotate Θ1 so that the blue lines line up. 3 (X,Y) 1 Ground (X,Y)

Changing Θ1 (X,Y) Ground (X,Y)

Changing Θ Holding Θ1 and Θ3 constant, rotate Θ so that the blue lines line up. (X,Y) Ground (X,Y)

Changing Θ (X,Y) Ground (X,Y)

Changing Θ3 Holding Θ1 and Θ constant, rotate Θ3 so that the blue lines line up. (X,Y) Ground (X,Y)

Changing Θ3 (X,Y) Ground (X,Y)

Now, do it again -- Changing Θ1 (X,Y) Ground (X,Y)

Now, do it again -- Changing Θ1 (X,Y) (X,Y)

Now, do it again -- Changing Θ (X,Y) (X,Y)

Now, do it again -- Changing Θ (X,Y) (X,Y)

Now, do it again -- Changing Θ3 (X,Y) (X,Y)

Now, do it again -- Changing Θ3 (X,Y) (X,Y)

Computing how much to change a rotation (in this example, we are changing θ ) Where we want to be: (X,Y ) Where we are now: (X 3,Y 3 ) Y Ground X Use the C/C++ atan( ) function: = atan( Y -Y, X -X ); = atan( Y 3 -Y, X 3 -X ); Δ = - Do not use the C/C++ atan( ) function: = atan( (Y -Y ) / (X -X ) ); = atan( (Y 3 -Y ) / (X 3 -X ) ); Δ = -