KAIST
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.
Analytic contact sensitivity via relaxed de Saxcé‑corrected conic complementarity
Under hard contact, the exact sensitivity holds the contact mode fixed and gives first-order methods no direction toward a neighboring mode. The proposed sensitivity relaxes the complete de Saxcé-corrected frictional contact law, λ̃ ∘ σ̃ = 0, along its central path, λ̃ ∘ σ̃ = ρe, in the backward pass only. It provides directions toward separation, sliding, and clamping in every contact mode, so policy learning and trajectory optimization can change contact modes through gradient-based updates.
The exact sensitivity is evaluated at the hard-contact solution, which lies on a cone boundary set by the contact mode, so it holds that mode fixed; for example, dσ = 0 for a clamped contact and dλ = 0 for a separating one. The proposed sensitivity is evaluated instead at a relaxed pair inside both cones, found by a Newton iteration from the hard-contact solution.
In this single-contact example, increasing the free normal velocity bN moves the contact from clamping through sliding to separating. The exact sensitivity jumps at each mode boundary and contains zero components from differentiating with the mode held fixed, whereas the proposed sensitivity is continuous across these transitions.
The forward pass determines the realized transition with the hard-contact solve, and the relaxation is applied only to the backward contact sensitivity. The proposed sensitivity replaces the exact one in the transition Jacobians, fx = ∂f/∂xt + (∂f/∂λ)(∂λ/∂xt) and likewise fu, which enter the BPTT recursion for policy learning and the DDP backward pass for trajectory optimization.
Each policy is trained by BPTT with the proposed gradient in a single simulation environment and deployed on the 45-kg quadruped without fine-tuning. On a desktop PC, the trotting and pacing policies are trained on 100,000 samples in 108 s, and the low-friction gait-free policy on 160,000 samples in 172 s.
On the trot command-tracking task, BPTT with the proposed gradient learns the trot with one environment (about 105 samples, 1.8 min). PPO with 8 to 32 environments does not track the commanded velocities, PPO with 64 does not learn the trot, and trotting first emerges with 128 (about 107 samples, 17.7 min).
PPO with 8, 16, or 32 environments does not track commanded velocities, and PPO with 64 environments does not learn the trot. The onset of trotting occurs at 128 environments.
A single environment is sufficient for BPTT with the proposed gradient to learn the trot.
From the nominal standing pose, CITO reaches a reference base pose without prescribed contact modes or foothold locations. The proposed gradient attains the lowest costs in translation, yaw, and pitch because it provides search directions toward separation, sliding, and clamping in every contact mode.
All four feet remain clamped, and the base twists relative to the fixed feet.
The feet separate or slide, but the front-right foot reclamps, preventing further repositioning.
All four feet remain clamped, and the pitch stays below the reference.
The base pivots about the clamped front-right foot, retaining leg twist.
The rear-right foot remains partially relocated, leaving the joints displaced.
The forward–backward base and pitch excursions are large.
The feet are repositioned as the body turns, avoiding residual leg twist.
All four feet are repositioned as the base moves toward the reference.
The front feet are adjusted for balance, reducing the base and pitch excursions.
CI-MPC at 40 Hz holds a standing pose while 1-s pulls, absent from its prediction model, act on the base. Averaged over eight directions, the proposed gradient withstands pulls up to 272 N, against 81 N (No Relaxation) and 107 N (Signorini‑Relaxed), because the planned feet leave clamping and slide or step with the base: their impulses oppose the pull, and the new footholds extend support.
The front feet remain clamped, and the base tips forward.
The right feet remain clamped, and the base tips to the right.
The rear feet remain clamped, and the base tips backward.
The front feet remain clamped, and the base tips forward.
The right feet remain clamped too long, and the base tips over to the right.
The rear feet remain clamped, and the base tips backward.
The front feet slide forward with the pull and keep the robot balanced.
The right feet slide and step sideways with the pull and keep the robot balanced.
The rear feet slide backward with the pull and keep the robot balanced.
@misc{kim2026differentiablecontactdynamicslegged,
title={Differentiable Contact Dynamics for Legged Locomotion: Policy Learning and Contact-Implicit Trajectory Optimization},
author={Gijeong Kim and Seungbin Oh and Dongyun Kang and Hae-Won Park},
year={2026},
eprint={2610.35852},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2610.35852},
}