[2506.14186] Differentiable Simulation of Hard Contacts with Soft Gradients for Learning and Control
About this article
Abstract page for arXiv paper 2506.14186: Differentiable Simulation of Hard Contacts with Soft Gradients for Learning and Control
Computer Science > Robotics arXiv:2506.14186 (cs) [Submitted on 17 Jun 2025 (v1), last revised 23 Mar 2026 (this version, v2)] Title:Differentiable Simulation of Hard Contacts with Soft Gradients for Learning and Control Authors:Anselm Paulus, A. René Geist, Pierre Schumacher, Vít Musil, Simon Rappenecker, Georg Martius View a PDF of the paper titled Differentiable Simulation of Hard Contacts with Soft Gradients for Learning and Control, by Anselm Paulus and 5 other authors View PDF HTML (experimental) Abstract:Contact forces introduce discontinuities into robot dynamics that severely limit the use of simulators for gradient-based optimization. Penalty-based simulators such as MuJoCo, soften contact resolution to enable gradient computation. However, realistically simulating hard contacts requires stiff solver settings, which leads to incorrect simulator gradients when using automatic differentiation. Contrarily, using non-stiff settings strongly increases the sim-to-real gap. We analyze penalty-based simulators to pinpoint why gradients degrade under hard contacts. Building on these insights, we propose DiffMJX, which couples adaptive time integration with penalty-based simulation to substantially improve gradient accuracy. A second challenge is that contact gradients vanish when bodies separate. To address this, we introduce contacts from distance (CFD) which combines penalty-based simulation with straight-through estimation. By applying CFD exclusively in the backward p...