assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · forward and inverse...

28
Announcements Assignment 1 on the web page: www.cs.cmu.edu/~jkh/anim_class.html Test login procedure NOW! 02/22/02

Upload: others

Post on 04-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Ann

ounc

emen

ts

Ass

ignm

ent 1

on

the

web

pag

e:

ww

w.c

s.cm

u.ed

u/~

jkh/

anim

_cla

ss.h

tml

Tes

t log

in p

roce

dure

NO

W!

02/2

2/02

Page 2: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

For

war

d an

d In

vers

e K

inem

atic

s CO

MP

UT

ER

AN

IMA

TIO

N

15-4

97/1

5-86

1

02/2

6/02

Par

ent:

Cha

pter

4.2

Gira

rd a

nd

Mac

ieje

wsk

i 19

85

Zha

o an

d B

adle

r 199

4

Page 3: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Kin

emat

ics

•La

st tw

o cl

asse

s: h

ow to

inte

rpol

ate

posi

tions

/tran

slat

ions

and

orie

ntat

ions

•B

ut w

e al

so n

eed

to s

et th

e keyf

ram

es—

mak

e th

e fo

ot c

ome

into

con

tact

with

the

ball,

for

exam

ple

Page 4: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Hie

rarc

hica

l Mod

els

•W

ant s

truc

ture

for

body

to b

e m

aint

aine

d

–P

ivot

join

t

–P

rism

atic

join

t

–B

all a

nd s

ocke

t joi

nt

Page 5: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Hum

an M

odel

s

Art

icul

ated

figu

res

are

a ho

rrib

le a

ppro

xim

atio

n

http

://ov

rt.n

ist.g

ov/p

roje

cts/

vrm

l/h-ani

m/jo

intIn

fo.h

tml

Page 6: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Hie

rarc

hica

l Mod

els

in S

imul

atio

n

Way

ne W

oote

n, Gat

ech

Page 7: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Kin

emat

ics

•T

he s

tudy

of m

otio

n w

ithou

t reg

ard

to th

e fo

rces

that

ca

use

it.

For

war

d:

B

ackw

ard:

)

,(

βα

fA

=)

(,

1A

f−

αD

raw

gra

phic

sS

peci

fy fe

wer

deg

rees

of f

reed

omM

ore

intu

itive

con

trol

of d

ofM

aint

ain

cont

act w

ith th

e en

viro

nmen

tC

alcu

late

des

ired

join

t ang

les

for

cont

rol

αβ

A

Page 8: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

For

war

d K

inem

atic

s

)si

n(si

n

)co

s(co

s

21

21

1

21

21

1

θθ

θθ

θθ

++

=+

+=

LL

y

LL

x

=

1000

1zyx

[][

][][

]1

12

θro

ttr

ansL

rot

tran

sL=

2L2θ 1θ

1L

Page 9: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Why

Inve

rse

Kin

emat

ics?

2L2θ 1θ

1L

•P

ick

up a

n ob

ject

or

plac

e fe

et o

n th

e gr

ound

Har

d to

do

with

forw

ard

kine

mat

ics

•A

llow

ani

mat

or to

set

few

er

para

met

ers

or a

t lea

st g

et a

goo

d fir

st

appr

oxim

atio

n

Page 10: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Use

r Con

trol

via

Inve

rse

Kin

emat

ics

•Jo

int s

pace

–P

ositi

on a

ll jo

ints—

fine

leve

l of c

ontr

ol

•C

arte

sian

spa

ce

–S

peci

fy e

nviro

nmen

tal i

nter

actio

ns e

asily

–M

ost d

egre

es o

f fre

edom

com

pute

d au

tom

atic

ally

Page 11: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Wha

t do

we

need

?

•N

atur

al lo

okin

g pa

th o

r ju

st a

goa

l pos

ition

? (t

ime

cohe

renc

y)

•Lo

cal o

r gl

obal

sol

utio

n?

Page 12: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Why

Inve

rse

Kin

emat

ics

—C

ontr

ol

•B

alan

ce--

-kee

p ce

nter

of m

ass

over

su

ppor

t pol

ygon

•C

ontr

ol--

-pos

ition

vaul

ter’s

han

ds o

n lin

e be

twee

n sh

ould

er a

nd v

ault

•C

ontr

ol--

-com

pute

kne

e an

gles

that

will

gi

ve th

e ru

nner

the

right

leg

leng

th

Page 13: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Wha

t do

we

need

?

2L2θ 1θ

1L

•S

kele

ton

with

1,2

,3 d

egre

e of

free

dom

join

ts

•S

olve

from

roo

t pos

ition

to e

nd e

ffect

or

posi

tion

•A

rbitr

ary

posi

tion

cons

trai

nts

•D

irect

ion/

orie

ntat

ion

cons

trai

nts

•Jo

int l

imits

•T

echn

ique

s fo

r ha

ndlin

g un

cons

trai

ned

syst

em

–A

ddin

g co

nstr

aint

s

–H

euris

tics

to p

ush

solu

tion

into

rig

ht p

art o

f sp

ace

–O

ptim

izat

ion

base

d on

som

e cr

iterio

n

Page 14: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Inve

rse

Kin

emat

ics

—C

lose

d F

orm

Sol

utio

n

2L

218

0θ−

1θ1L

++

−−

=

++

−−

=−

++

−−

++

=

+−

−+

+=

+=

+=

21

2 22 1

22

2

21

2 22 1

22

2

22

1

2 22

22 1

1

22

1

2 22

22 1

1

22

22

2

)(

cos

rule

co

sine

2

)(

)18

0co

s(

2

cos

rule

co

sine

2)

cos(

cos

)co

s(

LL

LL

yx

a

LL

LL

yx

yx

L

Ly

xL

a

yx

L

Ly

xL

yx

xa

yx

x

T

T

T

T

θ

θ

θθ

θθ

θ

θ

Page 15: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Met

hods

•C

lose

d fo

rm—

only

for

fairl

y si

mpl

e m

echa

nism

s

•Ite

rativ

e so

lutio

ns

•S

olut

ions

•N

o so

lutio

n (o

utsi

de w

orks

pace

, too

few

do

f)

•M

ultip

le s

olut

ions

(re

dund

ancy

)

•S

ingl

e so

lutio

n

Page 16: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Wha

t mak

es IK

har

d?--

Red

unda

ncie

s

{}

X)

(

if )

...,

,(

by

de

fined

subs

pace

a

21

x

=∈

θθ

θθ

θθ

θf

xn

Add

con

stra

ints

to r

educ

e re

dund

anci

es

Cho

ose

solu

tion

that

is

•“c

lose

st”

to c

urre

nt c

onfig

urat

ion

•M

ove

oute

rmos

t lin

ks th

e m

ost

•E

nerg

y m

inim

izat

ion

•M

inim

um ti

me

•N

atur

al lo

okin

g m

otio

n???

Page 17: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Wha

t mak

es IK

har

d?--

sing

ular

ities

•Ill

-con

ditio

ned

near

sin

gula

ritie

s

•H

igh

stat

e sp

ace

velo

citie

s fo

r lo

w

cart

esia

n vel

ociti

es Goa

l

Page 18: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Rea

chab

le W

orks

pace

21

22

21

LL

yx

LL

+≤

+≤

−A

gain

, not

so

sim

ple

for

mor

e co

mpl

ex m

echa

nism

s

Page 19: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Itera

tive

Met

hod

Use

d in

Gira

rd a

nd Mac

ieje

wsk

i 198

5D

escr

ibed

in P

aren

t

Use

s in

vers

e of

Jaco

bian

to it

erat

ivel

y st

ep a

ll th

ejo

int a

ngle

s to

war

ds th

e go

al

Page 20: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

The

Jac

obia

n

jiij

xfJ

Jij

xJ

xx

nxm

xx

f

∂∂=

∂=

∂∂

=

is

ofel

emen

t th

the

whe

re)

(

)(

ch

ange

s

aldi

ffere

nti

to)

(

of ch

ange

s

aldi

ffere

nti

re

latin

gm

atrix

th

eis

Jaco

bian

dof)

of

(# m

dim

ensi

on

of

is

6) (g

ener

ally

n di

men

sion

of is

)

(

θθ

θθ

θθ

Jaco

bian

map

s ve

loci

ties

in s

tate

spa

ce to

vel

ociti

es

in c

arte

sian

spac

e. Ja

cobi

an is d

epen

dent

on

stat

e (a

nd m

ust b

e re

com

pute

d fr

eque

ntly

).

Page 21: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

The

Jac

obia

n—

usin

g P

aren

t’s n

otat

ion

[]

∂∂∂∂∂∂

=

∂∂===

nznxx

ij

T

n

Tz

yx

zy

x

vv

J

VJ

vv

vV

θωθθθ

θθ

θθ

ωω

ω

ΜΟΚ

1

.

2

.

1

..

...,

,,

,,

,

Page 22: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

IK a

nd th

e Ja

cobi

an

k

kk

xtJ

xJJ

x

xf

mnx

xf

θθ

θθθ

θθ

θ

abou

t

linea

rize

)(

dof)

of

(# di

men

sion

of is

6) (g

ener

ally

di

men

sion

of is

)

(

11

1

1

∂∆

+=

∂=

∂∂

=∂

=

=

−+

x

xx

∂+

goal

x

An

itera

tive

solu

tion

Page 23: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Inve

rtin

g th

e Ja

cobi

an

()

()

()

()1

1

.

.1

1

.

. w

here

in

vers

e-

pseu

do

com

pute

gene

ral

in

sq

uare

not

is

−−

+

+

−−

+

==

=

=

=

=

TT

TT

TT

TT

TT

JJJ

JJ

JJ

VJ

JJ

JJ

VJ

JJ

JJ

VJ

JV

J

nxm

J

θ

θ

θ

θ

Page 24: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Usi

ng th

e Ja

cobi

an

for I

K

•Sin

gula

ritie

s ca

use

the

rank

of t

he

Jaco

bian

to

chan

ge

•Jac

obia

n is v

alid

onl

y fo

r th

e co

nfig

urat

ion

for

whi

ch it

was

com

pute

d

•Pse

udo

inve

rse

min

imiz

es jo

int a

ngle

rat

es (

loca

lly)

•Cou

ld m

inim

ize

othe

r qu

antit

ies

Page 25: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Non

-Lin

ear O

ptim

izat

ion

Zha

o an

d B

adle

r, T

OG

199

4 (poi

nter

from

syl

labu

s)

Non

-line

ar p

rogr

amm

ing—

num

eric

al m

etho

d fo

r fin

ding

the

(loca

l) m

inim

um o

f a n

on-lin

ear

func

tion

Obj

ectiv

e fu

nctio

nC

onst

rain

tsN

on-li

near

opt

imiz

atio

n ro

utin

e

Page 26: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Obj

ectiv

e F

unct

ion

•Pos

ition

of e

nd e

ffect

or

•Or

posi

tion

and

orie

ntat

ion

•Or

aim

ing

at•F

or e

xam

ple,

you

mig

ht w

ant t

he h

and

to s

lide

alon

g th

e ta

blet

op o

r to

kee

p th

e gl

ass

uprig

ht.

)(2

)(

)(

)(

2

px

xP

xp

xP

x−

=∇

−=

)(2

),

(

)(2

),

(

vec

tors

lor

thon

orm

a

ofpa

ir a

as go

aln

orie

ntat

io

the

is ,

w

here

)(

)(

)(

22

,

eg

ee

y

eg

ee

x

gg

eg

eg

ee

yy

yx

P

xx

yx

P

yx

yy

xx

yx

P

ee

−=

−=

−+

−=

Page 27: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

For

mul

atio

n

ii

ii

iT i

iT i

u

l

ba

ba

≤−

≤−

<=

θθθθθ

es

ineq

ualit

i

are

lim

itsjo

int

su

bjec

t to

)G

(

min

imiz

e

tech

niqu

enu

mer

ical

st

anda

rd a

use

)(

)(

an

d )

(e

Pe

GG

x

T

∇∂∂

=∇

θθ

θθ

Sol

utio

n

Page 28: Assignment 1 on the web page: jkh/anim ...jkh/anim_class/kinematics.pdf · Forward and Inverse Kinematics COMPUTER ANIMATION 15-497/15-861 02/26/02 Parent: Chapter 4.2 Girard and

Sum

mar

y of

Kin

emat

ics

•F

orw

ard

is s

trai

ghtfo

rwar

d

•In

vers

e us

ually

req

uire

s a

num

eric

al s

olut

ion

•M

ay n

ot a

lway

s ge

t the

“rig

ht”

answ

er

–F

ram

e-to-

fram

e co

here

nce

(fix

long

seg

men

ts)

–N

atur

al lo

okin

g m

otio

n (h

ow d

efin

ed?)

–If

you

don’

t lik

e th

e so

lutio

n ad

d m

ore

cons

trai

nts

—ha

rdly

an

ele

gant

sol

utio

n…

The

stu

dy o

f mot

ion

with

out r

egar

d to

the

forc

es th

at c

ause

it--

-so

, wha

t abo

ut th

ose

forc

es?

Sim

ulat

ion-

--T

echn

ique

#3