[Paper Review] Fast and Feature-Complete Differentiable Physics for Articulated Rigid Bodies with Contact
This paper presents DiffDart, a fast and feature-complete differentiable physics engine built on DART that enables analytical gradient computation through articulated rigid bodies with contact constraints. By introducing novel differentiable formulations for LCP-based contact dynamics, geometric contact detection, and continuous-time elastic collisions, the engine achieves 48x speedup over finite-differencing in Jacobian computation while preserving full compatibility with existing physics simulation features.
We present a fast and feature-complete differentiable physics engine, Nimble (nimblephysics.org), 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 complementarity-aware 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 87x single-core speedup over finite-differencing in computing analytical Jacobians for a single timestep, while preserving all the expressiveness of original DART.
Motivation & Objective
- To develop a differentiable physics engine that matches the feature completeness of production-grade simulators like DART, MuJoCo, and Bullet.
- To enable efficient, analytical gradient computation through hard contact constraints without reformulating the LCP as a QP.
- To maintain compatibility with existing robotics applications by extending a mature physics engine rather than rebuilding from scratch.
- To support complex contact geometries, friction, and continuous-time collision handling with differentiable approximations.
- To achieve computational efficiency sufficient for real-time optimization in robotics, such as policy learning and system identification.
Proposed method
- Introduces a novel method for differentiating through the LCP formulation of inelastic contact without casting it as a quadratic program, enabling fast analytical gradients.
- Develops analytical gradients through 3D contact geometry algorithms, allowing differentiability in collision detection despite non-smooth behavior.
- Proposes a continuous-time approximation for elastic collisions to avoid errors from discrete-time integration in gradient computation.
- Extends the LCP solver to handle boxed LCPs for frictional contact, modeling clamping and upper-bound states using a mapping matrix E to relate friction forces.
- Implements all components in an open-source fork of DART, with a pip-installable package and full support for generalized coordinates and joint types.
- Uses heuristic selection of subgradients at contact state transitions (e.g., static to sliding) to ensure stable optimization convergence.
Experimental results
Research questions
- RQ1Can a differentiable physics engine achieve both feature completeness and high computational efficiency comparable to non-differentiable simulators?
- RQ2Is it possible to compute analytical gradients through LCP-based contact dynamics without reformulating as a QP?
- RQ3How can differentiability be preserved through complex 3D contact geometry and non-smooth collision events?
- RQ4Can continuous-time approximations improve gradient accuracy in discrete-time physics engines?
- RQ5Does heuristic subgradient selection at contact transitions negatively affect optimization convergence?
Key findings
- The proposed differentiable physics engine achieves a 48x speedup in computing analytical Jacobians per timestep compared to finite-differencing, demonstrating high computational efficiency.
- The engine supports all features of the original DART simulator, including various joint types, actuation mechanisms, and complex contact geometries, ensuring backward compatibility.
- Analytical gradients through contact geometry and LCPs are computed in microseconds per step, enabling real-time applications in robotics and machine learning.
- The heuristic subgradient selection at contact state transitions does not negatively impact optimization convergence, as validated through experiments.
- The continuous-time approximation of elastic collisions reduces errors in gradient computation that arise from discrete-time discretization.
- The implementation is open-source and available via pip, with full support for differentiable Featherstone dynamics and LCP-based contact.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.