Kinematics Manipulator Kinematics P P y 1 y 1 x 1 x 1 Many - - PowerPoint PPT Presentation

kinematics
SMART_READER_LITE
LIVE PREVIEW

Kinematics Manipulator Kinematics P P y 1 y 1 x 1 x 1 Many - - PowerPoint PPT Presentation

Kinematics Manipulator Kinematics P P y 1 y 1 x 1 x 1 Many slides adapted from: Siegwart, Nourbakhsh and Scaramuzza, Autonomous Mobile Robots Renata Melamud, An Introduction to Robot Kinematics, CMU Rick Parent, Computer Animation,


slide-1
SLIDE 1

Kinematics

Manipulator Kinematics

x1 y1 P

θ

x1 y1 P

θ

Many slides adapted from: Siegwart, Nourbakhsh and Scaramuzza, Autonomous Mobile Robots Renata Melamud, An Introduction to Robot Kinematics, CMU Rick Parent, Computer Animation, Ohio State Steve Rotenberg, Computer Animation, UCSD

slide-2
SLIDE 2

2

Bookkeeping

u Upcoming:

u Projects:

u Wiki permissions – http://tiny.cc/robotics-team-schedules

u Posted tonight:

u Quiz 3: Manipulation, Grasping, Kinematics u Con

  • ncep

cepts! s!

u Homework 2

u Resolution, Kinematics & IK, Course Progress

u Today: Inverse kinematics

slide-3
SLIDE 3

3

u Forward:

u Inputs: joint angles u Outputs: coordinates of end-effector

u Inverse:

u Inputs: desired coordinates of end-effector u Outputs: joint angles

u Inverse kinematics are tricky

u Multiple solutions u No solutions u Dead spots

Forward & Inverse

Joint space (robot space – previously R)

θ1, θ2, …, θn

Cartesian space (global space – previously I)

(x,y,z}, r/p/y

slide-4
SLIDE 4

4

Forward Kinematics

u We will sometimes use the vector Φ to represent the array of

M joint values:

u We will sometimes use the vector e to represent an array of

N joint values that describe the end effector in world space:

u Example:

u If our end effector is a full joint with orientation, e would contain 6

DOFs: 3 translations and 3 rotations. If we were only concerned with the end effector position, e would just contain the 3 translations.

[ ]

M

φ φ φ ...

2 1

= Φ

e = e1 e2 ... eN ⎡ ⎣ ⎤ ⎦

slide-5
SLIDE 5

5

Describing A Manipulator

joint i joint i-1 joint i+1

u Arm made up of links in a chain

u How to describe each link? u Many choices exist u DH parameters widely used

u Although it’s not true that quaternions are not widely used

u Joints each have coordinate system

u {x,y,z}, r/p/y — OR!!

u DH parameters

u Denavit-Hartenberg u ai-1, αi-1, di, θ2

slide-6
SLIDE 6

6

DH Parameters

ai-1 : link length – distance Zi-1 and Zi along Xi αi-1 : link twist – angle Zi-1 and Zi around Xi di : link offset – distance Xi-1 to Xi along Zi θ2 : joint angle – angle Xi-1 and Xi around Zi

slide-7
SLIDE 7

7

u We are we looking for:

Transformation matrix T going from i to i-1:

u Determine position and orientation of end-effector

as function of displacements in joints

u Why?

u We can multiply out along all joints

Forward: i à i-1

i-1Ti

(or T )

i i-1

slide-8
SLIDE 8

8

Translation

ξI = xI yI zI θ ξR = xR yR zR θ Origin of R in I: 3 1 In 3D: 1 0 0 0 0 1 0 3 0 0 1 0 0 0 0 1 Generally: 1 0 0 x 0 1 0 y 0 0 1 z 0 0 0 1

slide-9
SLIDE 9

9

Rotation

ξI = x y z θI ξR = x y z θR Generally: Review? Introduction to Homogeneous Transformations & Robot Kinematics Jennifer Kay 2005

slide-10
SLIDE 10

10

Example: Rotation in Plane

slide-11
SLIDE 11

11

ai-1 : distance Zi-1 and Zi along Xi αi-1 : angle Zi-1 and Zi around Xi di : distance Xi-1 to Xi along Zi θ2 : angle Xi-1 and Xi around Zi

u Coordinate transformation:

Transformation i to i-1 (2)

screw displacement: screw displacement:

slide-12
SLIDE 12

12

Transformation i to i-1 (3)

Transformation in DH:

slide-13
SLIDE 13

13

Inverse Kinematics

u Goal:

u Compute the vector of joint DOFs that will cause the end

effector to reach some desired goal state

u In other words, it is the inverse previous problem

u Instead of function from world space to robot space.

( )

e Φ

1 −

= f

( )

Φ e f =

ßà

slide-14
SLIDE 14

14

Inverse Kinematics Issues

u IK is challenging!

u f() is (usually) relatively easy to evaluate u f -1() usually isn’t

u Issues:

u There may be several possible solutions for Φ u There may be no solutions u If there is a solution, it may be expensive to find it u There are some local-minimum “stuck” configurations

u Many different approaches to solving IK problems

slide-15
SLIDE 15

15

Analytical vs. Numerical

u One major way to classify IK-solving approaches:

analyt ytica ical vs numer merica ical methods

u Analytical

u Find an exact solution by directly inverting the forward

kinematics equations.

u Works on relatively simple chains.

u Numerical

u Use approximation and iteration to converge on a solution. u More expensive, more general purpose.

u We will look at one technique: Jacobians

slide-16
SLIDE 16

Calculus Review

Review adapted from: Steve Rotenberg, Computer Animation, UCSD http://graphics.ucsd.edu/courses/cse169_w05

slide-17
SLIDE 17

17

Derivative of a Scalar Function

u If we have a scalar function f of a single variable x, we

can write it as f(x)

u Derivative of function with respect to x is df/dx u The derivative is defined as:

( ) ( )

x x f x x f x f dx df

x x

Δ − Δ + = Δ Δ =

→ Δ → Δ

lim lim

slide-18
SLIDE 18

18

Derivative of a Scalar Function

f-axis x-axis x f(x) Slope=df/dx

slide-19
SLIDE 19

19

Derivative of f(x)=x2

( ) ( ) ( ) ( )

x x x x x x x x x x x x x x x x x dx df x x f

x x x x

2 2 lim 2 lim 2 lim lim : example For

2 2 2 2 2 2 2

= Δ + = Δ Δ + Δ = Δ − Δ + Δ + = Δ − Δ + = =

→ Δ → Δ → Δ → Δ

( ) ( )

x x f x x f

x

Δ − Δ + =

→ Δ

lim

slide-20
SLIDE 20

20

Exact vs. Approximate

u Many algorithms require the computation of derivatives u Sometimes, we can compute them. For example: u Sometimes function is complex, can’t compute an exact derivative u As long as we can evaluate the function, we can always

approximate a derivative

( )

x dx df x x f 2

2

= =

( ) ( )

x x x f x x f dx df Δ Δ − Δ + ≈ small for

slide-21
SLIDE 21

21

Approximate Derivative

f-axis x-axis Δx f(x) f(x+Δx) Slope=Δf/Δx

slide-22
SLIDE 22

22

Nearby Function Values

u If we know the value of a function and its derivative

at some x, we can estimate what the value of the function is at other points near x

( ) ( )

dx df x x f x x f dx df x f dx df x f Δ + ≈ Δ + Δ ≈ Δ ≈ Δ Δ

slide-23
SLIDE 23

23

Finding Solutions to f(x)=0

u There are many mathematical and computational

approaches to finding values of x for which f(x)=0

u One such way is the gradient descent method u If we can evaluate f(x) and df/dx for any value of x,

we can always follow the gradient (slope) in the direction (currently) headed towards 0

slide-24
SLIDE 24

24

Gradient Descent

u We want to find the value of x that causes f(x) to equal 0 u We will start at some value x0 and keep taking small steps:

xi+1 = xi + Δx until we find a value xN that satisfies f(xN)=0

u For each step, (try to) choose a value of Δx that gets

closer to our goal

u Use the derivative as approximation of slope of function u Use this to move ‘downhill’ towards zero

slide-25
SLIDE 25

25

Gradient Descent

f-axis x-axis xi f(xi) df/dx

slide-26
SLIDE 26

26

Minimization

u If f(xi) is not 0, the value of f(xi) can be thought of as an error u Goal of gradient descent: minimize this error

u Making it a member of the class min

minimiza imization ion alg lgor

  • rit

ithms ms

u Each step Δx results in function changing its value

u Call this Δf

u Ideally, Δf = -f(xi) – in other words, want to take a step Δx

that causes Δf to cancel out the error

u Realistically, hope each step brings us closer, and we can

eventually stop when we get close enough

u This iterative process is consistent with numerical algorithms

slide-27
SLIDE 27

27

Choosing Δx Step

u Safety vs. efficiency

u If step size is too small, converges very slowly u If step size is too large, algorithm not reduce f.

u Because the first order approximation is valid only locally.

u If function varies widely, what is safest? u If we have a relatively smooth function? u If we feel very confident?

u We could try stepping directly to where linear

approximation passes through 0