Differentiable Contact Dynamics for Legged Locomotion: Policy Learning and Contact-Implicit Trajectory Optimization
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
| Term | Weight | Term | Weight |
|---|---|---|---|
| Base | Joints | ||
| Position, | Position | ||
| Height | Hip-roll position | ||
| Orientation, roll–pitch | Velocity | ||
| Orientation, yaw | Feet | ||
| Linear velocity, | Position, |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| optimizer / learning rate | AdamP / |
| discount / GAE | 0.99 / 0.95 |
| clip | 0.2 |
| epochs / minibatches per update | 10 / 2 |
| value / entropy coefficient | 0.5 / 0.01 |
| gradient-norm clip | 0.5 |
| action std (init / bounds) | 1.0 / |
Differentiable Physics
Differentiable physics makes physical simulators usable for gradient-based learning, parameter estimation, design, and control.
See all 66 papers