vix.ing · top · new · best · stats · spec

Differentiable Simulation of Hard Contacts with Soft Gradients for Learning and Control

2025/06/17 by Anselm Paulus, A. René Geist, Paulus, Anselm +8 · 2 citations
Engineering · Materials Science · #Advanced machining processes and optimization #Diamond and Carbon-based Materials Research #FOS: Computer and information sciences #FOS: Electrical engineering #G.1.6 #I.2.6 #I.2.9 #I.6.4 #Machine Learning (cs.LG) #Robotics (cs.RO) #Systems and Control (eess.SY) #Tribology and Wear Analysis #electronic engineering #information engineering

paper · pdf · doi:10.48550/arxiv.2506.14186

openalex publication_date 2025/06/17 · openalex created_date 2025/10/18 · openalex updated_date 2026/07/30

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 pass, we obtain informative pre-contact gradients while retaining physical realism.

Cited by

Related