Abstract
Simulating rigid-body dynamics with contact in a fast, massively vectorizable, and smoothly differentiable manner is highly desirable in robotics. An important bottleneck faced by existing differentiable simulation frameworks is contact manifold generation: representing the volume of intersection between two colliding geometries via a discrete set of properly distributed contact points. A major factor contributing to this bottleneck is that the related routines of commonly used robotics simulators were not designed with vectorization and differentiability as a primary concern, and thus rely on logic and control flow that hinder these goals. We instead propose a framework designed from the ground up with these goals in mind, by trying to strike a middle ground between: i) convex primitive based approaches used by common robotics simulators (efficient but not differentiable), and ii) mollified vertex-face and edge-edge unsigned distance-based approaches used by barrier methods (differentiable but inefficient). Concretely, we propose: i) a representative set of smooth analytical signed distance primitives to implement vertex-face collisions, and ii) a novel differentiable edge-edge collision routine that can provide signed distances and signed contact normals. The proposed framework is evaluated via a set of didactic experiments and benchmarked against the collision detection routine of the well-established Mujoco XLA framework, where we observe a significant speedup.
Introduction
Simulating rigid-body dynamics with contact is a major bottleneck for differentiable robotics simulators. Traditional collision detection algorithms, such as GJK+EPA, rely on complex branching logic and iterative solvers that hinder GPU vectorization and produce discontinuous gradients. This paper introduces a novel framework designed for high-performance, smoothly differentiable contact manifold generation. By combining smooth Signed Distance Field (SDF) primitives with an analytical active-set method for edge-edge collisions, the proposed approach achieves significant speedups over existing differentiable simulators like MuJoCo XLA while maintaining a well-behaved optimization landscape.
Methodology
The framework reconstructs the contact manifold generation pipeline to eliminate branching and iterative bottlenecks.
Dual Representation and Vertex-SDF Contacts
Objects are represented using a dual Mesh and SDF approach. The SDF is constructed from analytical primitives, such as superquadrics and convex polyhedra, which are fused using smooth operators. Vertex-Face (V-F) collisions are simplified into Vertex-SDF checks, where mesh vertices from one object are evaluated against the smooth SDF of another.
Analytical Edge-Edge (E-E) Collisions
Edge-Edge collisions are formulated as small Quadratic Programs (QPs). Rather than using standard iterative solvers, which cause thread divergence on GPUs, the authors derive a branchless, analytical active-set method. This allows for single-shot solutions across massive batches of potential collisions.
Smoothing and Vectorization
To ensure differentiability and efficient GPU execution, hard logic gates and discrete selections (e.g., top-K deepest contacts) are replaced with smooth mathematical approximations like sigmoids and soft top-K operators. This creates a continuous landscape suitable for gradient-based optimization.
Experimental Evaluation
The framework was evaluated on geometries ranging from simple didactic shapes to complex non-convex meshes like the Stanford Armadillo and YCB objects.
Performance and Scaling
The analytical active-set approach for solving contact QPs demonstrated orders of magnitude faster performance compared to standard log-barrier or interior-point methods, particularly at large batch sizes (up to $10^7$ queries). In large-scale parallel simulations of the Armadillo mesh, the framework achieved a 10x to 100x speedup over the collision detection routine in MuJoCo XLA (MJX).
Differentiability
The backward pass for gradient computation is highly efficient, typically requiring only twice the time of the forward pass. This efficiency is crucial for massive parallel Reinforcement Learning (RL) training.
Key Insights and Discussion
A central insight of this work is that for control applications, physical exactness can be slightly relaxed in favor of a smooth optimization landscape. By using "soft" selections, the simulator provides more informative gradients for trajectory optimization.
Furthermore, using smooth SDFs as differentiable acceleration structures bypasses the need for non-differentiable hierarchies like BVHs. While the current framework requires manual decomposition of complex meshes into primitives, future work aims to automate this process and integrate the engine into advanced RL and optimal control loops.
Summary updated