解决硬接触模拟中梯度失真问题,提升机器人学习与控制的仿真精度。
Differentiable Simulation of Hard Contacts with Soft Gradients for Learning and Control
- 用自适应时间积分改进惩罚型模拟,提升梯度准确性。
- 提出接触距离法(CFD),在反向传播中保留接触前梯度。
- 适合需要精准梯度的机器人控制与强化学习任务。
接触力使机器人动力学产生不连续性,严重限制了基于梯度优化的仿真器使用。基于罚函数的模拟器(如MuJoCo)通过软化接触求解以支持梯度计算,但真实模拟硬接触需使用高刚度求解器,导致自动微分下梯度错误;而采用低刚度设置则显著增大仿真到现实的差距。本文分析罚函数模拟器在硬接触下的梯度退化原因,并提出DiffMJX,将自适应时间积分与罚函数模拟结合,大幅提高梯度精度。另一挑战是物体分离时接触梯度消失。为此,我们引入接触从距离(CFD),将罚函数模拟与直通估计结合,仅在反向传播中应用CFD,从而获得有意义的接触前梯度,同时保持物理真实性。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。