Articulated body dynamics Beyond human models How would you - - PowerPoint PPT Presentation

articulated body dynamics
SMART_READER_LITE
LIVE PREVIEW

Articulated body dynamics Beyond human models How would you - - PowerPoint PPT Presentation

Articulated rigid bodies Articulated body dynamics Beyond human models How would you represent a pose? Quadraped animals Wavy hair Animal fur Plants Maximal vs. reduced coordinates How are things connected? Maximal coordinates Reduced


slide-1
SLIDE 1

Articulated body dynamics

Articulated rigid bodies Beyond human models

Quadraped animals Wavy hair Animal fur Plants

How would you represent a pose?

slide-2
SLIDE 2

Maximal vs. reduced coordinates

(x0, R0) (x1, R1) (x2, R2)

Maximal coordinates

Assuming there are m links and n DOFs in the articulated body, how many constraints do we need to keep links connected correctly in maximal coordinates?

Reduced coordinates

θ0, φ0, ψ0 θ1, φ1 θ2

state variables: 6m state variables: n

How are things connected?

Maximal coordinate

Treat each body part as a separate rigid body Use explicit constraints to connect body parts

Reduced coordinate

Use joint angles directly as state variables Hard to derive the equation of motion for articulated bodies

Maximal coordinates

Direct extension of well understood rigid body dynamics; easy to understand and implement Operate in Cartesian space; hard to

evaluate joint angles and velocities enforce joint limits apply internal joint torques

Inaccuracy in numeric integration can cause body parts to drift apart

Reduced coordinates

Joint space is more intuitive when dealing with complex multi-body structures Fewer DOFs and fewer constraints Well suited for character motion and motion control

slide-3
SLIDE 3

Forward simulation

Given current state, current velocity, external forces, and joint torques, compute the current acceleration of the articulated body Lagrangian method Featherstone’s algorithm

Use reduced coordinates to represent motion Given the current joint , current joint velocity , external forces and joint torque , compute the joint acceleration in linear time

Featherstone’s algorithm

q ˙ q ¨ q FE G ¨ q = f(q, ˙ q, FE, G)

link i link λ(i) joint i connects link i and its parent

Spatial notation

Spatial notation combines linear and angular quantities Two ordinary 3-dimensional vectors are replaced by a single 6-dimensional spatial vector

v =

  • ω

˙ x

  • a =
  • ˙

ω ¨ x

  • angular velocity of the body

linear velocity of the body

Spatial velocity of each link

If we let be the velocity of link i, and be the velocity across joint i then vi vJ

i

vJ

i = vi − vλ(i)

vJ

i = hi ˙

qi The joint velocity can also be described in the form where hi is a 6 by di matrix, is a di by 1 vector and di is the degree of freedom of joint i ˙ q

slide-4
SLIDE 4

Spatial acceleration of each link

ai = aλ(i) + ˙ hi ˙ qi + hi¨ qi vi = vλ(i) + hi ˙ qi Velocity of link i: Acceleration of link i:

Newton-Euler equations

fi + f E

i = Iiai + vi × Iivi

Equation of motion for link i:

net force applied to link i through the joints sum of all other forces actin on link i

fi = f J

i −

  • j∈µ(i)

f J

j

f J

i is the force transmitted from link λ(i)

µ(i)is the set of children of link i f J

i = Iiai + vi × Iivi − f E i +

  • j∈µ(i)

f J

j

Acceleration-force relation

The acceleration of bodies are always linear functions of the applied forces a = Φf + b f = IAa + pA The equation can be inverted to

IA

articulated body inertia

pA

bias force, the force required to bring the body’s acceleration to zero IA = Φ−1

where

pA = −IAb

Featherstone’s algorithm

q, ˙ q, FE, G

proc ABM_accelerations( )

/* first outbound loop */ /* inbound loop */ /* second outbound loop */

Compute_Inertia_Bias(); Compute_joint_accel(); vi = vλ(i) + hi ˙ qi for i = 1 to N - 1 v0 = 0

slide-5
SLIDE 5

Inbound loop

Starting at the terminal links, calculate the inertia and bias force for each link in turn

IA

i = Ii +

  • j∈µ(i)

(IA

j − IA j hj(hT j IA j hj)−1hT j IA j )

pA

i = pi +

  • j∈µ(i)

(pα

j + IA j hj(hT j IA j hj)−1(Gi − hT j pα j ))

pi = vi × Iivi − f E

i

j = pA j + IA j ˙

hj ˙ qj

where

f J

i = Iiai + vi × Iivi − f E i +

  • j∈µ(i)

f J

j

Second outbound loop

f J

i = IA i ai + pA i

τi = hT

i f J i

¨ qi = (hT

i IA i hi)−1(τi − hT i (IA i aλ(i) + pα i ))

Compute joint acceleration from the root to the terminal link

for i = 0 to N-1 τ0 = 0 ai = aλ(i) + ˙ hi ˙ qi + hi¨ qi

aλ(0) = 0

Lagrangian method

d dt ∂T ∂ ˙ qj − ∂T ∂qj − Qj = 0 j is the index for DOFs in generalized coordinates Qj is the generalized force associated with coordinate j T denotes the kinetic energy

Generalized coordinates

The configuration of a multi-body system is identify by a set of variables called generalized coordinates

articulated bodies:

θ0, φ0, ψ0 θ1, φ1 θ2

x, y, z, x, y, z, θ, φ, ψ

  • ne rigid body:
  • ne particle:

x, y, z

These generalized coordinates are independent and completely determine the location and orientation of each body in the system

slide-6
SLIDE 6

Peaucellier mechanism

The purpose of this mechanism is to generate a straight-line motion This mechanism has eight bodies and yet the number of degrees of freedom is one

Generalized forces

δri = ∂ri ∂q1 δq1 + ∂ri ∂q2 δq2 + . . . + ∂ri ∂qn δqn =

  • j

∂ri ∂qj δqj Fiδri = Fi

  • j

∂ri ∂qj δqj =

  • j

Qjδqj ri = ri(q1, q2, . . . , qn)

Represent a point ri on the articulated body system by a set of generalized coordinates: The virtual displacement of ri can be written in terms of generalized coordinates The virtual work of force Fi acting on ri is

Qj = Fi · ∂ri ∂qj

Define generalized force associated with coordinate qj

Kinetic energy

r = Wr0 Ti = 1 2

  • rT

0 ˙

WT

i

˙ Wir0τi dx dy dz Ti = 1 2

  • tr
  • ˙

Wir0rT

0 ˙

WT

i

  • τi dx dy dz

Ti = 1 2

  • ˙

rT ˙ rτi dx dy dz Ti = 1 2tr

  • ˙

Wi

  • r0rT

0 τi dx dy dz

  • ˙

WT

i

  • Ti = 1

2tr

  • ˙

WiMi ˙ WT

i

  • Mi =
  • r0rT

0 τi dx dy dz

Compute and by yourself

∂Ti ∂qj d dt ∂Ti ∂ ˙ qj

Lagrangian method

d dt ∂Ti ∂ ˙ qj − ∂Ti ∂qj = tr ∂Wi ∂qj Mi ¨ WT

i

  • = Qj

Put it all together

tr ∂Wi ∂qj Mi ¨ WT

i

  • =
  • k

fk ∂pk ∂qj

Represent external forces fk in terms of generalized coordinates where fk is acting at the point pk on the articulated body system

slide-7
SLIDE 7

Acceleration of transformation

Wi = Wi−1Ri ˙ Wi = ˙ Wi−1Ri + Wi−1 ˙ Ri ¨ Wi = ¨ Wi−1Ri + 2 ˙ Wi−1 ˙ RiWi−1 ¨ Ri ¨ R(q) =

Represent in terms of , and

¨ W(q) q ˙ q ¨ q

Compute recursively

¨ W(q)

Constraints

Penalty methods

Use proportional derivative (PD) controllers

Analytical methods

Solve a linear system

Acceleration constraints

Given a desired joint acceleration , what is the torque that gives rise to it?

¨ qt = kgt + ¨ q0 k = ¨ qt − ¨ q0 gt

  • 1. Use test torque to compute

gt k

gc = gt ¨ qc − ¨ q0 ¨ qt − ¨ q0

  • 2. Use to compute the desired joint torque

k gc

af = kf + a0

Force - Acceleration relationship

h(¨ qf) − h(¨ q0) = kf

¨ qc

Multiple constraints

Compute the force magnitudes that satisfy all the acceleration constraints simultaneously

f

h1(¨ q) − h1(¨ q0) = k11f1 + k12f2 + · · · + k1mfm hm(¨ q) − hm(¨ q0) = km1f1 + km2f2 + · · · + kmmfm h2(¨ q) − h2(¨ q0) = k21f1 + k22f2 + · · · + k2mfm . . . h − h0 = Kf kji = 1 f t

i

(hj(¨ qt

i) − hj(¨

q0))

slide-8
SLIDE 8

Impact constraints

Use impulse to instantaneously change the body’s velocities

p

Compute the current joint velocities, that changes the velocity of body point instantaneously from to

p ˙ q v+

p

v−

p

v+

p

v−

p

Impact constraints

ap = (v+

p − v− p )/δt

Compute desired acceleration on the body point

h(¨ q) = a(¨ q) − ap fp

Find the appropriate constraint magnitude that satisfy the acceleration constraint

¨ q0 ¨ qp

Evaluate the default joint acceleration, ,and the acceleration, , after is applied

fp ˙ q+ = ˙ q− + (¨ qp − ¨ q0)δt

Compute the joint velocity after the impulse

The simulation step Collision response

UpdateConstraintSet(): Collision detection ResolveImpact(): Instantaneously change the relative velocity at the contact point ComputeConstraintForces(): Use constraint forces to prevent interpenetration

slide-9
SLIDE 9

Joint limits

UpdateConstraintSet(): Compare current joints against joint limits ResolveImpact(): Neutralize the joint velocity that violates the joint limit ComputeConstraintForces(): Use constraint torque to set joint acceleration to zero

Summary

Define phase space

a set of coordinates that fully determine the motion

Write down the equation of motion Deal with constraints

penalty methods vs. analytical methods

Particle system

phase space: equation of motion: constraints:

  • x

v

  • f = m¨

x

compute the constraint forces

Rigid body system

phase space: equation of motion: constraints:

    x R P L     f = m¨ x τ = I ˙ ω + ˙ Iω

compute impulse and impulsive torque compute contact forces

slide-10
SLIDE 10

Articulated body system

phase space: equation of motion: constraints:

  • q

˙ q

  • fi + f E

i = Iiai + vi × Iivi

use force - acceleration relationship to compute the constraint torques

d dt ∂T ∂ ˙ qj − ∂T ∂qj − Qj = 0

  • r

What’s next?

Is this enough to simulate animal’s natural motion? How do animals use muscles to generate locomotion? We will have our first guest lecture on Thursday

  • Prof. Petros Faloutsos from UCLA