Fast Implementation of Lemke’s Algorithm for Rigid Body Contact Simulation Computer Science Department University of British Columbia Vancouver, Canada John E. Lloyd
Applications: mechanical simulation, animation, haptics Haptics requires speed (1 Khz) and accuracy
Extended contact can result in many contact points
* = number of contacts, = number of bodies Use problem structure to speed up solution Reduce complexity to nearly * complexity for fixed number of bodies Contributions Most exact solution method is Lemke’s algorithm with expected complexity
d 21 n 1 d 11 f x Problem formulation n 2
Constraints n i d i4 d i3 d i1 d i5 d i6 d i2 Non-penetration: Friction opposite velocity: Friction cone:
Results in a Linear Complementarity Problem (LCP):
Solving Contact LCPs Iterative techniques; includes impulse methods [Mirtich & Canny ’95, Guendelman ’03] => Accuracy, convergence? Pivoting methods: Lemke’s algorithm [Anitescu & Potra ’97, Stewart & Trinkle ’96] => Speed, robustness?
Pivoting: exchange subsets of z and w If, then we have a solution Generally, one variable exchange per pivot
Involves solving Complexity, and typically pivots Hence total expected complexity Once per pivot: compute
Peg in hole test case
1 Solve more efficiently 2 Reduce the number of pivots How to improve performance?
1 Solving can be partitioned into:* Eliminate * Ignoring Lemke covering vector in this discussion
This reduces the system to Eliminate
Reduced matrix has size Hence per-pivot computation is So total expected complexity This yields the final system
2 Reducing the number of pivots Observation: Only need to compute and for active contacts; i.e, those for which
So start with a frictionless LCP and expand it as become active:
Ideally, final system rank is Hence pivots So total expected complexity
Results: peg in hole Standard Structural Reduced
Results: sample contacts Standard Structural Reduced
Results: block stack Standard Structural Reduced
Results
Fast: exploit problem structure Better complexity: nearly for fixed number of bodies Efficient: no need to compute More robust: smaller system to solve each pivot Conclusions: Improved pivoting method for contact simulation
Future Work Exploit temporal coherence (give solver an advanced starting point) More efficient solution for reduced equation Robust pivot selection (minimum ratio test)
LCP matrix can be quite large … for 4 friction directions, size
Larger number of needed for accurate friction computation v f
Closeup: sample contacts