Differentiable Contact Modeling for Robot Planning

152 concepts94 papers1 proposal

When a robot strikes a surface, grabs an object, or walks across a floor, the underlying physics changes instantaneously. In classical rigid-body mechanics, contact is treated as a discrete event governed by hard, non-penetration constraints. Mathematically, this introduces discontinuities: a force is exactly zero until the moment of impact, where it instantly spikes.

For gradient-based optimization algorithms—which power trajectory optimization, model predictive control (MPC), and reinforcement learning—these discontinuities are catastrophic. If an optimizer calculates a gradient on a trajectory where a robot hand misses an object by a millimeter, the gradient provides zero information about how to adjust the movement to make contact. The optimization landscape resembles a flat plain surrounded by vertical walls.

To solve this, researchers have developed differentiable contact modeling. The core intuition is to replace the jagged, step-like nature of rigid-body collisions with smooth, continuous mathematical approximations. By transforming discrete boundaries into continuous gradients, optimizers can "feel" the effects of a contact before it physically occurs, turning a blind search problem into a well-behaved optimization task.


Softening Constraints via Penalty and Barrier Methods

The most direct way to make contact physics differentiable is to replace hard non-penetration constraints with continuous force fields. Instead of forbidding two objects from overlapping, penalty methods allow a small amount of virtual interpenetration, treating the contact interface as a highly stiff spring-damper system.

As explored by Michael Neunert et al. in Trajectory Optimization Through Contacts and Automatic Gait Discovery for Quadrupeds, modeling environmental interactions as non-linear spring-dampers allows trajectory optimizers to navigate the discontinuities of making and breaking contact. Because the forces vary continuously with distance, the optimizer receives a steady stream of gradient information that guides the robot toward beneficial interactions, such as discovering complex quadrupedal gaits without pre-programmed contact sequences.

Alternatively, barrier methods approach the problem from the outside. Instead of allowing penetration, they introduce a potential energy function that approaches infinity as the distance between two surfaces drops to zero. Yuki Shirai et al. demonstrate this in Is Linear Feedback on Smoothed Dynamics Sufficient for Stabilizing Contact-Rich Plans?, where log-barrier contact smoothing replaces discontinuous forces with a differentiable proxy. This formulation creates a continuous "force-at-a-distance" effect, smoothing out the optimization landscape so standard numerical solvers can converge on viable paths.

Taking this concept to its logical conclusion, Nico Gürtler introduces the Soft-minimum Contact Model (SCM) in A Smooth Analytical Formulation of Collision Detection and Rigid Body Dynamics With Contact. Rather than identifying isolated contact points, this method models contact as a continuous force field distributed across the intersection volume of two geometries. By introducing small, non-physical forces that act right before objects touch, the system ensures that the contact dynamics are entirely analytical and twice-differentiable, opening the door for highly efficient second-order optimization techniques.


Geometric Smoothness through Distance Fields and Rounded Primitives

Softening the force equations is only half the battle; the underlying geometric representations of the robot and its environment must also yield continuous derivatives. If a robot's geometry contains sharp edges or faceted mesh triangles, the contact points and surface normals will jump discontinuously as the robot slides along a surface.

To achieve geometric differentiability, researchers frequently leverage Signed Distance Fields (SDFs). An SDF maps any spatial coordinate to its minimum distance to a surface, providing a continuous gradient field that points directly away from the obstacle. In Regularized Deep Signed Distance Fields for Reactive Motion Generation, Puze Liu et al. show that maintaining strict smoothness in these distance fields is vital for reactive control. Any noise or jitter in the distance gradients translates directly into erratic motor commands; a regularized, smooth gradient allows a robot to begin decelerating early and predictably.

Hard Mesh Contact:
[Robot Shape] ---> (Sharp Edge) ---> Discontinuous Normal Jump!

Smoothed Primitive / SDF Contact:
[Robot Shape] ---> (Rounded Capsule / Smooth Gradient Field) ---> Continuous Derivative Flow

Another powerful geometric strategy is to represent the robot's structure using rounded geometric primitives, such as capsules or rounded segments. In Scaling Whole-body Multi-contact Manipulation with Contact Optimization, Victor Levé et al. utilize these rounded primitives to derive closed-form, differentiable proximity functions. Because the primitives lack sharp corners, the planner can smoothly slide contact points along the robot's limbs during whole-body manipulation tasks without encountering mathematical spikes or optimization stalls.


Stochastic and Randomized Smoothing

An entirely different perspective on the discontinuity problem bypasses analytical smoothing altogether, opting instead for probabilistic or randomized smoothing. Rather than changing the physics equations themselves, these methods inject noise into the system and optimize for the expected behavior across a distribution of rollouts.

This approach traces back to foundational reinforcement learning concepts. As shown by Sergey Levine et al. in Learning Neural Network Policies with Guided Policy Search under Unknown Dynamics, fitting local linear models to multiple stochastic rollouts effectively averages the dynamics across contact points. This mathematical expectation smooths out the jagged physical interactions, creating a continuous approximation that is far easier for first-order optimizers to navigate than exact analytical models.

Modern implementations apply this concept directly to collision detection pipelines. In Differentiable Collision Detection: a Randomized Smoothing Approach, Louis Montaut et al. incorporate smoothed curvature into first-order derivative estimators. By evaluating randomized perturbations of non-smooth objects, the estimator can "see" an underlying, averaged curvature. This prevents optimization algorithms from getting trapped in local minima caused by discrete mesh facets, achieving several orders of magnitude lower terminal error in contact-pose optimization.

Similarly, in Diff-LfD: Contact-aware Model-based Learning from Visual Demonstration for Robotic Manipulation via Differentiable Physics-based Simulation and Rendering, Xinghao Zhu et al. inject Gaussian noise directly into a physics simulation to compute gradient expectations. This stochastic smoothing transforms a highly discontinuous loss landscape into a differentiable surface, enabling standard gradient descent to successfully plan intricate, contact-rich maneuvers like finger-gaiting from visual demonstrations.


Smoothing Friction and Transitions

Beyond normal forces (collisions), tangential forces (friction) introduce their own mathematical hurdles. Coulomb friction is inherently non-smooth: it features a sharp, non-differentiable transition between "sticking" (where static friction matches the applied force exactly) and "sliding" (where kinetic friction caps the force at a constant threshold).

To integrate friction into gradient-based frameworks, researchers approximate these transitions using continuously differentiable functions. For instance, Chao Chen et al. in Practical Prescribed Tracking Control of n-DOF Robotic Manipulator with Uncertainties via Friction Compensation Approach employ smooth, continuously differentiable friction models to capture Stribeck, Coulomb, and viscous friction phenomena. By replacing the discontinuous signum function with smooth approximations like the hyperbolic tangent or arctan, they eliminate control instabilities and simplify the integration of friction compensation into unified kinematic frameworks.


The Fundamental Tension of Contact Smoothing

While smoothing contact dynamics makes gradient-based optimization possible, it introduces a critical trade-off: optimization tractability versus physical realism.

If a simulator is regularized too aggressively, it creates non-physical artifacts. For example, a robot might appear to magically "pull" an object from a distance, or float slightly above the ground due to premature force activation. Conversely, if the smoothing parameters are tuned to be too sharp in an effort to preserve high fidelity, the gradients become steep and localized, causing optimization algorithms to stall or fail entirely.

High Smoothing:
Landscape: Smooth, wide hill (Easy to optimize)
Physics: Unrealistic "force-at-a-distance" artifacts

Low Smoothing:
Landscape: Steep, jagged cliff (Hard to optimize)
Physics: Highly realistic rigid-body behavior

This tension is explicitly highlighted by the authors of Is Linear Feedback on Smoothed Dynamics Sufficient for Stabilizing Contact-Rich Plans?, who note that excessive smoothing degrades the accuracy of downstream linear feedback controllers (like LQR) by introducing non-physical artifacts into the linearized models.

To exploit this trade-off effectively, modern frameworks often use smoothed physics intentionally as a "teacher." In PWM: Policy Learning with Multi-Task World Models, Ignat Georgiev et al. regularize a predictive world model to be smoother than real-world physics. By prioritizing a well-behaved, continuous optimization landscape over absolute physical accuracy during the planning phase, the framework enables rapid, stable gradient updates that ultimately produce high-performing policies capable of operating in the real world.

Key Foundational Work

Learning Neural Network Policies with Guided Policy Search under Unknown Dynamics (2014) — contributed 2 concept elements to this direction.
Trajectory Optimization Through Contacts and Automatic Gait Discovery for Quadrupeds (2016) — contributed 1 concept elements to this direction.
History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 90 papers
  2. Version 1 · 2026-10-04 · 117 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_differentiable_contact_modeling_cd23ae2e,
  title = {differentiable contact modeling},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/differentiable-contact-modeling/rdr_cd23ae2e14cf44f594ce7a5474dd9962},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-19},
}

This exact version (version 2, frozen text):

@misc{lacuna_differentiable_contact_modeling_cd23ae2e_v2,
  title = {differentiable contact modeling},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/differentiable-contact-modeling/rdr_cd23ae2e14cf44f594ce7a5474dd9962/v/2},
  note = {Version 2, frozen 2026-10-04. Accessed 2026-11-19},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake