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

07/08/2022
by   Yaofeng Desmond Zhong, et al.
0

In recent years, an increasing amount of work has focused on differentiable physics simulation and has produced a set of open source projects such as Tiny Differentiable Simulator, Nimble Physics, diffTaichi, Brax, Warp, Dojo and DiffCoSim. By making physics simulations end-to-end differentiable, we can perform gradient-based optimization and learning tasks. A majority of differentiable simulators consider collisions and contacts between objects, but they use different contact models for differentiability. In this paper, we overview four kinds of differentiable contact formulations - linear complementarity problems (LCP), convex optimization models, compliant models and position-based dynamics (PBD). We analyze and compare the gradients calculated by these models and show that the gradients are not always correct. We also demonstrate their ability to learn an optimal control strategy by comparing the learned strategies with the optimal strategy in an analytical form. The codebase to reproduce the experiment results is available at https://github.com/DesmondZhong/diff_sim_grads.

READ FULL TEXT
research
04/28/2023

Improving Gradient Computation for Differentiable Physics Simulation with Contacts

Differentiable simulation enables gradients to be back-propagated throug...
research
06/23/2022

Augmenting differentiable physics with randomized smoothing

In the past few years, following the differentiable programming paradigm...
research
06/28/2022

Rethinking Optimization with Differentiable Simulation from a Global Perspective

Differentiable simulation is a promising toolkit for fast gradient-based...
research
07/23/2023

JAX FDM: A differentiable solver for inverse form-finding

We introduce JAX FDM, a differentiable solver to design mechanically eff...
research
10/14/2022

Differentiable Hybrid Traffic Simulation

We introduce a novel differentiable hybrid traffic simulator, which simu...
research
04/09/2022

Trajectory Optimization Using Neural Network Gradients of Learned Dynamics

Trajectory optimization methods have achieved an exceptional level of pe...
research
11/09/2021

A research framework for writing differentiable PDE discretizations in JAX

Differentiable simulators are an emerging concept with applications in s...

Please sign up or login with your details

Forgot password? Click here to reset