Source-linked AI summary
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
Frictional contact makes simulation derivatives difficult, limiting inverse simulation’s alternative to trial-and-error parameter search. This paper combines mollified soft-contact forces, implicit integration, and adjoint derivatives; its validation reports accurate penalty contacts and better convergence than hard-constraint-only alternatives.
Problem
Forward simulation often leaves users to find control or design parameters by trial and error, while inverse simulation depends on derivatives of simulation runs.
Source: §1 · p. 1Method
The solver mollifies normal and tangential contact forces in a soft-constraint model with fully implicit time stepping and analytically computed adjoint sensitivities.
Source: §1 · p. 1Results
Penalty-based contact models approach complementarity and Coulomb-law ground truth and improve forward-simulation convergence over hard-constraint-only alternatives; with implicit integration, normal penalties are sufficiently accurate.
Source: §4.4 · p. 7, §7 · p. 13Takeaways & Limitations
The simulator supports optimizing compliant robot motion using full-body dynamics, producing a successful gait with compliant actuators and soft feet.
Source: §6.4 · p. 13The model assumes isotropic Coulomb friction and a readily available, sufficiently smooth distance metric; high-resolution, highly non-convex collisions need more elaborate handling.
Source: §7 · p. 13
Abstract
from arXiv · showhide
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.
1 INTRODUCTION
Frictional contact makes simulation gradients difficult to use for inverse design, leaving forward-simulation users to rely on trial and error. The paper presents a differentiable solver for rigid and soft bodies and demonstrates its use in estimation, control, and learning.
1 INTRODUCTION
- Frictional collisions create nonlinearities and quasi-discontinuities that make gradient-based inverse simulation difficult.Contact regimes introduce discontinuities in forces and their derivatives.Source: §1 · p. 1
- The solver combines fully implicit time stepping with mollified normal and tangential contact forces in a soft-constraint formulation.It analytically differentiates simulation outcomes through adjoint sensitivity analysis.Source: §1 · pp. 1–2
- The formulation offers a tunable trade-off between simulation accuracy and smoothness of objective-function landscapes.Source: §1 · p. 1
- Data-driven estimation of stiffness, viscous damping, and friction parameters produces models intended to reproduce and predict deformable specimens’ behavior.Source: §1 · p. 2
- Applications include manipulation behaviors, compliant-robot trajectory optimization, and self-supervised learning of control policies.The learning example trains a robot arm to toss a ball into a cup after one bounce.Source: §1 · p. 2
2 RELATED WORK
Prior contact work spans rigid and deformable bodies, while this paper targets inverse dynamics with frictional contact. Its differentiable formulation combines analytical derivatives and fully implicit integration for coupled rigid and soft systems.
2 RELATED WORK
- Earlier frictional-contact formulations extend from rigid-body LCP methods to deformable, quasi-rigid, cloth, and large rigid-body systems.The cited approaches include exact Coulomb friction and anisotropic friction models.Source: §2 · p. 2
- Unlike animation-focused coupled-body methods, this work targets inverse contact applications and combines softened contact penalties with hard constraints for static friction.The hybrid approach is described as the opposite of staggered projections.Source: §2 · p. 2
- For frictional parameter identification, the paper targets material properties and initial conditions from motion-capture data, extending reconstruction work to friction and deformable bodies.Source: §2 · p. 2
- The work distinguishes its inverse-dynamics focus from quasi-static inverse contact and prior optimal-control approaches using finite differences and explicit integration.The authors state that their approach handles both soft and stiff systems.Source: §2 · p. 2
- Compared with prior differentiable simulators, the paper emphasizes analytical sensitivity derivatives, fully implicit integration, and frictional contact for coupled rigid and deformable bodies.The cited alternatives include finite differences, auto-differentiation, or applications where explicit integration suffices.Source: §2 · pp. 2–3
3 DIFFERENTIABLE MULTI-BODY DYNAMICS: PRELIMINARIES
The paper formulates a unified differentiable dynamics framework for systems containing rigid and soft bodies. It uses implicit time stepping and sensitivity or adjoint calculations to optimize simulation-dependent objectives.
3 DIFFERENTIABLE MULTI-BODY DYNAMICS: PRELIMINARIES
- The dynamics formulation seeks a unified framework for multi-body systems composed of arbitrary arrangements of rigid and soft objects.Source: §3 · p. 3
3.1 Implicit time-stepping for multi-body systems
- Implicit integration supports robust two-way coupling of rigid and elastic bodies, including stiff contact forces and large time steps.At each step, Newton’s method finds the configuration that zeros the residual, with line search monitoring residual magnitude.Source: §3.1 · p. 3
3.2 Simulation Derivatives
- The sensitivity matrix records how trajectory configurations change with input parameters and can be computed by exploiting the residual Jacobian’s sparsity.For BDF1, each block relates a configuration at one time step to an input parameter.Source: §3.2 · pp. 3–4
3.3 The adjoint method
- The adjoint method computes an objective gradient without explicitly computing the full sensitivity matrix.The adjoint-state system can exploit block-triangular structure, with information propagating backward in time.Source: §3.3 · p. 4
4 DIFFERENTIABLE FRICTIONAL CONTACT MODEL
The section develops smooth contact forces for rigid and deformable systems, balancing physical contact accuracy with differentiable, smoother optimization landscapes. It compares hard-constraint, penalty, and hybrid treatments and evaluates their behavior in simulation and optimization.
4 DIFFERENTIABLE FRICTIONAL CONTACT MODEL
- The model defines normal contact through non-penetration forces and tangential friction through Coulomb-bounded stick or slip regimes, with contact points handled on deformable mesh nodes or rigid-body proxies.Rigid-body contact forces are mapped to generalized coordinates.Source: §4 · pp. 4–5
4.1 Sequential Quadratic Programming
- SQP imposes contact constraints through KKT conditions, but dynamic friction is difficult to linearize and its direction is ill-defined as sliding velocity approaches zero.The authors use SQP only for simple deformable comparisons where stability and convergence are not an issue.Source: §4.1 · p. 5
4.2 Penalty methods
- Piecewise-linear penalty forces turn contact into a formally unconstrained system; penalty stiffness controls collision-response smoothness, and tanh friction can soften constraints for optimization.Implicit integration and line search stabilize simulation across a wide range of penalty stiffnesses.Source: §4.2 · pp. 5–6, §4.3 · p. 6
4.3 Hybrid method
- The hybrid method applies hard constraints for static friction when feasible, reverting to clamped penalty forces when a hard constraint would exceed the Coulomb limit.This enforces static friction with hard constraints whenever possible while guaranteeing that the Coulomb limit is not violated.Source: §4.3 · p. 6
4.4 Summary and evaluation
- Penalty-based friction approaches the ground-truth contact solution and converges better than hard-constraint-only alternatives; linear friction converges faster than tanh and hybrid contacts, while SQP takes about twice the total CPU time.Implicit integration with line search maintains stability even for very stiff penalties.Source: §4.4 · p. 7
- Softer contact parameters smooth objective landscapes and reduce sensitivity to collision timing and order; continuation from soft to stiff contacts finds a better solution for the bunny-throwing task.The landscape's overall local-minimum structure remains similar as contacts soften, although minima shift slightly.Source: Figure 3 · p. 7, Figure 4 · p. 7, §4.4 · p. 8
5 INTERNAL AND EXTERNAL FORCES IN GENERALIZED COORDINATES
This section describes internal material forces, rigid-body contact damping, and spring-based multi-body couplings, alongside basic forward-simulation validation.
5.1 Soft bodies
- The quadratic, rotation-invariant viscosity model damps elastic oscillations without damping free-flight angular velocity, and behaves as a power-law model with flow index h = 2.The model defines viscous stress from Green strain rate; the cited comparison notes that linear-strain-rate models are not rotation invariant.Source: §5.1 · p. 8
- The three-tori drop test converges reliably to very low residuals for ground and wall contact; linear penalty is fastest, while tanh and hybrid are closely matched.The tests support penalty methods as sufficiently accurate with implicit integration and high penalty stiffness.Source: §5.1 · p. 8, Figure 5 · p. 8
5.2 Rigid bodies
- Without additional damping, bouncing rigid cubes show barely noticeable numerical damping at Δt = 1/60 s, while linear contact damping controls restitution and preserves symmetry over many bounces.Restitution occurs only below the critical damping factor, k_d^2 < 4k_nm.Source: §5.2 · p. 9, Figure 6 · p. 9
5.3 Multi-body systems
- Multi-body constraints use potential energies E(q) = (k_c/2)c(q)^Tc(q) to produce generalized forces, with springs modeling distance constraints, ball-and-socket joints, cables, and elastic strings.Hinges use attachment-point and axis-alignment constraints; active motors extend hinges with a relative-angle constraint and can add torque damping for PD control.Source: §5.3 · p. 9
6 RESULTS
The results apply the differentiable simulator to material estimation, throwing, self-supervised control learning, and trajectory optimization. Across these applications, the examples include contact-aware fitting from motion data, robot control, and optimization involving compliant and coupled systems.
6.1 Material parameter estimation
- Kinect-based fitting produced a good match for a foam ball despite lacking rotational information, by allowing later-stage optimization of initial conditions alongside contact-aware fitting.The estimated parameters were also used for a tennis ball subsequently thrown by a robot.Source: §6.1 · p. 10
6.2 Throwing
- 28 simulation runs found an exact two-bounce solution (Φ/Φ0 < 10−25), while CMA-ES used 1042 simulations and 2h 15m for an approximate solution (Φ/Φ0 ≈10−6).On a more complex example, L-BFGS reached Φ/Φ0 ≈4 · 10−4 after 319 simulations; CMA-ES returned Φ/Φ0 ≈10−2 after over 8000 simulations.Source: §6.2 · p. 11
- For target-directed throws, optimized initial conditions generated a tennis-ball motion to a wall target after one table bounce, while deformable-ball and bunny examples explored target paths and poses.The examples include multiple contact sequences and a trade-off between forward motion and back-spin when targeting a vertical trajectory.Source: §6.2 · p. 11, Figure 10 · p. 11, Figure 11 · p. 11
6.3 Self-supervised learning of control policies
- Embedding the simulator in the training loss lets a neural network map desired outcomes to simulation parameters, with gradients computed through the simulated trajectory rather than finite differences.For ball throwing, the loss uses a soft minimum over the descending trajectory and penalizes solutions without contact; frictionless training systematically fails to hit targets.Source: §6.3 · p. 12
6.4 Trajectory optimization
- Optimized end-effector trajectories were tested repeatedly on a real UR5, and a mass-spring sheet task found a solution after a few Gauss-Newton iterations.The UR5 trajectory assigns coordinates at each time step; the sheet objectives ask it to flip down at 1 s, then face up and move right at 2 s.Source: §6.4 · p. 12
- Trajectory optimization using full coupled dynamics produced a successful gait for a robot with compliant actuators and soft feet, where an idealized nominal trajectory did not carry over.The simulator was also used to optimize controls for a rigid cube dragged by strings and a coupled cube-and-rubber-band system.Source: Figure 14 · p. 12, §6.4 · p. 13, Figure 15 · p. 13
7 DISCUSSION
The discussion reports that gradient-based optimization outperforms sampling-based methods such as CMA-ES across examples spanning parameter estimation, locomotion, manipulation, and learning-based control. It describes when penalty-based contact is adequate, identifies modeling and real-robot limitations, and concludes that soft normal contact supports differentiable optimization.
7 DISCUSSION
- Penalty-based contact with implicit integration is sufficiently accurate for many examples, while persistent static friction calls for equality constraints.For dynamic motion with short-lived static friction, penalty methods perform adequately; the hybrid approach retains soft normal contact.Source: §7 · p. 13
- Gradient-based optimization greatly outperforms sampling-based methods such as CMA-ES across the authors’ optimization examples.The examples span parameter estimation, robotic locomotion and manipulation, and learning-based control.Source: §7 · p. 13
- The examples assume isotropic Coulomb friction and a readily available, sufficiently smooth distance metric; highly non-convex, high-resolution collision geometry needs more elaborate handling.Anisotropy is relevant to physical systems such as textiles.Source: §7 · p. 13
- Learning-based control is an initial investigation, and real-robot experiments still face alignment, robot-base movement, and hardware-controller latency errors.The authors identify these error sources as requiring further investigation.Source: §7 · p. 13
- Across graphics and robotics applications, soft constraints with linear penalty forces and implicit integration yield physically meaningful, analytically differentiable simulations for inverse problems.Smoother friction can reduce objective-function noise, while equality constraints can address static friction when physical accuracy is key; soft normal contact retains differentiability.Source: §7 · p. 13