Fast and Feature-Complete Differentiable Physics for Articulated Rigid Bodies with Contact

We present a fast and feature-complete differentiable physics engine that supports Lagrangian dynamics and hard contact constraints for articulated rigid body simulation. Our differentiable physics engine offers a complete set of features that are typically only available in non-differentiable physics simulators commonly used by robotics applications. We solve contact constraints precisely using linear complementarity problems (LCPs). We present efficient and novel analytical gradients through the LCP formulation of inelastic contact that exploit the sparsity of the LCP solution. We support complex contact geometry, and gradients approximating continuous-time elastic collision. We also introduce a novel method to compute complementarityaware gradients that help downstream optimization tasks avoid stalling in saddle points. We show that an implementation of this combination in an existing physics engine (DART) is capable of a 45x single-core speedup over finite-differencing in computing analytical Jacobians for a single timestep, while preserving all the expressiveness of original DART.

[1]  Frédo Durand,et al.  Taichi , 2019, ACM Trans. Graph..

[2]  William H. Press,et al.  Numerical Recipes 3rd Edition: The Art of Scientific Computing , 2007 .

[3]  Bernhard Thomaszewski,et al.  ADD , 2020, ACM Trans. Graph..

[4]  Connor Schenck,et al.  SPNets: Differentiable Fluid Dynamics for Deep Neural Networks , 2018, CoRL.

[5]  Joshua B. Tenenbaum,et al.  A Compositional Object-Based Approach to Learning Physical Dynamics , 2016, ICLR.

[6]  Vaibhav Dixit,et al.  A Comparison of Automatic Differentiation and Continuous Sensitivity Analysis for Derivatives of Differential Equation Solutions , 2018, 2021 IEEE High Performance Extreme Computing Conference (HPEC).

[7]  E. Todorov,et al.  A generalized iterative LQG method for locally-optimal feedback control of constrained nonlinear stochastic systems , 2005, Proceedings of the 2005, American Control Conference, 2005..

[8]  David Baraff,et al.  Fast contact force computation for nonpenetrating rigid bodies , 1994, SIGGRAPH.

[9]  John Salvatier,et al.  Theano: A Python framework for fast computation of mathematical expressions , 2016, ArXiv.

[10]  Daniel L. K. Yamins,et al.  Flexible Neural Representation for Physics Prediction , 2018, NeurIPS.

[11]  Vladlen Koltun,et al.  Learning to Control PDEs with Differentiable Physics , 2020, ICLR.

[12]  C.J.F. Ridders,et al.  Accurate computation of F′(x) and F′(x) F″(x) , 1982 .

[13]  Yvon Jarny,et al.  A General Optimization Method using Adjoint Equation for Solving Multidimensional Inverse Heat Conduction , 1991 .

[14]  Siddhartha S. Srinivasa,et al.  DART: Dynamic Animation and Robotics Toolkit , 2018, J. Open Source Softw..

[15]  Eric Heiden,et al.  Automatic Differentiation and Continuous Sensitivity Analysis of Rigid Body Dynamics , 2020, ICRA 2020.

[16]  Abdeslam Boularias,et al.  Learning to Slide Unknown Objects with Differentiable Physics Simulations , 2020, Robotics: Science and Systems.

[17]  Yuval Tassa,et al.  MuJoCo: A physics engine for model-based control , 2012, 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems.

[18]  Gaurav S. Sukhatme,et al.  Augmenting Differentiable Simulators with Neural Networks to Close the Sim2Real Gap , 2020, ArXiv.

[19]  Ming C. Lin,et al.  Differentiable Cloth Simulation for Inverse Problems , 2019, NeurIPS.

[20]  Junggon Kim Lie Group Formulation of Articulated Rigid Body Dynamics , 2012 .

[21]  Marc Toussaint,et al.  Differentiable Physics and Stable Modes for Tool-Use and Manipulation Planning , 2018, Robotics: Science and Systems.

[22]  Yuval Tassa,et al.  Synthesis and stabilization of complex behaviors through online trajectory optimization , 2012, 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems.

[23]  Evangelos A. Theodorou,et al.  Constrained Sampling-based Trajectory Optimization using Stochastic Approximation , 2019, 2020 IEEE International Conference on Robotics and Automation (ICRA).

[24]  Benjamin Schrauwen,et al.  Automated Design of Complex Dynamic Systems , 2014, PloS one.

[25]  Steven M. Seitz,et al.  Interactive manipulation of rigid body simulations , 2000, SIGGRAPH.

[26]  Joshua B. Tenenbaum,et al.  End-to-End Differentiable Physics for Learning and Control , 2018, NeurIPS.

[27]  A. Iollo,et al.  An aerodynamic optimization method based on the inverse problem adjoint equations , 2001 .

[28]  F. Jourdan,et al.  A Gauss-Seidel like algorithm to solve frictional contact problems , 1998 .

[29]  Jonas Degrave,et al.  A DIFFERENTIABLE PHYSICS ENGINE FOR DEEP LEARNING IN ROBOTICS , 2016, Front. Neurorobot..

[30]  Nicolas Mansard,et al.  Analytical Derivatives of Rigid Body Dynamics Algorithms , 2018, Robotics: Science and Systems.

[31]  Luca Antiga,et al.  Automatic differentiation in PyTorch , 2017 .

[32]  J. Zico Kolter,et al.  OptNet: Differentiable Optimization as a Layer in Neural Networks , 2017, ICML.

[33]  Jiancheng Liu,et al.  ChainQueen: A Real-Time Differentiable Physical Simulator for Soft Robotics , 2018, 2019 International Conference on Robotics and Automation (ICRA).

[34]  Adrien Treuille,et al.  Fluid control using the adjoint method , 2004, ACM Trans. Graph..

[35]  Frédo Durand,et al.  DiffTaichi: Differentiable Programming for Physical Simulation , 2020, ICLR.

[36]  Ming C. Lin,et al.  Scalable Differentiable Physics for Learning and Control , 2020, ICML.

[37]  Razvan Pascanu,et al.  Interaction Networks for Learning about Objects, Relations and Physics , 2016, NIPS.

[38]  Gaurav S. Sukhatme,et al.  Interactive Differentiable Simulation , 2019, ArXiv.

[39]  David Q. Mayne,et al.  Differential dynamic programming , 1972, The Mathematical Gazette.