Rigid Body Dynamics
From Paricles o Rigid Bodies Paricles No roaions Linear velociy v only Rigid bodies Body roaions Linear velociy v Angular velociy ω
Rigid Bodies Rigid bodies have boh a posiion and orienaion Rigid bodies assume no objec deformaion Rigid body moion is represened by 2 parameers x R - cener of mass - orienaion roaion marix Meaning of R: columns represen he coordinaes of he body space base vecors 1,0,0, 0,1,0, 0,0,1 in world space.
Rigid Bodies Objecs are defined in body space local coordinae sysem and ransformed ino world space 0 x p R p 1 1 0 1 0 p x R p
Body Space Objecs are defined in body space local coordinae sysem and ransformed ino world space bodies are specified relaive o his sysem cener of mass is he origin for convenience We will specify body-relaed physical properies ineria, in his frame
Ouline Rigid Body Preliminaries velociy, acceleraion, and ineria Sae and Evoluion Collision Deecion and Conac Deerminaion Colliding Conac Response
Kinemaics: Velociies How do x and R change over ime? Linear velociy v = dx/d is he same: Describes he velociy of he cener of mass m/s Angular velociy is new! Direcion is he axis of roaion Magniude is he angular velociy abou he axis rad/s There is a simple relaionship beween R and
Then Kinemaics: Velociies
We can represen he cross produc wih a marix Angular Velociy b b a b a 0 0 0 * z y x x y z a a a a a a * R R ω Therefore
Since a poin can be represened a any ime by Velociy of a Poin Toal velociy can hen be expressed as 0 x r R r 0 v r R r 0 * v r R ω r v x r ω r Which can be rewrien as
Dynamics: Acceleraions How do v and dr/d change over ime? Firs we need some more machinery Forces and Torques Momenums Ineria Tensor Simplify equaions by formulaing acceleraions in erms of momenum derivaives insead of velociy derivaives
Force We can apply forces o he objec a any poin F 2 F 1 Toal force on an objec is simply F F No informaion abou where he forces are applied i
Tells us abou he force disribuion over he objec Torque Torque describes he roaional force τ i r x F i i F 2 x r 1 F 1 Toal orque on an objec is simply τ τ r x F i i i
Forces and Torques Exernal forces F i ac on paricles Toal exernal force F= F i Torques depend on disance from he cener of mass: i = r i x x F i Toal exernal orque = r i -x x F i F doesn convey any informaion abou where he various forces ac does ell us abou he disribuion of forces
Linear Momenum Linear momenum of a paricle is p m v Linear momenum of a rigid body is hen P r dv inegraion over he body densiy
Linear Momenum Linear momenum can be simplified as follows P r dv P v ω r x P M v dv Assuming consan mass gives P M v P F Jus as if body were a paricle wih mass M and velociy v
Linear Momenum Linear momenum can be simplified as follows P r dv P v ω r x P M v Assuming consan mass gives P M v P F dv This erm vanishes because of he definiion of COM
Angular momenum is conserved when here is no orque Angular Momenum Angular momenum of a rigid body L I ω ineria ensor Taking he ime derivaive L τ
Ineria Tensor Describes how mass is disribued in he body I I I I xx yx zx Analogous o mass in linear velociy - roaional mass I I I Measures he preferred axis of roaion xy yy zy I I I xz yz zz I xx 2 2 yˆ zˆ xy ˆˆ Expensive o compue his a every ime sep I xy xˆ x dv dv x cenerofmass
Ineria Tensor Rewrie he ensor as T I ˆ r rˆ I rˆ rˆ dv T I R r0 R r0 I R r0 R r0 T T I R r0 r0i r0r 0 R dv I R T I R body Inegrals can now be precompued T T dv
Ouline Rigid Body Preliminaries Sae and Evoluion Variables and derivaives Quaernions Collision Deecion and Conac Deerminaion Colliding Conac Response
New Sae Space Spaial informaion Velociy informaion v replaced by linear momenum P replaced by angular momenum L Size of he vecor: 3+9+3+3N = 18N
Taking he Derivaive Conservaion of momenum P, L les us express he acceleraions in erms of forces and orques. Discreize hese coninuous equaions and inegrae
Simulae: nex sae compuaion From X cerain quaniies are compued I -1 = R I body -1 R T v = P / M ω = I -1 L We mus be conen wih a finie number of discree ime poins Use your favorie ODE solver o solve for he new sae X, given previous sae X- and applied forces F and X = Solver::SepX-, F,
Simple simulaion algorihm X = IniializeSae For = 0 o final wih sep ClearForcesF, AddExernalForcesF, X new =Solver::SepX, F, X =X new = + End for
Ouline Rigid Body Preliminaries Sae and Evoluion Collision Deecion and Conac Deerminaion Conac classificaion Inersecion esing, bisecion, and neares feaures Colliding Conac Response
Collisions and Conac Wha should we do when here is a collision? x 0 x 1 x 2 x 3
Rolling Back he Simulaion Resar he simulaion a he ime of he collision x 0 x 1 x 2 x c x 3 Collision ime can be found by bisecion, ec.
Collision Deecion Exploi coherency hrough winessing Two convex objecs are non-peneraing iff here exiss a separaing plane beween hem separaing plane Firs find a separaing plane and see if i is sill valid afer he nex simulaion sep Speed up wih bounding boxes, grids, hierarchies, ec.
Condiions for collision Collision Deecion N A B a p b p N A B a p b p N A B a p b p a a a a a x p ω v p 0 b p a p N 0 b p a p N 0 b p a p N separaing conac colliding
Collision Sof Body Collision Force is applied o preven inerpeneraion
Collision Sof Body Collision Apply forces and change he velociy
Collision Harder Collision Higher force over a shorer ime
Collision Rigid Body Collision Impulsive force produces a disconinuous velociy
Impulse We need o change velociy insananeously Infinie force in an infiniesimal ime J F An impulse changes he velociy as v J M or P J
Impulse An impulse also creaes an impulsive orque τ impulse p x J The impulsive orque changes he angular velociy ω I 1 τ impulse or L τ impulse
Impulse For a fricionless collision J j N A J a N B J b Bu how do we calculae? j
Impulse For a fricionless collision N p p N p p a b a b Given his equaion and knowing how affecs he linear and angular velociies of he wo bodies, we can solve for j j.ˆ.ˆ.ˆ.ˆ
Resing Conac Bodies are neiher colliding nor separaing We wan a force srong enough o resis peneraion bu only enough o mainain conac
Resing Conac We wan o preven inerpeneraion Since decreasing d N p a p d c 0 b 0 we should keep i from d N pa pb N p a p b d 0 we should keep i from c Since decreasing d N p p 2 N p p c a c b c Describes he objecs acceleraion owards one anoher a c b c 0 0
Resing Conac Conac forces only ac in he normal direcion F Conac forces should avoid inerpeneraion be repulsive c d f c f N 0 f 0 d c c become zero if he bodies begin o separae 0 workless force
Resing Conac The relaive acceleraions can be wrien in erms of all of he conac forces d i c a0 f0... a n f n b i So we can simply solve a Quadraic Program o find he soluion o all he consrains
Simulaion Algorihm Algorihm wih collisions and conac curren sae compue new sae nex sae deec collisions and backrack collision sae compue and apply impulses pos-collision sae compue and apply consrain forces