35
1 CS 231 Control for articulate rigid-body dynamic simulation (continued) CS 231 CS 231 Control for articulate rigid Control for articulate rigid- body body dynamic simulation (continued) dynamic simulation (continued) Human motion capture Human motion capture + rich with style, detail + rich with style, detail -- -- hard to adapt to new scenarios hard to adapt to new scenarios Dynamic simulation Dynamic simulation + physically realistic + physically realistic + handles changing environment + handles changing environment -- -- requires control requires control Motivation for both Motivation for both mocap mocap and physics and physics

CS 231 Control for articulate rigid-body dynamic simulation

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CS 231 Control for articulate rigid-body dynamic simulation

1

CS 231

Control for articulate rigid-bodydynamic simulation (continued)

CS 231CS 231

Control for articulate rigidControl for articulate rigid--bodybodydynamic simulation (continued) dynamic simulation (continued)

Human motion captureHuman motion capture+ rich with style, detail+ rich with style, detail---- hard to adapt to new scenarioshard to adapt to new scenarios

Dynamic simulationDynamic simulation+ physically realistic+ physically realistic+ handles changing environment+ handles changing environment---- requires controlrequires control

Motivation for both Motivation for both mocapmocap and physicsand physics

Page 2: CS 231 Control for articulate rigid-body dynamic simulation

2

Tracking ControlTracking Control

DynamicModel

PDPD--servo controller computes torquesservo controller computes torques

TrackingControl

MotionData

is joint angles of is joint angles of simsimdesdes from motion datafrom motion data

k and b are uniform k and b are uniform stiffness and dampingstiffness and damping

I

bk des

)()(

Simulation

Motion Capture

0.0 1.0 2.0 3.0 4.0 5.0time (s)

sho

uld

er E

ule

r an

gle

s (

sho

uld

er E

ule

r an

gle

s ( r

adrad

))

3.0

2.0

1.0

0.0

Page 3: CS 231 Control for articulate rigid-body dynamic simulation

3

Motivation Motivation

Physically simulated characters need highPhysically simulated characters need high--level feedbacklevel feedback

Motion capture Motion capture Tracking onlyTracking only

MomentumMomentum--basedbasedBalance controlBalance control

plus trackingplus trackingFail !

Comparison of simulation to motion Comparison of simulation to motion

Simulation motionSimulation motionMotion captureMotion capture

Page 4: CS 231 Control for articulate rigid-body dynamic simulation

4

Motivation for PhysicsMotivation for Physics

Physically simulated characters can be responsivePhysically simulated characters can be responsive

MultiMulti--objective controlobjective controlAbe et al. 2007, Abe et al. 2007, DaDa Silva Silva et al. 2008abet al. 2008ab

Page 5: CS 231 Control for articulate rigid-body dynamic simulation

5

MultiMulti--objective controlobjective controlAbe et al. 2007, Abe et al. 2007, DaDa Silva Silva et al. 2008abet al. 2008ab

Use optimization (Quadratic Program) to satisfyUse optimization (Quadratic Program) to satisfymultiple objectives:multiple objectives:

--TrackingTracking--BalanceBalance--Other?Other?

While also obeying physics and friction limitsWhile also obeying physics and friction limits

Balance ControlBalance Control

support polygonsupport polygon

footLfootL

footRfootR

center of masscenter of mass

Static balanceStatic balance

Page 6: CS 231 Control for articulate rigid-body dynamic simulation

6

footLfootL

footRfootR

Balance ControlBalance Control

Control center of mass (Control center of mass (cc):):

)()( cdcckc ldesldes

II

Where:Where:

Constrained such thatConstrained such that

MultiMulti--Objective Optimization Objective Optimization

NFfric

332211 CwCwCw minmin

2

1 ccC des 2

2 )( desC

……etcetc

Page 7: CS 231 Control for articulate rigid-body dynamic simulation

7

Friction limitsFriction limits

Given a reference motion Given a reference motion that describes the desired that describes the desired style, a control system is style, a control system is derived that can reproduce derived that can reproduce that style in simulation and that style in simulation and in new environments.in new environments.

Numerical optimization provides a framework for Numerical optimization provides a framework for computing a solution that is optimal in the context of computing a solution that is optimal in the context of prioritized goals. prioritized goals.

Goals are balance and style, the optimization technique is Goals are balance and style, the optimization technique is still quadratic programming. still quadratic programming.

InteractiveInteractive SimulationSimulation ofof StylizedStylized HumanHuman LocomotionLocomotiondada Silva et alSilva et al

Page 8: CS 231 Control for articulate rigid-body dynamic simulation

8

A balanceA balance strategy is prestrategy is pre--computed for the given motion computed for the given motion using automated analysis and using automated analysis and simplified modelsimplified model

By tailoring the balance strategy in By tailoring the balance strategy in this manner, a controller this manner, a controller preserves style with a cautious preserves style with a cautious strategystrategy

InteractiveInteractive SimulationSimulation ofof StylizedStylized HumanHuman LocomotionLocomotiondada Silva et alSilva et al

The 3 link modelThe 3 link model’’s root is the s root is the contact foot and it has two 3 contact foot and it has two 3 DOF actuators acting at the DOF actuators acting at the hipships

Control torques are Control torques are precomputedprecomputed and stored with and stored with ““stylestyle”” control for behaviorcontrol for behavior

InteractiveInteractive SimulationSimulation ofof StylizedStylized HumanHuman LocomotionLocomotiondada Silva et alSilva et al

Page 9: CS 231 Control for articulate rigid-body dynamic simulation

9

Video Break Video Break

The results are promising: The results are promising:

Maintains lifelike human motion in dynamic Maintains lifelike human motion in dynamic environments, which is difficult to environments, which is difficult to accomplish with kinematics or dynamics accomplish with kinematics or dynamics alonealone

Transforms a single recorded motion, valid Transforms a single recorded motion, valid for one environment only, into a general for one environment only, into a general purpose action that can be used in many purpose action that can be used in many other settings or even composed with other other settings or even composed with other actions to create versatile charactersactions to create versatile characters

InteractiveInteractive SimulationSimulation ofof StylizedStylized HumanHuman LocomotionLocomotiondada Silva et alSilva et al

Page 10: CS 231 Control for articulate rigid-body dynamic simulation

10

MultiObjectiveMultiObjective control with momentumcontrol with momentum

Humans regulate momentumHumans regulate momentum

Humans conserve spin momentum (about CM) Humans conserve spin momentum (about CM) for many behaviors (for many behaviors (PopovicPopovic et al 04et al 04))

RoboticistsRoboticists have produced humanlike responses have produced humanlike responses to falling by controlling momentumto falling by controlling momentum

OneOne--toto--one relationship between control inputsone relationship between control inputs

Force = change in linear momentumForce = change in linear momentumTorque = change in angular momentumTorque = change in angular momentum

MomentumMomentum--based analysis of based analysis of standing balancestanding balance

Momentum control for balanceMomentum control for balance

--MgMg

ff

(assuming no additional forces)(assuming no additional forces)

fcpH )(

fMgL

c c == p p ==

Page 11: CS 231 Control for articulate rigid-body dynamic simulation

11

Balance BasicsBalance Basics

support polygonsupport polygon

footLfootL

footRfootR

center of pressurecenter of pressure

center of masscenter of mass

Static balanceStatic balance

ff

footLfootL

footRfootR

Balance BasicsBalance Basics

Control center of mass (Control center of mass (cc):):

)()( cdcckc ldesldes

II

Page 12: CS 231 Control for articulate rigid-body dynamic simulation

12

footLfootL

footRfootR

Balance BasicsBalance Basics

footLfootL

footRfootR

Balance BasicsBalance Basics

Page 13: CS 231 Control for articulate rigid-body dynamic simulation

13

footLfootL

footRfootR

Balance BasicsBalance Basics

Control center of pressure (Control center of pressure ( pp):):

)()( pdppkp hdeshdes

II

footLfootL

footRfootR

Balance BasicsBalance Basics

Page 14: CS 231 Control for articulate rigid-body dynamic simulation

14

footLfootL

footRfootR

Balance BasicsBalance Basics

footLfootL

footRfootR

Balance BasicsBalance Basics

Page 15: CS 231 Control for articulate rigid-body dynamic simulation

15

Balance and Angular MomentumBalance and Angular Momentum

Center of mass only Center of mass and Center of pressure

controlled

Target CP controlTarget CP control

Control draws simulation CP ( ) to Control draws simulation CP ( ) to center of support ( )center of support ( )

footLfootL

footRfootR

p̂p̂==

)()( pdppkp hdeshdes

Page 16: CS 231 Control for articulate rigid-body dynamic simulation

16

,

*

OptimizationOptimization

Inverse DynamicsInverse Dynamics

Forward DynamicsForward Dynamics

uu

*

,

System ArchitectureSystem Architecture

Where:Where:Convert objectives to Convert objectives to functions generalizedfunctions generalizedaccelerations accelerations

Constrained such thatConstrained such that

Single system of linear Single system of linear equationsequations

Solve using Solve using LU decompositionLU decomposition

MultiMulti--Objective Optimization Objective Optimization

groundsupport aa

TTHHLL CwCwCw minmin

2LLC desL

2HHC desH

2)(A desTC

Page 17: CS 231 Control for articulate rigid-body dynamic simulation

17

,

*

OptimizationOptimization

Inverse DynamicsInverse Dynamics

Forward DynamicsForward DynamicsII

ff uu

*

,

11--5 5 kHzkHz

60 60 kHzkHz

System ArchitectureSystem Architecture

Interaction resultsInteraction results

Page 18: CS 231 Control for articulate rigid-body dynamic simulation

18

Interaction resultsInteraction results

Control over CP trajectoryControl over CP trajectory

Gain Gain kkhh for for too hightoo highGain Gain kkhh for for too lowtoo low

)()( pdppkp hdeshdes

p̂p̂ p̂p̂

Page 19: CS 231 Control for articulate rigid-body dynamic simulation

19

How well do we control the CP?How well do we control the CP?

Center of support Center of support

Center of massCenter of mass

Center of pressureCenter of pressure

p̂p̂

Relative error weighting for different bodiesRelative error weighting for different bodies

Uniform weightsUniform weights Lower arm weightsLower arm weights

2)(A desTO

Page 20: CS 231 Control for articulate rigid-body dynamic simulation

20

Joint angle limitsJoint angle limits

No limitsNo limits With limitsWith limits

(Made from 2 (Made from 2 keyframeskeyframes))

NonNon--humanoid example humanoid example -- balancing on one legbalancing on one leg

Page 21: CS 231 Control for articulate rigid-body dynamic simulation

21

Locomotion and stepping:Locomotion and stepping:

Wu & Wu & PopovicPopovic 10, 10, CorosCoros et al. 10, et al. 10, MordatchMordatch et al. 10, de et al. 10, de LasaLasa et al. 10et al. 10

Wu et al 10Wu et al 10

Page 22: CS 231 Control for articulate rigid-body dynamic simulation

22

FeatureFeature‐‐Based Control Based Control -- de de LasaLasa et alet al

FeatureFeature‐‐Based Control Based Control -- de de LasaLasa et alet al

Page 23: CS 231 Control for articulate rigid-body dynamic simulation

23

FeatureFeature‐‐Based Control Based Control -- de de LasaLasa et alet al

FeatureFeature‐‐Based Control Based Control -- de de LasaLasa et alet al

Page 24: CS 231 Control for articulate rigid-body dynamic simulation

24

FeatureFeature‐‐Based Control Based Control -- de de LasaLasa et alet al

Page 25: CS 231 Control for articulate rigid-body dynamic simulation

25

FeatureFeature‐‐Based Control Based Control -- de de LasaLasa et alet al

FeatureFeature‐‐Based Control Based Control -- de de LasaLasa et alet al

Page 26: CS 231 Control for articulate rigid-body dynamic simulation

26

Video Break Video Break

Step controlStep control

no protective stepno protective step protective stepprotective step

Page 27: CS 231 Control for articulate rigid-body dynamic simulation

27

•• GoalGoal--directed controller is flexibledirected controller is flexible•• Step positionStep position•• Step durationStep duration

•• Momentum supervisor improves robustnessMomentum supervisor improves robustness•• When &When &•• Where to stepWhere to step

Step controlStep control

•• Middle levelMiddle level• Goal-directed control

• Center of mass

• Swing foot

•• Lowest levelLowest level• Multiobjective optimization

• Inverse dynamics

footLfootLfootRfootR

footLfootL

•• Highest levelHighest level• Momentum supervisor

Step controlStep control

Page 28: CS 231 Control for articulate rigid-body dynamic simulation

28

MomentumMomentum--based analysis of based analysis of where to stepwhere to step

Stepping and momentumStepping and momentum

--MgMg

c c == ?? ==

HL

)()( MgLcpH

xz

xzy cMgL

LcHx

)(

y

z

yzx cMgL

LcHy

)(

If is outside of support, we mustIf is outside of support, we musttake a steptake a step

fcpH )(

fMgL

MomentumMomentum--based analysis of based analysis of where to stepwhere to step

Stepping and momentumStepping and momentum

--MgMg

c c == ?? ==

xz

xzy cMgL

LcHx

)(

y

z

yzx cMgL

LcHy

)(

Use (new) desired momentumUse (new) desired momentumchange to decide where to stepchange to decide where to step

LdL

HdH

Ldes

Hdes

ddHH, , ddLL are tuning gainsare tuning gains

Page 29: CS 231 Control for articulate rigid-body dynamic simulation

29

When to stepWhen to step

LLxx

x

z

HHyy

ccxx

new desired pnew desired p ==

z

yhz

z

xlxx f

Hdc

f

Ldcp

des

inverted inverted pendulumpendulum

If is outside of support, we If is outside of support, we must take a stepmust take a step

z

yhz

z

xlxx f

Hdc

f

Ldcp

des

Where to stepWhere to step

x

z

new desired pnew desired p ==

ccxx

Use increased gain values to Use increased gain values to compute compute a conservative step a conservative step positionposition

LLxx

HHyy

ff

Page 30: CS 231 Control for articulate rigid-body dynamic simulation

30

Control for steppingControl for stepping

footLfootL

footRfootR

new desirednew desiredcenter of pressurecenter of pressure

center of masscenter of mass

footLfootL

Parameterized step modelParameterized step model

Human examplesHuman examples Idealized stepsIdealized steps

Top down: Three steps with a single pivotTop down: Three steps with a single pivot

New foot trajectory modifies stepping leg track motionNew foot trajectory modifies stepping leg track motionNew COM trajectory drives linear momentum change New COM trajectory drives linear momentum change

Page 31: CS 231 Control for articulate rigid-body dynamic simulation

31

Parameterized step modelParameterized step model

Foot as the endFoot as the end--effectoreffector

Stepping as a reaching task Stepping as a reaching task

Human exampleHuman example Idealized stepIdealized step

•• COM follows a quadratic curveCOM follows a quadratic curve

AbendAbend et al 82 , et al 82 ,

Flash & Hogan 85Flash & Hogan 85

Control for stepping Control for stepping

Directing stepsDirecting steps

Page 32: CS 231 Control for articulate rigid-body dynamic simulation

32

Control for stepping Control for stepping

Reactive stepsReactive steps

Control for stepping Control for stepping

Limits of steppingLimits of stepping

Page 33: CS 231 Control for articulate rigid-body dynamic simulation

33

Comparison with and without Comparison with and without angular momentumangular momentum

xz

xzy cMgL

LcHx

)(

no control for angular momentumno control for angular momentum control for angular momentumcontrol for angular momentum

Control angular momentumControl angular momentumKajittaKajitta et al 03, et al 03, PopovicPopovic et al 04, et al 04, GoswamiGoswami & & KallemKallem 04, Hofmann et al 04, 04, Hofmann et al 04, AbdallahAbdallah & & GoswamiGoswami 05, Stephens 0705, Stephens 07

Other workOther work

Inverted pendulum & extensionInverted pendulum & extensionKajittaKajitta et al 96, 01, Sugihara et al 02, et al 96, 01, Sugihara et al 02, Pratt & Pratt & TedrakeTedrake 05, 05, KomuraKomura et al 04, et al 04, Pratt et al 06Pratt et al 06

Wu & Wu & PopovicPopovic 10, 10, CorosCoros et al. 10, et al. 10, MordatchMordatch et al. 10, et al. 10, MuicoMuico et al 09et al 09

Page 34: CS 231 Control for articulate rigid-body dynamic simulation

34

Synthesis of Constrained Walking SkillsSynthesis of Constrained Walking SkillsCorosCoros et alet al

Given a source walk cycle and model, offline Given a source walk cycle and model, offline optimization is used to generate many single optimization is used to generate many single step walk cycle variationsstep walk cycle variations

Each variation is generated to with the Each variation is generated to with the optimization goal of a random foot optimization goal of a random foot placement offset.placement offset.

Animating responsive characters with dynamic Animating responsive characters with dynamic constraints in nearconstraints in near--unactuatedunactuated coordinatescoordinates

Ye and LiuYe and Liu

Combines Combines kinematickinematic motion with dynamic reactions motion with dynamic reactions that are constrained to minimize interference with that are constrained to minimize interference with muscles essential to the base motionmuscles essential to the base motion

Page 35: CS 231 Control for articulate rigid-body dynamic simulation

35

ConclusionsConclusions

--Physics models is the right answer for creating Physics models is the right answer for creating synthetic interaction and responsesynthetic interaction and response

--Momentum control are general and flexible, Momentum control are general and flexible, should work well for variety of behaviorsshould work well for variety of behaviors

-- Human motion is so rich and varied, humans in Human motion is so rich and varied, humans in the loop will create realistic and interesting motion the loop will create realistic and interesting motion

Presentations Presentations ––PdfPdf to me for review 2 days before talk to me for review 2 days before talk

15mins (paper) + 2mins (project)15mins (paper) + 2mins (project)Target 15 Slides total (1min/slide)Target 15 Slides total (1min/slide)

IntroIntroMotivationMotivationTechniqueTechniqueSelect tech topic to go into depthSelect tech topic to go into depthResultsResultsConclusionConclusion