articulated body dynamics
play

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


  1. Articulated rigid bodies Articulated body dynamics Beyond human models How would you represent a pose? Quadraped animals Wavy hair Animal fur Plants

  2. Maximal vs. reduced coordinates How are things connected? Maximal coordinates Reduced coordinates Maximal coordinate θ 0 , φ 0 , ψ 0 Treat each body part as a separate rigid body ( x 0 , R 0 ) Use explicit constraints to connect body parts θ 1 , φ 1 Reduced coordinate ( x 1 , R 1 ) θ 2 Use joint angles directly as state variables ( x 2 , R 2 ) state variables: 6 m state variables: n Hard to derive the equation of motion for articulated bodies 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? Maximal coordinates Reduced coordinates Direct extension of well understood rigid body dynamics; easy to understand and implement Joint space is more intuitive when dealing with Operate in Cartesian space; hard to complex multi-body structures evaluate joint angles and velocities Fewer DOFs and fewer constraints enforce joint limits Well suited for character motion and motion control apply internal joint torques Inaccuracy in numeric integration can cause body parts to drift apart

  3. Forward simulation Featherstone’s algorithm Given current state, current velocity, external forces, and Use reduced coordinates to represent motion joint torques, compute the current acceleration of the articulated body Given the current joint , current joint velocity , ˙ q q external forces and joint torque , compute the F E G joint acceleration in linear time ¨ q Featherstone’s algorithm q , F E , G ) q = f ( q , ˙ ¨ Lagrangian method link λ ( i ) joint i connects link i and its parent link i Spatial notation Spatial velocity of each link v J Spatial notation combines linear and angular quantities If we let be the velocity of link i , and be the velocity v i i across joint i then Two ordinary 3-dimensional vectors are replaced by a v J i = v i − v λ ( i ) single 6-dimensional spatial vector The joint velocity can also be described in the form � � angular velocity of the body ω v = ˙ v J x linear velocity of the body i = h i ˙ q i � � ˙ ω a = where h i is a 6 by d i matrix, is a d i by 1 vector and d i is the ˙ q ¨ x degree of freedom of joint i

  4. Spatial acceleration of each link Newton-Euler equations Velocity of link i : Equation of motion for link i : f i + f E v i = v λ ( i ) + h i ˙ q i i = I i a i + v i × I i v i net force applied to link sum of all other forces Acceleration of link i : i through the joints actin on link i a i = a λ ( i ) + ˙ h i ˙ q i + h i ¨ q i f J f i = f J � f J i is the force transmitted from link λ ( i ) i − j µ ( i ) is the set of children of link i j ∈ µ ( i ) � f J i = I i a i + v i × I i v i − f E f J i + j j ∈ µ ( i ) Acceleration-force relation Featherstone’s algorithm proc ABM_accelerations( ) q , F E , G The acceleration of bodies are always linear functions of q , ˙ the applied forces /* first outbound loop */ v 0 = 0 a = Φ f + b for i = 1 to N - 1 v i = v λ ( i ) + h i ˙ q i The equation can be inverted to /* inbound loop */ f = I A a + p A where I A = Φ − 1 Compute_Inertia_Bias(); p A = − I A b I A articulated body inertia /* second outbound loop */ p A bias force, the force required to bring the body’s Compute_joint_accel(); acceleration to zero

  5. Inbound loop Second outbound loop Starting at the terminal links, calculate the inertia and Compute joint acceleration from the root to the terminal bias force for each link in turn link τ 0 = 0 I A � ( I A j − I A j h j ( h T j I A j h j ) − 1 h T j I A i = I i + j ) a λ (0) = 0 j ∈ µ ( i ) for i = 0 to N -1 p A � j + I A j h j ( h T j I A j h j ) − 1 ( G i − h T i = p i + ( p α j )) j p α q i = ( h T i I A i h i ) − 1 ( τ i − h T i ( I A i a λ ( i ) + p α ¨ i )) j ∈ µ ( i ) a i = a λ ( i ) + ˙ h i ˙ q i + h i ¨ q i f J i = I A i a i + p A i where p i = v i × I i v i − f E i f J i = I i a i + v i × I i v i − f E � f J τ i = h T i f J i + j i j ˙ j = p A j + I A p α h j ˙ q j j ∈ µ ( i ) Lagrangian method Generalized coordinates d ∂ T − ∂ T The configuration of a multi-body system is identify by a set of − Q j = 0 dt ∂ ˙ q j ∂ q j variables called generalized coordinates These generalized coordinates are independent and completely determine the location and orientation of each body in the system T denotes the kinetic energy one particle: x, y, z Q j is the generalized force associated with coordinate j one rigid body: x, y, z, θ , φ , ψ j is the index for DOFs in generalized coordinates θ 0 , φ 0 , ψ 0 x, y, z, articulated bodies: θ 1 , φ 1 θ 2

  6. Peaucellier mechanism Generalized forces Represent a point r i on the articulated body system by a set of generalized coordinates: r i = r i ( q 1 , q 2 , . . . , q n ) The purpose of this mechanism is The virtual displacement of r i can be written in terms of to generate a straight-line motion generalized coordinates δ r i = ∂ r i δ q 1 + ∂ r i δ q 2 + . . . + ∂ r i ∂ r i � δ q n δ q j This mechanism has eight bodies = ∂ q 1 ∂ q 2 ∂ q n ∂ q j j and yet the number of degrees of The virtual work of force F i acting on r i is freedom is one ∂ r i � � F i δ r i = F i δ q j = Q j δ q j ∂ q j j j Define generalized force associated with coordinate q j Q j = F i · ∂ r i ∂ q j Kinetic energy Lagrangian method T i = 1 � r T ˙ ˙ r τ i dx dy dz r = Wr 0 Put it all together 2 d ∂ T i − ∂ T i � ∂ W i � T i = 1 � M i ¨ r T 0 ˙ W T ˙ W T = Q j W i r 0 τ i dx dy dz = tr i i dt ∂ ˙ q j ∂ q j ∂ q j 2 T i = 1 � � � W i r 0 r T ˙ 0 ˙ W T tr τ i dx dy dz i 2 Represent external forces f k in terms of generalized coordinates � �� � � T i = 1 � ˙ ˙ r 0 r T W T r 0 r T 2tr W i 0 τ i dx dy dz M i = 0 τ i dx dy dz i � ∂ W i � ∂ p k � M i ¨ W T tr = f k i ∂ q j ∂ q j T i = 1 � � W i M i ˙ ˙ W T 2tr k i where f k is acting at the point p k on the articulated body system d ∂ T i ∂ T i Compute and by yourself dt ∂ ˙ q j ∂ q j

  7. Acceleration of transformation Constraints ¨ Represent in terms of , and W ( q ) ˙ ¨ q q q ¨ Compute recursively W ( q ) Penalty methods W i = W i − 1 R i Use proportional derivative (PD) controllers W i = ˙ ˙ W i − 1 R i + W i − 1 ˙ R i Analytical methods W i = ¨ ¨ W i − 1 R i + 2 ˙ W i − 1 ˙ R i W i − 1 ¨ R i Solve a linear system ¨ R ( q ) = Acceleration constraints Multiple constraints Compute the force magnitudes that satisfy all the f Given a desired joint acceleration , what is the ¨ q c acceleration constraints simultaneously torque that gives rise to it? q 0 ) = k 11 f 1 + k 12 f 2 + · · · + k 1 m f m h 1 (¨ q ) − h 1 (¨ Force - Acceleration relationship q 0 ) = k 21 f 1 + k 22 f 2 + · · · + k 2 m f m h 2 (¨ q ) − h 2 (¨ a f = kf + a 0 q f ) − h (¨ q 0 ) = kf h (¨ . . 1. Use test torque to compute g t . k q 0 ) = k m 1 f 1 + k m 2 f 2 + · · · + k mm f m h m (¨ q ) − h m (¨ q 0 q t − ¨ k = ¨ q t = kg t + ¨ q 0 ¨ g t h − h 0 = Kf 2. Use to compute the desired joint torque k g c k ji = 1 q t q 0 )) q c − ¨ q 0 ( h j (¨ i ) − h j (¨ g c = g t ¨ f t i q t − ¨ ¨ q 0

  8. Impact constraints Impact constraints Compute desired acceleration on the body point Use impulse to instantaneously change the body’s a p = ( v + p − v − p ) / δ t velocities Find the appropriate constraint magnitude that satisfy the acceleration constraint f p Compute the current joint velocities, h (¨ q ) = a (¨ � that changes the velocity of body q ) − a p ˙ q point instantaneously from to v + v − p Evaluate the default joint acceleration, ,and the q 0 p p ¨ v + acceleration, , after is applied p q p ¨ f p p Compute the joint velocity after the impulse v − q + = ˙ q − + (¨ p q 0 ) δ t ˙ q p − ¨ 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

  9. Joint limits Summary UpdateConstraintSet(): Compare current joints Define phase space against joint limits a set of coordinates that fully determine the motion ResolveImpact(): Neutralize the joint velocity that Write down the equation of motion violates the joint limit Deal with constraints ComputeConstraintForces(): Use constraint torque to set joint acceleration to zero penalty methods vs. analytical methods Particle system Rigid body system phase space: phase space: � �   x x R v     P   L equation of motion: equation of motion: f = m ¨ x f = m ¨ x ω + ˙ τ = I ˙ I ω constraints: constraints: compute the constraint forces compute impulse and impulsive torque compute contact forces

  10. Articulated body system What’s next? phase space: � � q Is this enough to simulate animal’s natural motion? ˙ q How do animals use muscles to generate equation of motion: locomotion? d ∂ T − ∂ T f i + f E or − Q j = 0 i = I i a i + v i × I i v i dt ∂ ˙ q j ∂ q j We will have our first guest lecture on Thursday constraints: Prof. Petros Faloutsos from UCLA use force - acceleration relationship to compute the constraint torques

Recommend


More recommend