Abstract
Physical simulators have been widely used in robot planning and control. Among them, differentiable simulators are particularly favored, as they can be incorporated into gradient-based optimization algorithms that are efficient in solving inverse problems such as optimal control and motion planning. Simulating deformable objects is, however, more challenging compared to rigid body dynamics. The underlying physical laws of deformable objects are more complex, and the resulting systems have orders of magnitude more degrees of freedom and therefore they are significantly more computationally expensive to simulate. Computing gradients with respect to physical design or controller parameters is typically even more computationally challenging. In this paper, we propose a real-time, differentiable hybrid Lagrangian-Eulerian physical simulator for deformable objects, ChainQueen, based on the Moving Least Squares Material Point Method (MLS-MPM). MLS-MPM can simulate deformable objects including contact and can be seamlessly incorporated into inference, control and co-design systems. We demonstrate that our simulator achieves high precision in both forward simulation and backward gradient computation. We have successfully employed it in a diverse set of control tasks for soft robots, including problems with nearly 3,000 decision variables.
Introduction
In traditional robotics, simulating rigid parts is relatively straightforward. However, soft robots—made of deformable materials like silicone or biological tissue—present significant challenges for simulators. These systems possess nearly infinite degrees of freedom, and calculating complex interactions such as self-collision or environmental contact is computationally intensive.
A primary goal in robotics is solving inverse problems: determining how to actuate motors to reach a specific target state. To solve these efficiently, a differentiable simulator is required. Differentiability allows for the calculation of gradients—mathematical directions that indicate how to adjust parameters to improve performance. Existing soft-body simulators often suffer from being too slow, lacking differentiability, or relying on "black-box" neural networks that fail to strictly adhere to physical laws.
Methodology
ChainQueen is built upon the Moving Least Squares Material Point Method (MLS-MPM), a hybrid Lagrangian-Eulerian approach. This method combines the strengths of both worlds: it uses particles (Lagrangian) to track material deformation and a background grid (Eulerian) to handle physics calculations like collisions and pressure.
Unlike previous work that relies on memory-heavy automatic differentiation, ChainQueen utilizes analytical differentiability. The authors derived analytical gradients for the entire simulation loop, including the critical transfer of data between particles and the grid. To support soft robotics specifically, the framework includes a custom "actuation stress" model to simulate the contraction or expansion of soft muscles, such as pneumatic or cable-driven actuators.
System Architecture
The core engine of ChainQueen is implemented in C++ and CUDA to leverage GPU acceleration, bypassing the overhead of general-purpose machine learning libraries. While the engine is high-performance, it provides a user-friendly TensorFlow interface for integration into broader machine learning pipelines.
The system maintains a "Memo" of states ($s_i$) across simulation time, allowing for efficient backward passes to compute gradients of the loss function $L$ with respect to initial state parameters $p_0$ and controller parameters $\theta$.
Evaluation and Results
The simulator was validated through a series of accuracy benchmarks and physical experiments:
- Precision: In numerical tests, the relative error for gradients was as low as $10^{-8}$, demonstrating high mathematical fidelity.
- Speed: ChainQueen achieves real-time performance, running at over 2,500 FPS for 8,000 particles. This is approximately 4–9x faster than NVIDIA Flex and up to 132x faster than implementing the same physics directly in standard deep learning frameworks.
- Experimental Validation: The authors compared the simulator's predictions against a physical cross-shaped pneumatic actuator, finding high agreement in bending and bouncing behaviors.
- Optimization Efficiency: In control tasks, ChainQueen's exact gradients allowed it to find a robot's walking gait in just 20 minutes, whereas state-of-the-art Reinforcement Learning (PPO) failed to converge after 4 hours.
Discussion
A key insight from this work is the superiority of gradient-based optimization over model-free reinforcement learning for these complex tasks. Because ChainQueen provides stable gradients even over 1,000 simulation steps, it enables co-design capability. Researchers can simultaneously optimize a robot's geometry (e.g., varying stiffness across a joint) and its controller. For example, the simulator automatically discovered a non-uniform stiffness distribution for a robotic arm that reduced energy costs by 4.5%.
Conclusion
While ChainQueen represents a significant step forward, it currently uses explicit time integration, which can become unstable for very stiff materials without extremely small time steps. Future work will focus on better integrating rigid-soft coupling and expanding the material scope beyond elastic soft materials. Nonetheless, ChainQueen provides a powerful, real-time tool for the design and control of the next generation of soft robots.
Summary updated