Reconciling RaiSim With the Maximum Dissipation Principle

Quentin Le Lidec, Justin CarpentierIEEE Trans. Robotics 2024

Introduction

RaiSim has established itself as a premier simulator for training robust legged robots, primarily due to its speed and stability. However, its efficiency stems from a mathematical shortcut that violates the Maximum Dissipation Principle (MDP)—a fundamental physical law governing friction. This principle dictates that friction should maximize energy dissipation during sliding. By ignoring specific corrective terms to simplify its solver, vanilla RaiSim can produce non-physical "internal forces" and unrealistic energy profiles. This paper presents RaiSim+DS, an algorithmic correction based on the de Saxcé function that restores physical consistency with negligible computational overhead.

The Problem: Friction and the MDP

Accurately modeling contact dynamics—how objects touch, slide, and stick—is a central challenge in robotics. RaiSim utilizes a contact model inspired by MuJoCo, designed to avoid "ghost forces" (forces acting at a distance). To maintain high performance, RaiSim's optimization-based solver omits a corrective term in its friction equations.

This omission leads to a violation of the MDP whenever the "Delassus matrix" (the mapping between contact forces and accelerations) is coupled. In such cases, normal forces and tangential motion become interdependent. Consequently, a sliding object in RaiSim may not have its friction force perfectly aligned against its motion, resulting in parasitic internal forces and slower-than-real energy dissipation.

Methods: The de Saxcé Correction

The authors propose integrating the de Saxcé corrective term into RaiSim's existing solver. This term accounts for the non-linear relationship between the normal and tangential components within the friction cone.

Geometric representation of the friction cone and the de Saxcé corrective term.

Rather than relying on a standard Quadratic Program, the contact problem is framed as a Nonlinear Complementarity Problem (NCP). The correction is embedded directly into RaiSim’s Gauss-Seidel bisection algorithm. By iteratively updating a corrected velocity term during the solver's internal loops, the method achieves physical consistency without requiring a fundamentally different or slower architecture.

Experimental Results

The effectiveness of RaiSim+DS was evaluated across several benchmarks, ranging from simple geometric primitives to complex robotic systems.

Sliding and Dragging Benchmarks

In a sliding cube test, RaiSim+DS perfectly matched analytical energy dissipation curves, whereas the original simulator dissipated energy too slowly. In the "Dragging Cube" experiment—a hyper-static case designed to expose parasitic forces—the correction successfully eliminated the non-physical internal forces present in vanilla RaiSim.

Comparison of RaiSim and RaiSim+DS in a cube dragging experiment.

Quadruped Simulation

When applied to the Solo-12 quadruped—a 12-degree-of-freedom robot—RaiSim+DS reduced the contact complementarity error by several orders of magnitude. This error measures how well the simulation respects physical constraints. Crucially, this improvement came at a minimal cost: the runtime per step increased from approximately 9μs to only 13μs.

Conclusion

RaiSim+DS demonstrates that physical correctness in robotics simulation does not necessitate a trade-off with speed. By re-introducing the de Saxcé correction into the iterative solver loop, researchers can ensure that reinforcement learning agents are trained on physically accurate dynamics. This prevents agents from exploiting "fake" physics, such as unrealistic energy conservation, to achieve their goals. While future work may explore formal convergence proofs, the current implementation offers a robust and "computationally free" path toward more realistic robot simulation.

Summary updated

BibTeX
@article{lidec2024reconciling,
  author = {Quentin Le Lidec and Justin Carpentier},
  title = {{Reconciling RaiSim With the Maximum Dissipation Principle}},
  journal = {IEEE Trans. Robotics},
  year = {2024},
  doi = {10.1109/tro.2024.3430711},
}

Loading related content...

Figure