cs.ROOct 26, 2026

Differentiable Contact Dynamics for Legged Locomotion: Policy Learning and Contact-Implicit Trajectory Optimization

Authors: Gijeong Kim, Seungbin Oh, Dongyun Kang, Hae-Won Park

Organizations: The authors are with the Department of Mechanical Engineering, Korea Advanced Institute of Science and Technology, Daejeon 34141, South Korea.

Abstract

This paper proposes a smooth analytic gradient for frictional contact and applies it to policy learning and contact-implicit trajectory optimization for legged locomotion. The exact contact sensitivity is available in closed form but describes changes within the current contact mode, providing no first-order information toward neighboring contact modes. The proposed gradient replaces this sensitivity only in the backward pass, leaving the hard-contact forward solve unchanged and the realized rollout feasible. A central-path relaxation of the de Saxcé-corrected second-order-cone complementarity problem for Coulomb friction smooths the conditions defining the separating, clamping, and sliding modes. The relaxed sensitivity is evaluated at a point on the central path obtained by a Newton iteration initialized from the hard-contact solution. The sensitivity remains continuous through contact-mode transitions and converges to the exact sensitivity as the relaxation vanishes. Using 100,000 samples and less than 2 min of training on a desktop PC, policy learning with the proposed gradient produces a policy that transfers to hardware without fine-tuning. On hardware, the robot under a trotting policy withstands pushes and traverses debris and slippery ground. In trajectory optimization, the proposed gradient reaches contact-rich solutions missed by exact and Signorini-relaxed gradients. Project page: https://diffcontact.github.io

Figures & tables

Appendix figures & tables1 asset

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Bundled Contact Gradients: Stabilizing Differentiable Simulation for Deployable Dynamic Tasks

    Sep 25, 2026Dyuman Aditya, Jin Cheng, Clemens Schwarke +4Robotics SimulationDifferentiable Physics

  2. LEAP: Gradient Flow Augmented Lagrangian Trajectory Optimization for Contact Constrained Robots

    Oct 14, 2026César E. Ramos Chuquiure, Ryan Tsai, Yutong Zhou +8Hypergradient OptimizationTrajectory Optimization

  3. Ostrich: Taking Large Strides Through Stiff Contact in Differentiable Dynamics

    Sep 8, 2026Aleš Kučera, Karel ZimmermannTrajectory OptimizationContact-Rich Manipulation