Impulse-Based Dynamic Simulation of Rigid Body Systems
Total Page:16
File Type:pdf, Size:1020Kb
Impulsebased Dynamic Simulation of Rigid Bo dy Systems by Brian Vincent Mirtich BSE Arizona State University MS University of California Berkeley A dissertation submitted in partial satisfaction of the requirements for the degree of Do ctor of Philosophy in Computer Science in the GRADUATE DIVISION of the UNIVERSITY of CALIFORNIA at BERKELEY Committee in charge Professor John F Canny Chair Professor David Forsyth Professor Alan Weinstein Fall The dissertation of Brian Vincent Mirtichisapproved Chair Date Date Date University of California at Berkeley Fall Impulsebased Dynamic Simulation of Rigid Bo dy Systems Copyright Fall by Brian Vincent Mirtich Abstract Impulsebased Dynamic Simulation of Rigid Bo dy Systems by Brian Vincent Mirtich Do ctor of Philosophy in Computer Science University of California at Berkeley Professor John F Canny Chair Dynamic simulation is a p owerful application of to days computers with uses in elds rang ing from engineering to animation to virtual reality This thesis intro duces a new paradigm for dynamic simulation called impulsebased simulation The paradigm is designed to meet the twin goals of physical accuracy and computational eciency Obtaining physically ac curate results is often the whole reason for p erforming a simulation however in many applications computational eciency is equally imp ortant Impulsebased simulation is designed to simulate mo derately complex systems at interactive sp eeds To achieve this p erformance certain restrictions are made on the systems to be simulated The strongest restriction is that they comprise only rigid b o dies The hardest part of rigid b o dy simulation is mo deling the interactions that o ccur between b o dies in contact The most commonly used approaches are p enalty metho ds followed by analytic metho ds Both of these approaches are constraintbased meaning that constraint forces at the contact p oints are continually computed and applied to deter mine the accelerations of the b o dies Impulsebased simulation is a departure from these approaches in that there are no explicit constraints to be maintained at contact points Rather all contact interactions b etween b o dies are aected through collisions rolling slid ing resting and colliding contact are all mo deled in this way The approach has several advantages including simplicity robustness parallelizability and an ability to eciently simulate classes of systems that are dicult to simulate using constraintbased metho ds The accuracy of impulsebased simulation has b een exp erimentally tested and is sucient for many applications The pro cessing of collisions is a critical asp ect of the impulsebased approach E cient algorithms are needed for detecting the large numb er of collisions that o ccur without missing any Furthermore the physical accuracy of the simulator rests up on the accuracy of the collision resp onse algorithms This thesis describ es these essential algorithms and their underlying theory It describ es how the algorithms for simple rigid b o dy simulation maybe extended to systems of articulated rigid b o dies To prove the metho d is truly practical the algorithms have b een implemented in the prototyp e simulator Impulse Many exp eriments p erformed with Impulse are describ ed Professor John F Canny Dissertation Committee Chair iii Contents List of Figures vi List of Tables ix Intro duction Constraintbased contact mo dels Nonp enetration contact forces The impulsebased approach Impulses versus constraints Overview of the thesis Collision Detection Intro duction and related work Collision detection in Impulse The LinCanny algorithm Collision detection and coherence Extensions to the LinCanny algorithm Prioritizing collision checks The collision heap Estimating time of impact Bounding ballistic angular velo city Bounding b oxtechniques Finding static b oxintersections Coherence and the tiling scheme Maintaining the collision heap Spatial hashing versus co ordinate sorting Generalizing collision detection Collision Resp onse Assumptions of collision resp onse mo del Computing collision impulses The equations of collision Sliding mo de Sticking mo de iv Collision integration Work done by collision forces Integrating collisions using dierent parameters Sliding mo de under u and W parameterizations z z Handling sticking during collision integration Sticking stabilityandrays of constant sliding The u ellipse Directions of constant sliding Static contact and micro collisions Constrained Bo dy Dynamics Constrained forward dynamics Velo city and acceleration propagation Spatial algebra Spatial formulation of acceleration propagation The Featherstone algorithm Base case Inductive case Forward dynamics algorithm Extension to treelike linkages Velo city and acceleration propagation through trees Articulated inertias and za forces for tree linkages Forward dynamics algorithm for tree linkages Extension to oating linkages Hybrid Simulation A sp ectrum of physical systems Collision detection Constrained b o dy swept volumes Constrained b o dy TOI co ecients Collision resp onse Collision resp onse a rob otics p ersp ective Articulated b o dy collision dynamics Computing K i Propagating impulses through multib o dies Supp orting control systems Typ es of controllers Controller scheduling Impulses control supp ort architecture Computation of Mass Prop erties for Polyhedral Bo dies Rigidb o dy mass parameters Derivation of the algorithm Reduction to surface integrals Reduction to pro jection integrals v Reduction to line integrals Evaluation of integrals from vertex co ordinates Pseudo co de and online C co de Test results Examples and Results Pure impulsebased simulation Passivehybrid simulation Controlled hybrid simulation Execution times Estimating p ose statistics Background Quasistatic algorithms Dynamic simulation Exp erimental results and discussion Other part feeding exp eriments Future Work Paradigm switching Collision detection issues Interpreted control and ob ject encapsulation Physical simulation for animation and VR A Mathematical Preliminaries A Vectors matrices and frames A Representing cross pro ducts as matrices A Rigid b o dy dynamics A Quaternions and integration of orientation Bibliography vi List of Figures A disassembled double p endulum A system of falling dominos A table with nonunique contact force congurations A vibrational part feeder Various contact mo des b etween ball and terrain A blo ck diagram of Impulses collision detection system A p olygon and its Voronoi regions The LinCanny algorithm for p olygons The threedimensional LinCanny algorithm The eect of coherence on LinCanny p erformance A onesided approach to nding collision times Impulses narrow phase collision detection system Closest p ointvelo cities and time of impact Finding a lower b ound on the time of impact of con vex b o dies The b o dy angular velo cityvector remains on an ellipsoid A onedimensional example of a hierarchical spatial hash table Avariant of the hierarchical hash table scheme .