Skip to main content
QUICK REVIEW

[Paper Review] Dojo: A Differentiable Physics Engine for Robotics

Taylor A. Howell, Simon Le Cleac’h|arXiv (Cornell University)|Mar 2, 2022
Model Reduction and Neural NetworksPhysics and Astronomy10 citations
TL;DR

Dojo is a differentiable physics engine for robotics that enables stable, accurate simulation of rigid-body dynamics with hard contact and friction using a variational integrator and a custom primal-dual interior-point method to solve a nonlinear complementarity problem (NCP). It provides smooth, analytic gradients through contact events via implicit differentiation, enabling high-accuracy simulation and efficient optimization for planning, policy learning, and system identification with minimal interpenetration and no creeping artifacts at low sample rates (e.g., 65 Hz).

ABSTRACT

We present Dojo, a differentiable physics engine for robotics that prioritizes stable simulation, accurate contact physics, and differentiability with respect to states, actions, and system parameters. Dojo models hard contact and friction with a nonlinear complementarity problem with second-order cone constraints. We introduce a custom primal-dual interior-point method to solve the second order cone program for stable forward simulation over a broad range of sample rates. We obtain smooth gradient approximations with this solver through the implicit function theorem, giving gradients that are useful for downstream trajectory optimization, policy optimization, and system identification applications. Specifically, we propose to use the central path parameter threshold in the interior point solver as a user-tunable design parameter. A high value gives a smooth approximation to contact dynamics with smooth gradients for optimization and learning, while a low value gives precise simulation rollouts with hard contact. We demonstrate Dojo's differentiability in trajectory optimization, policy learning, and system identification examples. We also benchmark Dojo against MuJoCo, PyBullet, Drake, and Brax on a variety of robot models, and study the stability and simulation quality over a range of sample frequencies and accuracy tolerances. Finally, we evaluate the sim-to-real gap in hardware experiments with a Ufactory xArm 6 robot. Dojo is an open source project implemented in Julia with Python bindings, with code available at https://github.com/dojo-sim/Dojo.jl.

Motivation & Objective

  • Address the limitations of existing physics engines in robotics, including instability at low sample rates, interpenetration, creeping, and non-smooth gradients through contact.
  • Enable stable and accurate simulation of hard contact and friction dynamics using a physics- and optimization-first design approach.
  • Provide smooth, analytic gradients through contact events to support efficient gradient-based optimization in robotics applications.
  • Improve sim-to-real transfer by minimizing simulation artifacts like penetration and creep while maintaining computational robustness.
  • Develop a differentiable physics engine that supports system identification, trajectory optimization, and policy learning with high fidelity.

Proposed method

  • Uses a variational integrator to ensure energy and momentum conservation and stability at low time steps (e.g., 65 Hz), avoiding the need for high-frequency sampling.
  • Models contact dynamics via a nonlinear complementarity problem (NCP) with second-order cones for friction, enabling accurate hard contact and impact simulation.
  • Employs a custom primal-dual interior-point method to solve the NCP reliably and robustly, with minimal hyperparameter tuning across diverse systems.
  • Applies implicit differentiation to the interior-point solver to compute smooth, analytic gradients of the simulation state with respect to states, actions, and system parameters.
  • Supports maximal-coordinate state representation and handles cone and quaternion constraints natively, improving modeling fidelity for robotic systems.
  • Enables efficient gradient computation via the chain rule applied to the implicit solution of the NCP, avoiding finite-difference approximations or subgradients.

Experimental results

Research questions

  • RQ1Can a differentiable physics engine achieve stable simulation at low sample rates (e.g., 65 Hz) while maintaining physical accuracy and avoiding interpenetration?
  • RQ2Can a nonlinear complementarity problem with second-order cone friction models provide more accurate contact dynamics than soft-contact or LCP-based solvers?
  • RQ3Can implicit differentiation of a primal-dual interior-point solver yield smooth, analytic gradients through contact events, enabling better optimization in robotics?
  • RQ4To what extent does Dojo improve sim-to-real transfer in system identification and policy learning compared to existing engines?
  • RQ5Can Dojo support high-fidelity simulation and optimization for complex robotic tasks like locomotion and manipulation with minimal artifacts?

Key findings

  • Dojo achieves stable simulation at 65 Hz with zero interpenetration in the Atlas drop experiment, while MuJoCo exhibits centimeters of floor-foor penetration and instability.
  • The system identification task achieved less than 5% error in learning box geometry and friction cone parameters from real-world trajectory data.
  • The learned system parameters from Dojo closely matched ground-truth values, and the simulated trajectory matched the real trajectory with high fidelity (visualized in Fig. 10).
  • Dojo’s gradients are smooth and analytic, enabling efficient and reliable optimization in planning and policy learning, unlike subgradients or finite-difference approximations.
  • The engine demonstrates robust performance across diverse systems without hyperparameter tuning, thanks to the numerical stability of the interior-point method.
  • Dojo enables accurate simulation of hard contact with machine-precision constraints, eliminating creeping artifacts in sliding motions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.