Inverse Kinematics Inverse Kinematics Inverse Kinematics Carnegie - - PowerPoint PPT Presentation

inverse kinematics inverse kinematics inverse kinematics
SMART_READER_LITE
LIVE PREVIEW

Inverse Kinematics Inverse Kinematics Inverse Kinematics Carnegie - - PowerPoint PPT Presentation

Inverse Kinematics Inverse Kinematics Inverse Kinematics Carnegie Carnegie Sebastian Grassia Sebastian Grassia Mellon Mellon School of Computer Science School of Computer Science Define the Problem Define the Problem Define the Problem


slide-1
SLIDE 1

Inverse Kinematics Inverse Kinematics Inverse Kinematics

Carnegie Mellon Carnegie Mellon

Sebastian Grassia Sebastian Grassia School of Computer Science School of Computer Science

slide-2
SLIDE 2

Define the Problem Define the Problem Define the Problem

Goals Goals

  • Drag in realtime with mouse

Drag in realtime with mouse

  • Maintain multiple constraints

Maintain multiple constraints

  • Figure responds in “reasonable”

Figure responds in “reasonable” ways ways

p p

2 2

p p

3 3

p p

1 1

Stay put Stay put follow mouse follow mouse

slide-3
SLIDE 3

... Then Name the System! ... Then Name the System! ... Then Name the System!

Use standard transformation hierarchy Use standard transformation hierarchy

p1 = T(x, y, z)R(

θ,φ,ϕ)TR(γ)...TR(σ) pb

... ...

p1 = C(q(t))

p p

2 2

p p

3 3

p p

1 1

root root

q(t) =

slide-4
SLIDE 4

Idea #1 Idea #1 Idea #1

C(q(t)) = pm(t) C(q(t)) = pm(t)

Let Let

pm(t) = pm(t) = C(q(t)) = C(q(t)) =

3D mouse positioner at time 3D mouse positioner at time t t position of hand at time position of hand at time t t

... ... then solve for then solve for q

q such that

such that

slide-5
SLIDE 5

Unfortunately... Unfortunately... Unfortunately...

contains rotations, therefore nonlinear, contains rotations, therefore nonlinear, and very difficult to solve and very difficult to solve

Can be solved for: Can be solved for:

  • articulated chains

articulated chains

Has real problems with: Has real problems with:

  • branching hierarchies

branching hierarchies

  • multiple constraints

multiple constraints

  • convincing motion

convincing motion

C(q(t)) = pm(t) C(q(t)) = pm(t)

slide-6
SLIDE 6

Idea #2 Idea #2 Idea #2

Let’s differentiate! Let’s differentiate!

∂ ∂t pm(t) = C(q(t))

( )

∂ ∂t pm(t) = C(q(t))

( )

˙ p

m = ∂C

∂q ˙

q ˙ p

m = ∂C

∂q ˙

q

desired – actual desired – actual state space velocity state space velocity Jacobian Jacobian J

J

slide-7
SLIDE 7

A Diffy Q by any other name... A Diffy Q by any other name... A Diffy Q by any other name...

˙ p = J ˙ q ˙ p = J ˙ q

Underdetermined linear system Underdetermined linear system Can solve for Can solve for

˙ q ˙ q

= = ˙ p ˙ p

˙ q ˙ q

J J . . . . . . . . . . . . q(t + ∆t) = q(t) + ∆t ˙ q (t) q(t + ∆t) = q(t) + ∆t ˙ q (t)

Iterate during interaction using: Iterate during interaction using:

slide-8
SLIDE 8

Are we there yet? Are we there yet? Are we there yet?

Alas, no. Alas, no. We got We got a a solution for solution for but it may not be a but it may not be a reasonable reasonable one.

  • ne.

Why not? Why not?

˙ q ˙ q

slide-9
SLIDE 9

Scaling Scaling Scaling

radians radians degrees degrees

When there’s a choice, When there’s a choice, least squares solver always least squares solver always moves shoulder before elbow moves shoulder before elbow Measuring both angles in radians Measuring both angles in radians still leaves figure stiff-armed still leaves figure stiff-armed

What can we do about this? What can we do about this?

slide-10
SLIDE 10

Let’s get physical! Let’s get physical! Let’s get physical!

f = Mv f = Mv

fG + fC = M˙ q fG + fC = M˙ q

Generalized Force Generalized Force

f = Ma f = Ma

Why not Why not

? ?

Constraint Force Constraint Force Mass Matrix Mass Matrix

Aristotlean physics: Aristotlean physics:

slide-11
SLIDE 11

Blend on High for 2 minutes... Blend on High for 2 minutes... Blend on High for 2 minutes...

fG + fC = M˙ q fG + fC = M˙ q ˙ q = W fG + J

( )

˙ q = W fG + J

( )

˙ p = JWfG + JWJ

˙ p = JWfG + JWJ

Define: Define: W = M

−1

W = M

−1

p = C(q) p = C(q) ˙ p = J˙ q ˙ p = J˙ q J = ∂C

∂q

J = ∂C

∂q

Constraints Constraints Solve Solve Where Where Recall Recall

get get substitute substitute

fG + J

Tλ = M ˙

q fG + J

Tλ = M ˙

q

Lagrange Multipliers Lagrange Multipliers

slide-12
SLIDE 12

Recalling Lagrange Multipliers Recalling Lagrange Multipliers Recalling Lagrange Multipliers

Point-on-circle Point-on-circle

fC = λN C(x) = x − r = 0 C(x) = x − r = 0

Assumption of Assumption of passive passive constraints constraints stipulated that point along stipulated that point along constraint gradient constraint gradient

fC fC

∂C ∂x = N ∂C ∂x = N

Then... Then... Now... Now...

Constraint gradients: Constraint gradients:

∂C ∂q = J ∂C ∂q = J

fC fC is a

is a linear combination linear combination of

  • f

constraint gradients: constraint gradients:

fC = J Tλ

slide-13
SLIDE 13

and wind up with: and wind up with: and wind up with:

˙ p − JWfG = JWJ

˙ p − JWfG = JWJ

= = J J J

T

J

T

W W

λ λ

Can solve for Can solve for λ λ, plug into formula for , plug into formula for ˙

q ˙ q

slide-14
SLIDE 14

Have we solved the scaling problem? Have we solved the scaling problem? Have we solved the scaling problem?

We get a velocity that obeys We get a velocity that obeys the “physical law” ... the “physical law” ...

f = Mv f = Mv ˙ q ˙ q So it all depends on what So it all depends on what is. is.

M M

determines how the system responds determines how the system responds to applied forces. to applied forces.

M M

slide-15
SLIDE 15

How well can we do? How well can we do? How well can we do?

If approximate figure by rigid, If approximate figure by rigid, uniform density, simple shapes... uniform density, simple shapes... Can derive and compute an Can derive and compute an from minimizing kinetic energy from minimizing kinetic energy

  • f articulated figure
  • f articulated figure

Minimum energy consumption is good! Minimum energy consumption is good!

M(q) M(q)

slide-16
SLIDE 16

A word about J A word about J A word about J

Can compute all derivatives Can compute all derivatives efficiently in recursive efficiently in recursive tree traversal tree traversal p only depends on ancestors p only depends on ancestors in hierarchy in hierarchy

1 1

p p

1 1

root root

Therefore, Therefore, is sparse. Exact is sparse. Exact pattern depends on ordering pattern depends on ordering

  • f
  • f q

q.

.

J J

slide-17
SLIDE 17

What’s in the online notes What’s in the online notes What’s in the online notes

  • More detailed derivations

More detailed derivations

  • Formula for computing Mass Matrix

Formula for computing Mass Matrix

  • Pseudocode for tree traversal

Pseudocode for tree traversal

  • Bibliography

Bibliography

slide-18
SLIDE 18

That’s Just the Beginning... That’s Just the Beginning... That’s Just the Beginning...

  • One sided constraints

One sided constraints → → joint limits joint limits

  • Hierarchical constraints

Hierarchical constraints

  • Spring “muscles”

Spring “muscles”

  • Build complex constraint functions for

Build complex constraint functions for higher level behavior higher level behavior