Elastic Locomotion with Mixed Second-order Differentiation
Siyuan Shen, Tianjia Shao, Kun Zhou, Chenfanfu Jiang, Sheldon Andrews, Victor Zordan, Yin Yang
TL;DR
The paper addresses the difficulty of animating high-resolution soft bodies under complex contact by formulating elastic locomotion as an inverse simulation that solves for muscle activations to meet high-level targets. It introduces a mixed differentiation framework (CSFD-AD) that combines reverse automatic differentiation with complex-step finite differences to efficiently compute first- and second-order derivatives (the Hessian) of a barrier-based loss, enabling robust Newton-based optimization. An interior-point barrier approach handles wide-area contacts, enabling stable, high-dimensional optimization that outperforms gradient-based and LCP-based methods on diverse tasks. The results validate the method across crawling, jumping, walking, and rolling scenarios, demonstrating strong convergence, scalability to many contact points, and broad applicability to differentiable simulation of soft-body locomotion.
Abstract
We present a framework of elastic locomotion, which allows users to enliven an elastic body to produce interesting locomotion by prescribing its high-level kinematics. We formulate this problem as an inverse simulation problem and seek the optimal muscle activations to drive the body to complete the desired actions. We employ the interior-point method to model wide-area contacts between the body and the environment with logarithmic barrier penalties. The core of our framework is a mixed second-order differentiation algorithm. By combining both analytic differentiation and numerical differentiation modalities, a general-purpose second-order differentiation scheme is made possible. Specifically, we augment complex-step finite difference (CSFD) with reverse automatic differentiation (AD). We treat AD as a generic function, mapping a computing procedure to its derivative w.r.t. output loss, and promote CSFD along the AD computation. To this end, we carefully implement all the arithmetics used in elastic locomotion, from elementary functions to linear algebra and matrix operation for CSFD promotion. With this novel differentiation tool, elastic locomotion can directly exploit Newton's method and use its strong second-order convergence to find the needed activations at muscle fibers. This is not possible with existing first-order inverse or differentiable simulation techniques. We showcase a wide range of interesting locomotions of soft bodies and creatures to validate our method.
