An Evaluation of Methods for Modeling Contact in Multibody Simulation
Total Page:16
File Type:pdf, Size:1020Kb
An Evaluation of Methods for Modeling Contact in Multibody Simulation Evan Drumwright and Dylan A. Shell Abstract— Modeling contact in multibody simulation is a dif- the Navier-Stokes equations can be accurate. For ficult problem frequently characterized by numerically brittle a given pair of bodies, the collisional outcome algorithms, long running times, and inaccurate (with respect to may well depend on not just the initial velocities, theory) models. We present a comprehensive evaluation of four methods for contact modeling on seven benchmark scenarios masses, and mass moments of inertia, but also in order to quantify the performance of these methods with on some combination of contact shape, contact respect to robustness and speed. We also assess the accuracy of mechanics, surface chemistry, fracture, and vi- these methods where possible. We conclude the paper with a bration phenomena that are not well understood, prescriptive description in order to guide the user of multibody especially a priori. Further, in the case of multiple simulation. superficially-simultaneous collisions, the predic- I. INTRODUCTION tion of the collisional outcome often depends so sensitively on initial conditions that sufficiently There is a strong argument to be made for the suggestion accurate initial conditions cannot be expected to that most multi-body simulation techniques are inadequate be known by a simulator. for robotics research needs. Clearly, an ideal simulator would Thus, the best ways that accuracy can be assessed using a be fast, accurate, and robust while being capable of mod- set of benchmarks are to compare the relative performance eling non-trivial interactions between bodies (e.g., friction between the various contact models (e.g., if ten contact and joint constraints). But as this paper will demonstrate, models predict one result, and an eleventh predicts another, selecting the underlying algorithms and codes remains a the eleventh is likely wrong) and to look for qualifying task that is as challenging as it is important. Selecting an aspects of behavior that occurs in the real world (i.e., does inaccurate or infeasibly slow algorithm will undermine the the robot drive or grasp as it should?) We utilize both benefits offered by simulation in the first place. Although assessments in this suite of benchmarks. the best algorithm is domain dependant, we know of few evaluations across benchmarks (or even test scenarios) that II. BACKGROUND might enable the roboticist to make an informed choice. Among contact methods for computer-based multibody The impact of the contact model on performance is com- dynamics simulation are penalty methods [2], [3], [4], [5], prehensively evaluated in this paper across several simulation force/acceleration LCP-based methods [6], [7], impulse- tasks of interest to the practitioner. The results show that based event driven methods [8], [9], [10], time-stepping making an informed choice is a balancing act; accuracy, methods [11], [12], and computer graphics methods [13], reliability, and run-time vary across contact algorithms, un- [14], [15], [16]. A comprehensive survey of these models derlying numerical solvers and input parameters. We believe has been conducted by Brogliato et al. [17]. these latter two dimensions in particular have been given This paper studies only impulse-based event driven meth- inadequate attention; the data show that they can have a ods. Penalty methods are not considered because they per- significant effect on simulation performance. In the compar- mit interpenetration. Force/acceleration LCP-based methods isons made, no single contact method faired best under all are susceptible to inconsistent configurations and are thus circumstances. Nevertheless, the results do suggest that some not considered. Although we do not study time-stepping methods are ill-suited for robotics and may be discarded in approaches, such methods are often fundamentally similar favor of others in nearly all circumstances. to event-driven schemes (e.g., the time-stepping method This paper primarily serves to assess the speed and robust- of Stewart and Trinkle [12] is similar to the event-driven ness of both the contact models and the methods for solving approach of Anitescu and Potra [10]) and often employ them. Assessing accuracy is a thorny issue, as explained by identical algorithms in their solution (e.g., linear comple- Chatterjee and Ruina [1]: mentarity problem solvers); therefore, we expect our experi- Unfortunately no known collision law of any kind mental results that indicate the efficacy of solvers on certain is both predictive and accurate, in the sense, say problems to yield insights into the performance of time- that Newton’s laws, or even linear elasticity or stepping methods on those same problems. E. Drumwright is with the Department of Computer Science, The George III. TESTED METHODS Washington University, Washington, DC 20052, USA [email protected] D. Shell is with the Department of Computer Science, Texas A&M Four contact models are tested: a Newton model aug- University, College Station, TX 77840, USA [email protected] mented with friction; Mirtich’s energetically consistent, Stronge-based collision model; the model of Anitescu D. Convex optimization method and Potra; and the convex optimization-based model of We have implemented the convex-optimization-based Drumwright and Shell [18]. These contact models were method of Drumwright and Shell [18] that treats both resting chosen because they work with multi-rigid bodies, guarantee contact and collisions in an impulse-based formulation with non-interpenetration, and operate as event-driven schemes. a Poisson-type collision model. This model necessitates the The models, as described in the literature, often employ opti- solution to a convex quadratically constrained, quadratic mizations (e.g., the shock propagations in [9]). We attempted programming problem. This particular problem always has a to tease these optimizations apart from the models in order solution. to perform a fair evaluation across the cores of the various In the experiments below, we have used our own imple- methods. mentation of a primal-dual interior point method described Additionally, we note that there exist numerous open by [26]. The optimizer uses a single parameter, the - source software libraries for computing rigid dynamics, suboptimality constant, reported in the experiments. including ODE, Bullet, OpenTissue, Siconos, and daVinci. Incorporating the contact models of those simulators into IV. EXPERIMENTS our comparison would be ideal but is impossible: the contact The benchmark scenarios used in the experiments have models cannot, in general, be separated from their libraries, been implemented on the Moby [27] multi-rigid body sim- and using the libraries themselves would not permit us to ulation library. Every benchmark is encoded in human- evaluate the contact models in isolation (it is not possible readable XML format, and the set of benchmarks is down- to use a common set of simulation parameters across all loadable from http://www.seas.gwu.edu/˜drum/ libraries). bench. By implementing the benchmarks in the Moby simulator, numerical issues (i.e., integration and collision A. Newton model detection algorithms, floating point representation, etc.) can be held fixed and thereby ignored. Moby is released under The Newton-based model implementation used in the the GNU Lesser Public License (LGPL), so researchers can experiments employs Newton’s model for collision restitu- improve upon and add to the implementations of contact tion augmented with a mechanism for simulating Coulomb models within Moby. friction. Our implementation is consistent with that described We selected these benchmarks for comparison because by Hahn [8]. each was thought to emphasize a strength or weakness of a particular method and to gauge the effectiveness of B. Mirtich method contact models on standard robotic simulation scenarios. These comparisons are far from exhaustive, and we have We implemented the method described in Mirtich’s thesis even observed the same contact models applied to similar [19] that adheres to Stronge’s collision model [20]. scenarios with vastly different performance. Nevertheless, these benchmarks are a starting point for a persistent means C. Anitescu-Potra method to measure the performance of the evolving space of contact models. We hope that the set of benchmarks will increase in We implemented the method of Anitescu and Potra [10] size and scope as researchers discover phenomena that are using impulses to handle all contacts. Efficient solution of the poorly modeled by some or all of existing contact models. linear complementarity problem generated by the Anitescu The geometries used in the experiments are intentionally and Potra model is key to a fair comparison between compet- kept simple– boxes are used predominantly– in order to focus ing methods. We use three LCP solvers. The first is a Lemke on contact methods, rather than issues with collision detec- solver (adapted to C++) from the LEMKE library [21]. The tion. Similarly, we set the coefficient of restitution to zero second solver is the PATH solver [22], a commercial grade in order to evaluate the underlying contact model instead of library for solving mixed complementarity problems. The restitution model (e.g., Newtonian, Poisson, etc.) employed: third solver is the robust LCP solver of Yamane and Naka- in the case of the convex optimization and Anitescu-Potra mura [23], augmented with Lloyd’s speedups