ADD: analytically differentiable dynamics for multi-body systems with frictional contact

Moritz Geilinger, David Hahn, Jonas Zehnder, Moritz Bächer, Bernhard Thomaszewski, Stelian Coros

TL;DR

This paper introduces ADD, a novel differentiable physics simulator for multi-body systems that can accurately model frictional contact. By employing a principled mollification of contact forces and fully implicit time integration, ADD enables efficient and robust gradient-based optimization for a wide range of robotics and graphics applications, outperforming traditional methods.

What Problem Does This Paper Address?

Simulating the physical interactions of multi-body systems, especially those involving frictional contact, is crucial for robotics, animation, and engineering. However, accurately modeling these interactions is challenging due to the non-smooth and discontinuous nature of contact and friction. This non-smoothness poses a significant hurdle for gradient-based optimization methods, which rely on smooth objective function landscapes to efficiently find optimal solutions. Traditional physics simulators often prioritize speed over differentiability, or use approximations that limit their applicability in inverse problems. This paper addresses the need for a differentiable simulator that can handle complex frictional contact scenarios accurately and efficiently, enabling gradient-based optimization for tasks like parameter estimation, control, and motion planning.

Methods

The core of ADD is a differentiable dynamics solver that combines two key innovations:

  • Smooth Frictional Contact Model: The authors propose a principled mollification of normal and tangential contact forces. Instead of using hard, discontinuous constraints, they employ soft constraint formulations, particularly penalty methods. For normal forces, a piecewise linear penalty function is used. For friction, they use a clamped linear penalty force that approximates Coulomb friction. This approach allows for tunable trade-offs between accuracy and smoothness.
  • Fully Implicit Time Integration: To handle the stiff forces arising from contact constraints and to ensure stability with potentially high penalty stiffness, ADD uses a fully implicit time integration scheme (specifically, BDF1 and BDF2 are mentioned). This approach is crucial for both robust forward simulation and for enabling analytical differentiation.

These components are integrated into a unified framework that can handle both rigid and deformable bodies. The differentiability is achieved through analytical computation of derivatives, leveraging adjoint sensitivity analysis. This avoids the inaccuracies and computational costs associated with finite differencing. For scenarios where exact static friction is critical, a hybrid approach is introduced that combines penalty methods with hard equality constraints for static friction.

Datasets

The paper does not introduce new datasets. Instead, it uses real-world experimental setups for data collection to validate its parameter estimation capabilities. These include:

  • Motion Capture Data: Used to capture the behavior of elastic foam specimens (sphere and cube) for material parameter estimation.
  • Kinect v2 Depth Camera Data: Used to capture the motion of a foam ball for parameter estimation.

The paper also presents numerous simulation-based experiments and benchmarks, often comparing its approach against other simulation methods or optimization algorithms.

Key Insights and Ideas

  • Smoothness is Key for Optimization: The paper strongly emphasizes that while exact contact models are desirable for realism, a smooth approximation is essential for efficient gradient-based optimization. The proposed mollification techniques achieve this balance.
  • Implicit Integration is Crucial for Differentiability: Using implicit time integration is not just for stability; it's fundamental for deriving analytical derivatives of the simulation state with respect to input parameters, especially when dealing with stiff contact forces.
  • Penalty Methods with Implicit Integration are Surprisingly Effective: The authors demonstrate that simple penalty methods, when combined with implicit integration, can achieve high accuracy and robustness, even with stiff penalties, making them suitable for differentiable simulation.
  • Hybrid Approach for Exact Static Friction: For applications where precise static friction is paramount, the hybrid method offers a way to enforce hard constraints for static friction while retaining the differentiability benefits of soft contact models for normal forces.
  • Differentiable Simulation as a Powerful Tool for Learning: The integration of the differentiable simulator as a component within a neural network loss function (as shown in the self-supervised learning section) opens up new avenues for learning control policies without relying on massive pre-collected datasets.

Key Results

  • Outperforms Gradient-Free Methods: In various optimization tasks (e.g., throwing a ball, trajectory optimization), ADD with gradient-based optimization significantly outperforms gradient-free methods like CMA-ES in terms of speed and solution quality. For instance, finding an exact solution for a two-bounce throw took minutes with L-BFGS vs. hours with CMA-ES.
  • Accurate Parameter Estimation: The simulator successfully estimates material parameters (Young's modulus, viscosity, friction) for real-world objects, producing simulations that closely match captured motion.
  • Robust Trajectory Optimization: ADD enables the optimization of complex robotic motions, including those involving compliant actuators and soft bodies, with results that transfer to real-world robots.
  • Efficient Simulation: The use of implicit integration and analytical derivatives leads to efficient simulations, even for complex scenarios with many contacts and degrees of freedom. Table 1 and 2 provide specific timings and performance metrics for various examples.
  • Visual Equivalence: For many scenarios, the results from the proposed differentiable methods (linear penalty, tanh penalty, hybrid) are visually indistinguishable from more computationally expensive methods like SQP.

Limitations and Future Work

  • Isotropic Coulomb Friction: The current model assumes isotropic Coulomb friction. The authors note that anisotropic friction is an important characteristic for some physical systems (e.g., textiles) and would be a valuable extension.
  • Smooth Distance Metrics: The approach relies on the availability of smooth distance metrics for contact detection. For highly complex, high-resolution, and non-convex geometries, more advanced collision handling would be necessary.
  • Learning-Based Control Extension: The authors see significant promise in extending their differentiable simulation framework for deep reinforcement learning, particularly in reducing sample complexity by leveraging analytical gradients.
  • Complex Multi-Body Systems: Future work will focus on investigating simulation-driven optimization for highly complex multi-body systems that combine rigid and flexible elements, especially in the context of robotics and control.
  • Real-World Deployment Challenges: While simulation results transfer to real-world robots, challenges remain in areas like precise robot calibration, environmental alignment, and hardware latency.

Summary updated

Abstract

We present a differentiable dynamics solver that is able to handle frictional contact for rigid and deformable objects within a unified framework. Through a principled mollification of normal and tangential contact forces, our method circumvents the main difficulties inherent to the non-smooth nature of frictional contact. We combine this new contact model with fully-implicit time integration to obtain a robust and efficient dynamics solver that is analytically differentiable. In conjunction with adjoint sensitivity analysis, our formulation enables gradient-based optimization with adaptive trade-offs between simulation accuracy and smoothness of objective function landscapes. We thoroughly analyse our approach on a set of simulation examples involving rigid bodies, visco-elastic materials, and coupled multi-body systems. We furthermore showcase applications of our differentiable simulator to parameter estimation for deformable objects, motion planning for robotic manipulation, trajectory optimization for compliant walking robots, as well as efficient self-supervised learning of control policies.
BibTeX
@article{geilinger2020add,
  author = {Moritz Geilinger and David Hahn and Jonas Zehnder and Moritz Bächer and Bernhard Thomaszewski and Stelian Coros},
  title = {{ADD: analytically differentiable dynamics for multi-body systems with frictional contact}},
  journal = {ACM Trans. Graphics},
  year = {2020},
  doi = {10.1145/3414685.3417766},
}
Figure