We present a fast and feature-complete differentiable physics engine, Nimble (nimblephysics.org), that supports Lagrangian dynamics and hard contact constraints for articulated rigid body simulation. Our differentiable physics engine offers a complete set of features that are typically only available in non-differentiable physics simulators commonly used by robotics applications. We solve contact constraints precisely using linear complementarity problems (LCPs). We present efficient and novel analytical gradients through the LCP formulation of inelastic contact that exploit the sparsity of the LCP solution. We support complex contact geometry, and gradients approximating continuous-time elastic collision. We also introduce a novel method to compute complementarity-aware gradients that help downstream optimization tasks avoid stalling in saddle points. We show that an implementation of this combination in an existing physics engine (DART) is capable of a 87x single-core speedup over finite-differencing in computing analytical Jacobians for a single timestep, while preserving all the expressiveness of original DART.
翻译:我们展示了一个快速和功能完整的不同物理学引擎,Nimble(nimblephysics.org),它支持Lagrangian动态和硬接触限制,以进行清晰的僵硬体模拟。我们不同的物理学引擎提供了一套完整的特征,通常只有机器人应用中常用的无差异的物理模拟器才能提供这些特征。我们用线性互补问题(LCPs)来解决接触限制问题。我们通过利用LCP溶液的广度进行无弹性接触的LCP配方,展示了高效和新颖的分析梯度。我们支持复杂的接触几何和梯度相近的连续弹性碰撞。我们还采用了一种新颖的方法来计算补充性认知度梯度,帮助下游优化任务避免在马鞍上拖延。我们表明,在现有的物理学引擎(DART)中应用这种组合可以使计算分析Jacobian的微变速率达到87x单核心加速度,同时保持原DART的所有明确度。