Source-linked AI summary

ChainQueen: A Real-Time Differentiable Physical Simulator for Soft Robotics

Yuanming Hu, Jiancheng Liu, Andrew Spielberg, Joshua B. Tenenbaum, William T. Freeman, Jiajun Wu, Daniela Rus, Wojciech Matusik

arXiv:1810.01054v1cs.ROcs.AIcs.GRcs.LG

TL;DR

Deformable-object simulators remain difficult to use for inverse problems because simulation and gradient computation are computationally challenging, especially with contact. ChainQueen addresses this gap with a real-time, differentiable hybrid Lagrangian-Eulerian simulator based on MLS-MPM. It achieves high precision in forward simulation and backward gradient computation and supports inference, control, and co-design tasks for soft robotics.

  • Problem

    Deformable-object simulation and gradient computation are computationally challenging because of complex physics, many degrees of freedom, and contact.

  • Method

    ChainQueen differentiates a hybrid Lagrangian-Eulerian MLS-MPM simulator with respect to simulation state and model parameters.

  • Results

    Numerical and experimental validation suggest high precision in forward simulation and backward gradient computation, with applications across diverse soft-robotics inverse problems.

  • Takeaways & Limitations

    Quickly computable gradients support gradient-based optimization for soft-robot control, system identification, and physical design.

Abstract

from arXiv · show

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.

I. INTRODUCTION

ChainQueen addresses the computational and differentiation challenges of simulating deformable objects by differentiating MLS-MPM in a real-time hybrid simulator. The system supports accurate simulation and gradient-based inference, control, and co-design for soft robotics.

  • I. INTRODUCTION: Deformable-object simulation is slow and difficult to differentiate because of high DoFs, changing geometries, self-collisions, and contact.These challenges limit existing soft-object simulators for inverse problems such as optimal control and motion planning.
  • I. INTRODUCTION: ChainQueen introduces a real-time, fully differentiable deformable-object simulator based on the Moving Least Squares Material Point Method.It differentiates the simulator with respect to both state and model parameters.
  • I. INTRODUCTION: MLS-MPM combines particle and grid-node representations, while moving least squares force discretization accelerates and simplifies traditional MPM.MPM naturally supports large deformation and self-collision, and its smooth potential energy makes the system differentiable.
  • I. INTRODUCTION: ChainQueen achieves 4 −9× higher speed than the current state-of-the-art while maintaining high precision in forward simulation and backward gradient computation.The simulator focuses on elastic materials for soft robotics and uses GPU-efficient forward and backward computation.
  • I. INTRODUCTION: Gradients enable optimization-based controller design, trajectory optimization, physical-property inference, and co-design of robot geometry, materials, and control.The paper also provides high-level Python interfaces intended to make soft-robotics development accessible without requiring low-level implementation knowledge.

B. Differentiable Simulation and Control

The paper differentiates MLS-MPM for deformable-object simulation, extending differentiable simulation toward soft-robotics control and design optimization. Its hybrid particle-grid cycle supports forward dynamics, back-propagation, contact handling, and GPU execution.

  • Background: Differentiable simulators for deformable objects remain less studied than differentiable rigid-body simulators.ChainQueen differentiates a physically founded MLS-MPM discretization rather than approximating physics with neural networks.
  • Forward simulation: MLS-MPM alternates particle-to-grid transfer, grid operations, and grid-to-particle transfer using particles and grid nodes.Particles transfer mass, momentum, and stress-contributed impulse; grid velocity is computed; particles then gather updated quantities.
  • Differentiable control: A controller is embedded in P2G to generate actuation from particle configurations during each MLS-MPM time step.The same differentiable simulation framework supports gradient-based optimization of controller and physical-design parameters.
  • Back-propagation: ChainQueen computes gradients through backward P2G, grid operations, and backward G2P, then applies the chain rule across time steps.The implementation uses analytically derived gradients and supports gradients with respect to the entire simulation.
  • Implementation: The optimized CUDA implementation targets GPU parallelism, while a TensorFlow reference implementation provides an additional interface.The CUDA solver is explicitly optimized for parallelism and locality; the TensorFlow version incurs runtime overhead.

IV. EVALUATION

The evaluation studies ChainQueen’s efficiency and accuracy comprehensively in both two-dimensional and three-dimensional settings.

  • IV. EVALUATION: The evaluation covers both efficiency and accuracy of ChainQueen.

A. Efficiency

The efficiency study benchmarks ChainQueen against Flex using a reproducible falling-cube setup and compares optimized CUDA with TensorFlow execution. ChainQueen’s CUDA implementation is faster than Flex, while TensorFlow is slowed by runtime overhead.

  • Benchmark setup: The falling-cube benchmark uses simple geometry to support easy analysis and reproducibility.
  • CUDA versus Flex: ChainQueen’s CUDA simulator provides higher speed than Flex at the same number of particles.The benchmark uses matched material behavior and substepping settings for comparison.
  • Implementation comparison: The TensorFlow implementation is much slower because of excessive runtime overheads.

B. Accuracy

ChainQueen is evaluated for forward simulation and backward-gradient accuracy using analytic, numerical, and experimental tests. The experiments also examine long-term gradient stability and physical-system inference.

  • Validation: Five test cases evaluate forward simulation and backward-gradient accuracy across analytic, numerical, and experimental settings.The cases include colliding 3D dynamics, colliding billiards, and a finger controller.
  • Validation: The accuracy section combines benchmark tables with experimental comparisons to assess both simulation fidelity and gradient precision.Table III reports relative errors, while the pneumatic-leg experiment compares observed and simulated motion.
  • Experimental validation: The pneumatic actuator was dropped from 15 cm, and its dynamic motion was compared with simulation.This comparison is reported as an experimental validation of the simulator.
  • Gradient stability: Gradients remain stable over long horizons of up to 1000 time steps.The passage reports this stability alongside high simulator performance and accuracy.
  • Physical inference: Relative-density inference estimates ball A’s density as 2.26, producing the momentum needed to push ball B to destination C.The inference uses gradient-based optimization from observed motion.

B. Control

ChainQueen uses differentiable simulation to optimize soft-robot controllers and physical designs through gradient-based methods. Demonstrations span locomotion, a finger task, a quadrupedal runner, and co-design of a robotic arm.

  • Controller optimization: The controller generates actuation for up to 16 actuators from state vector z using a = tanh(Wz + b), with gradient descent over W and b.The state includes target position, center-of-mass position, and velocity of each soft component.
  • Control tasks: The 2D walker objective is maximum distance after 600 simulation steps, optimized through gradient descent over four vertically actuated components.Each actuator can stretch or compress in the vertical direction.
  • Control tasks: Gradient-based optimizers compute desired controllers for soft runners, crawlers, a robotic arm, and other tasks within tens or hundreds of iterations.The experiments include 2D biped and finger tasks plus a 3D quadrupedal runner.
  • Comparison with PPO: The ChainQueen controller for the 2D walker functioned well within 20 minutes, while PPO still chose nearly-random actions after over 4 hours.The comparison concerns a soft locomotion task and uses PPO as a model-free baseline.
  • Co-design: Co-design jointly optimizes timestep-wise actuation and time-invariant Young’s modulus for a deformable multi-link arm.The arm has two links and two joints, with two side-by-side actuators at each joint.
  • Co-design: The co-designed arm alone fully converges to the target, with actuation cost 95.5% that of the fixed 100% initial-Young’s-modulus arm.The optimized stiffness is lower outside the bend and higher inside, promoting more bending to the left.

VI. DISCUSSION

ChainQueen is presented as a differentiable soft-robotics simulator deployed for inference, control, and co-design. The discussion highlights co-design benefits and identifies coupling with rigid-body simulation as future work for stiff or nearly rigid objects.

  • ChainQueen was demonstrated for inference, control, and co-design in soft robotics.
  • Co-design completes the arm reaching task, whereas fixed arm designs make progress but do not complete it.
  • Co-design also achieves lower actuation cost than fixed arm designs in the arm reaching task.
  • Coupling soft-object simulation with rigid-body simulation is identified as an interesting future direction.
  • For very stiff materials such as rigid bodies, explicit time integration permits only a very restrictive Δt.

Supplemental Document

The supplemental document describes ChainQueen’s differentiable MLS-MPM formulation, its variable dependencies, and a three-stage reversed computation for back-propagation.

  • The supplemental document discusses detailed backward gradient computation for differentiable MLS-MPM in ChainQueen.
  • The formulation assumes fixed particle mass and volume, with a hyperelastic constitutive model specified by potential energy or material parameters.
  • The supplemental document includes a notation table for MLS-MPM variables.
  • MLS-MPM time stepping is presented through forward variable dependencies and reversed dependencies for back-propagation.
  • Back-propagation reverses forward simulation through backward particle-to-grid, grid operations, and backward grid-to-particle steps.

VIII. BACKWARD PARTICLE TO GRID (P2G)

The backward particle-to-grid derivation accounts for gradient contributions from variables at the next time step.

  • Backward particle-to-grid gradients include contributions from ∂L/∂v_n^p and ∂L/∂C_n^p at the next time step.

XI. FRICTION PROJECTION GRADIENTS

The friction projection section addresses gradients when boundary conditions are present, including a velocity projection expression.

  • Boundary conditions introduce a friction-projection operation for grid velocity gradients.
  • The section includes a projection expression using the tangential velocity component and a max term involving the normal component.
Loading 1810.01054v1…