NeuralSim: Augmenting Differentiable Simulators with Neural Networks

Differentiable simulators provide an avenue for closing the sim-to-real gap by enabling the use of efficient, gradient-based optimization algorithms to find the simulation parameters that best fit the observed sensor readings. Nonetheless, these analytical models can only predict the dynamical behavior of systems for which they have been designed. In this work, we study the augmentation of a novel differentiable rigid-body physics engine via neural networks that is able to learn nonlinear relationships between dynamic quantities and can thus model effects not accounted for in traditional simulators. Such augmentations require less data to train and generalize better compared to entirely data-driven models. Through extensive experiments, we demonstrate the ability of our hybrid simulator to learn complex dynamics involving frictional contacts from real data, as well as match known models of viscous friction, and present an approach for automatically discovering useful augmentations. We show that, besides benefiting dynamics modeling, inserting neural networks can accelerate model-based control architectures. We observe a ten-fold speedup when replacing the QP solver inside a model-predictive gait controller for quadruped robots with a neural network, allowing us to significantly improve control delays as we demonstrate in real-hardware experiments. We publish code, additional results and videos from our experiments on our project webpage at https://sites.google.com/usc.edu/neuralsim.

[1]  Dieter Fox,et al.  BayesSim: adaptive domain randomization via probabilistic inference for robotics simulators , 2019, Robotics: Science and Systems.

[2]  Jeffrey C. Trinkle,et al.  An implicit time-stepping scheme for rigid body dynamics with Coulomb friction , 2000, Proceedings 2000 ICRA. Millennium Conference. IEEE International Conference on Robotics and Automation. Symposia Proceedings (Cat. No.00CH37065).

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

[4]  Leslie Pack Kaelbling,et al.  Augmenting Physical Simulators with Stochastic Neural Networks: Case Study of Planar Pushing and Bouncing , 2018, 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS).

[5]  David Duvenaud,et al.  Neural Ordinary Differential Equations , 2018, NeurIPS.

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

[7]  Paris Perdikaris,et al.  Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations , 2019, J. Comput. Phys..

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

[9]  Jason Yosinski,et al.  Hamiltonian Neural Networks , 2019, NeurIPS.

[10]  Wei Chen,et al.  Learning to predict the cosmological structure formation , 2018, Proceedings of the National Academy of Sciences.

[11]  Joonho Lee,et al.  Learning agile and dynamic motor skills for legged robots , 2019, Science Robotics.

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

[13]  N. Simon,et al.  Sparse-Input Neural Networks for High-dimensional Nonparametric Regression and Classification , 2017, 1711.07592.

[14]  Andrew W. Moore,et al.  Fast, Robust Adaptive Control by Learning only Forward Models , 1991, NIPS.

[15]  Kuan-Ting Yu,et al.  More than a million ways to be pushed. A high-fidelity experimental dataset of planar pushing , 2016, 2016 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS).

[16]  K. H. Hunt,et al.  Coefficient of Restitution Interpreted as Damping in Vibroimpact , 1975 .

[17]  Peter C. Horak,et al.  On the Similarities and Differences Among Contact Models in Robot Simulation , 2019, IEEE Robotics and Automation Letters.

[18]  Bob Carpenter,et al.  The Stan Math Library: Reverse-Mode Automatic Differentiation in C++ , 2015, ArXiv.

[19]  C. Karen Liu,et al.  Data-Augmented Contact Model for Rigid Body Simulation , 2018, L4DC.

[20]  Sepp Hochreiter,et al.  Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs) , 2015, ICLR.

[21]  Jonas Buchli,et al.  Automatic Differentiation of Rigid Body Dynamics for Optimal Control and Estimation , 2017, Adv. Robotics.

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

[23]  Pierre-Yves Oudeyer,et al.  Sim-to-Real Transfer with Neural-Augmented Robot Simulation , 2018, CoRL.

[24]  Jiajun Wu,et al.  Learning Particle Dynamics for Manipulating Rigid Bodies, Deformable Objects, and Fluids , 2018, ICLR.

[25]  Jie Tan,et al.  Learning Agile Robotic Locomotion Skills by Imitating Animals , 2020, RSS 2020.

[26]  Cordelia Schmid,et al.  Differentiable Simulation for Physical System Identification , 2021, IEEE Robotics and Automation Letters.

[27]  Gaurav S. Sukhatme,et al.  Real2Sim Transfer using Differentiable Physics , 2019 .

[28]  Austin Wang,et al.  Encoding Physical Constraints in Differentiable Newton-Euler Algorithm , 2020, L4DC.

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

[30]  Sanja Fidler,et al.  gradSim: Differentiable simulation for system identification and visuomotor control , 2021, ICLR.

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

[32]  Jure Leskovec,et al.  Learning to Simulate Complex Physics with Graph Networks , 2020, ICML.

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

[34]  Jan Peters,et al.  Deep Lagrangian Networks: Using Physics as Model Prior for Deep Learning , 2019, ICLR.

[35]  Alberto Rodriguez,et al.  TossingBot: Learning to Throw Arbitrary Objects With Residual Physics , 2019, IEEE Transactions on Robotics.

[36]  Jiajun Wu,et al.  DensePhysNet: Learning Dense Physical Object Representations via Multi-step Dynamic Interactions , 2019, Robotics: Science and Systems.

[37]  Gaurav S. Sukhatme,et al.  Physics-based Simulation of Continuous-Wave LIDAR for Localization, Calibration and Tracking , 2020, 2020 IEEE International Conference on Robotics and Automation (ICRA).

[38]  Noah Simon,et al.  A Sparse-Group Lasso , 2013 .

[39]  Twan Koolen,et al.  Julia for robotics: simulation and real-time control in a high-level programming language , 2019, 2019 International Conference on Robotics and Automation (ICRA).

[40]  Jan Peters,et al.  Differentiable Physics Models for Real-world Offline Model-based Reinforcement Learning , 2020, 2021 IEEE International Conference on Robotics and Automation (ICRA).

[41]  Stephen P. Boyd,et al.  OSQP: an operator splitting solver for quadratic programs , 2017, 2018 UKACC 12th International Conference on Control (CONTROL).

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

[43]  Bin Dong,et al.  PDE-Net: Learning PDEs from Data , 2017, ICML.

[44]  Melissa L. McGuire,et al.  Parallel Monotonic Basin Hopping for Low Thrust Trajectory Optimization , 2018 .

[45]  S. Schaal,et al.  Robot juggling: implementation of memory-based learning , 1994, IEEE Control Systems.

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

[47]  Donghyun Kim,et al.  Highly Dynamic Quadruped Locomotion via Whole-Body Impulse Control and Model Predictive Control , 2019, ArXiv.

[48]  J. Baumgarte Stabilization of constraints and integrals of motion in dynamical systems , 1972 .

[49]  Roy Featherstone,et al.  Rigid Body Dynamics Algorithms , 2007 .

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

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

[52]  Dario Izzo,et al.  A parallel global multiobjective framework for optimization: pagmo , 2020, J. Open Source Softw..

[53]  Nils Thuerey,et al.  Solver-in-the-Loop: Learning from Differentiable Physics to Interact with Iterative PDE-Solvers , 2020, NeurIPS.

[54]  John McPhee,et al.  A 3D ellipsoidal volumetric foot–ground contact model for forward dynamics , 2018 .

[55]  Hessam Babaee,et al.  Deep Learning of Turbulent Scalar Mixing , 2018, Physical Review Fluids.