arXiv:2609.08800cs.ROSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.08800

Ostrich: Taking Large Strides Through Stiff Contact in Differentiable Dynamics

Aleš Kučera, Karel Zimmermann

Aleš Kučera¹ and Karel Zimmermann¹

Abstract— Three properties determine whether a differentiable simulator can drive gradient-based optimization through contact: simulation accuracy, gradient reliability, and per-iteration cost. Tape-based engines such as MJX and Newton Semi-Implicit require timesteps small enough to keep contacts numerically tractable, and their backpropagation memory grows linearly with the number of timesteps TT. Surrogate models bound memory by approximating contact away, but the resulting gradients lose the geometry the optimization depends on. We present Ostrich, a GPU-accelerated rigid-body simulator that resolves hard contacts and friction with non-smooth Newton iteration at large timesteps (h∼10−1h \sim 10^{-1} s), and differentiates the converged residual via the implicit function theorem, reusing the forward Schur complement to compute the adjoint at O(1)\mathcal{O}(1) memory per timestep. On real-robot trajectories over a pallet obstacle, Ostrich holds MuJoCo's sim-to-real accuracy up to a 50×50\times larger timestep. Its gradients converge from random initializations where MJX descends slowly and Newton Semi-Implicit stalls; a warm iteration runs 211×211\times faster than MJX's and 4.7×4.7\times faster than Semi-Implicit's. On the same scene Ostrich differentiates 8,192 parallel worlds on a single 24 GB GPU, sustaining 29×29\times checkpointed MJX's optimization throughput; without checkpointing both baselines exhaust memory at far fewer worlds. We close with a gradient-based trajectory optimization demonstration over triangle-mesh terrain across a 10 s horizon, a setting where prior engines either restrict to primitive geometry or face the convergence and memory limits shown above.

I. INTRODUCTION

Differentiable physics simulators promise gradient-based trajectory optimization and policy learning in robotics [1]–[3]. On long-horizon tasks with stiff, persistent contact, such as a wheeled robot driving across high-friction terrain, current engines force a tradeoff between simulation accuracy, gradient reliability, and per-iteration cost.

Tape-based engines need timesteps small enough to keep contacts tractable, and memory linear in step count [4], [5]; surrogate models bound memory but lose the geometry of non-holonomic traction, localized slip, and mesh-level friction [6], [7]. Implicit-differentiation engines with hard contact formulations avoid both pitfalls in principle, yet remain CPU-bound or restricted to primitive collision geometries [8]–[10].

¹The authors are with the Department of Cybernetics, Faculty of Electrical Engineering, Czech Technical University in Prague, Prague, Czech Republic. kuceral4@fel.cvut.cz

Figure

Fig. 1. Gradient-based trajectory optimization through mesh terrain with Ostrich. Left: a wheeled robot's control spline is optimized to reach the target (pink area) across a triangle-mesh heightmap. Trajectories are colored by optimization iteration, from the initial guess (purple) to the converged solution (red) after 26 iterations; each iteration backpropagates through the mesh-wheel contact forces (contact geometry held fixed within each step, §IV-D) at O(1)\mathcal{O}(1) memory per timestep. Right: headline comparison against MJX and Newton Semi-Implicit on the box-traversal scene (§IV): usable timestep, single-world optimization throughput (§IV-B), peak optimization throughput across parallel worlds, and control-synthesis success rate, on a single 24GB GPU. The first three axes use a log scale.

We introduce Ostrich (Fig. 1), a GPU-accelerated differentiable rigid-body simulator that combines hard contacts with O(1)\mathcal{O}(1) gradient memory per timestep (total O(T)\mathcal{O}(T) stored states over a horizon, reducible by checkpointing, §IV-C). The forward integrator is backward-Euler, with hard Non-Linear Complementarity Problem (NCP) contacts and Coulomb friction resolved inside each step by a non-smooth Newton solver. This yields stable simulation at macroscopic timesteps (h∼10−1h \sim 10^{-1} s). The backward pass applies the Implicit Function Theorem (IFT) to the converged residual, reusing the forward Schur complement to compute reverse-mode gradients via a single adjoint solve, decoupling gradient memory from the solver's internal iterations.

Beyond the non-smooth Newton formulation of Macklin et al. [11], we add control constraints solved jointly with contact and well posed at any positive gain, best-iterate backtracking, and robust friction projection, and we scale both the forward solve and the adjoint to arbitrary triangle meshes and to thousands of parallel worlds. Section IV evaluates Ostrich against MJX and NVIDIA Newton Semi-Implicit, the two surveyed engines that run our scene as differentiable baselines, on sim-to-real accuracy, gradient-based control synthesis, and world-scaling throughput.

References (33)