Differentiable Simulation of Soft Robots with Frictional Contacts
Etienne Ménager, Louis Montaut, Quentin Le Lidec, Justin Carpentier
TL;DR
This work tackles differentiable simulation for soft robots in contact-rich environments by integrating FEM with a nonlinear complementarity problem for frictional contact and differentiable collision detection. The authors develop an end-to-end differentiable pipeline using implicit differentiation to compute gradients through continuum mechanics, collision resolution, and contact forces, enabling gradient-based control, design, and model reduction in soft robotics. Key contributions include differentiable collision detection for deformables, NCP derivative computation, and a method to chain these derivatives with FEM to obtain end-to-end gradients, demonstrated on parameter identification and inverse dynamics tasks. The approach advances the ability to optimize soft-robot systems in the presence of contact and friction, with open-source code planned for broader adoption.
Abstract
In recent years, soft robotics simulators have evolved to offer various functionalities, including the simulation of different material types (e.g., elastic, hyper-elastic) and actuation methods (e.g., pneumatic, cable-driven, servomotor). These simulators also provide tools for various tasks, such as calibration, design, and control. However, efficiently and accurately computing derivatives within these simulators remains a challenge, particularly in the presence of physical contact interactions. Incorporating these derivatives can, for instance, significantly improve the convergence speed of control methods like reinforcement learning and trajectory optimization, enable gradient-based techniques for design, or facilitate end-to-end machine-learning approaches for model reduction. This paper addresses these challenges by introducing a unified method for computing the derivatives of mechanical equations within the finite element method framework, including contact interactions modeled as a nonlinear complementarity problem. The proposed approach handles both collision and friction phases, accounts for their nonsmooth dynamics, and leverages the sparsity introduced by mesh-based models. Its effectiveness is demonstrated through several examples of controlling and calibrating soft systems.
