Improving Gradient Computation for Differentiable Physics Simulation with Contacts

04/28/2023
by   Yaofeng Desmond Zhong, et al.
0

Differentiable simulation enables gradients to be back-propagated through physics simulations. In this way, one can learn the dynamics and properties of a physics system by gradient-based optimization or embed the whole differentiable simulation as a layer in a deep learning model for downstream tasks, such as planning and control. However, differentiable simulation at its current stage is not perfect and might provide wrong gradients that deteriorate its performance in learning tasks. In this paper, we study differentiable rigid-body simulation with contacts. We find that existing differentiable simulation methods provide inaccurate gradients when the contact normal direction is not fixed - a general situation when the contacts are between two moving objects. We propose to improve gradient computation by continuous collision detection and leverage the time-of-impact (TOI) to calculate the post-collision velocities. We demonstrate our proposed method, referred to as TOI-Velocity, on two optimal control problems. We show that with TOI-Velocity, we are able to learn an optimal control sequence that matches the analytical solution, while without TOI-Velocity, existing differentiable simulation methods fail to do so.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/08/2022

Differentiable Physics Simulations with Contacts: Do They Have Correct Gradients w.r.t. Position, Velocity and Control?

In recent years, an increasing amount of work has focused on differentia...
research
02/20/2022

Real-time Model Predictive Control and System Identification Using Differentiable Physics Simulation

Developing robot controllers in a simulated environment is advantageous ...
research
03/30/2021

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

We present a fast and feature-complete differentiable physics engine tha...
research
06/23/2022

Augmenting differentiable physics with randomized smoothing

In the past few years, following the differentiable programming paradigm...
research
07/04/2020

Scalable Differentiable Physics for Learning and Control

Differentiable physics is a powerful approach to learning and control pr...
research
01/04/2023

DiffXPBD : Differentiable Position-Based Simulation of Compliant Constraint Dynamics

We present DiffXPBD, a novel and efficient analytical formulation for th...
research
11/10/2021

Gradients are Not All You Need

Differentiable programming techniques are widely used in the community a...

Please sign up or login with your details

Forgot password? Click here to reset