GPU-Accelerated Robot Dynamics

GRiD
GPU Dynamics, Kinematics, and Collisions with Analytical Derivatives and Hessians

Turn your URDF into robot-specific CUDA kernels with analytical derivatives and Hessians.
Interfaces in CUDA C++, NumPy, JAX, and PyTorch.

Developed at A²R Lab · Original ICRA 2022 paper and project history

Dynamics

Compute how your robot moves

Batched inverse and forward dynamics, inertia matrices, and centroidal quantities for fixed- and floating-base robots.

Kinematics

Connect joints to task space

End-effector poses, frame Jacobians, and runtime targets for task-space computation.

Collisions

Check configurations on the GPU

Generate self- and environment-collision routines from robot geometry, with coarse-to-fine checks in CUDA.

Gradients & Hessians

Use analytical derivatives

Analytical gradients and Hessians for supported dynamics, kinematics, and optimization operations.

What GRiD supports

Joints and algorithms.

Joint types

  • Revolute and continuous, prismatic, fixed
  • Floating base (free-flyer) and fixed base
  • Mimic joints, including chained mimics
  • Arbitrary (skew) joint axes
  • Helical, planar, and translation joints
  • Spherical (ball) joints
  • Optional joint damping and friction

Algorithms

  • Inverse dynamics (RNEA), forward dynamics (ABA and via the mass-matrix inverse), mass matrix (CRBA)
  • Analytical gradients and Hessians of inverse and forward dynamics
  • End-effector pose, Jacobian, and Hessian; frame Jacobians in local, world, or local-world-aligned coordinates
  • Centroidal momentum matrix and its derivatives; Coriolis matrix; gravity and bias terms
  • External forces and their gradients; inertial-parameter regressors and parameter gradients
  • Time integrators with gradients, Euler and semi-implicit Euler step Hessians, and a trajectory-optimization plant layer
  • Two-tier collision checking on spherized geometry

Joint support is operation-specific; see support and restrictions and the library overview.

From model to computation

Your robot model becomes reusable GPU code.

  1. 01Describe your robotURDF, geometry, and the operations you need
  2. 02Generate and compileRobot-specific CUDA and a cache per GPU architecture
  3. 03Build your applicationNumPy · JAX · PyTorch · CUDA C++
Browse supported operations
September/October 2026 Updated Results

Benchmark Results

GRiD provides fast robot-specific CUDA computations for GPU-resident solvers and libraries. In this study, its compute-only CUDA call is faster than every evaluated GPU baseline on matched RNEA and gradient cases. GRiD's full host-to-host JAX calls are 1.8–4.7× faster than MJX across all 36 matched cases.

The Pinocchio baseline uses codegen for RNEA and its gradient, and its standard analytical path for Hessians. Both peak speedups are Hessian comparisons: GRiD fp32 against Pinocchio fp64, due to library limitations. The 3.3× host-call peak is on iiwa14 at batch 256; the 13× compute-only peak is on G1 at batch 1024.

We measure RNEA, its gradient, and its Hessian on iiwa14, go2, and G1, at batch sizes 16 through 1024 on a 24-core Intel Core Ultra 9 285K CPU and NVIDIA RTX 5090 GPU. Read the protocol and the full results

Where the time goes

At batch 1024, GRiD's compute-only CUDA calls for RNEA gradients are 2.5× faster on iiwa14 and 3.7× faster on go2 than Pinocchio codegen.

Green shows GRiD's CUDA compute-only call, gray diagonal hatching its GPU–CPU I/O increment, and gray dots its JAX wrapper increment. Overheads are differences of measured call times, not isolated component timings. Pinocchio's codegen and standard APIs are shown separately for RNEA and its gradient; Hessians use its standard analytical fp64 path. BARD and Frax remain in the full tables. A red triangle marks a full-call total whose decomposition is unavailable.

Clustered GRiD, Pinocchio and MuJoCo timing bars on three robots; Hessians compare GRiD with Pinocchio's standard API only.
Timing boundaries and precision exceptions

Speedup against the baselines

GRiD's compute-only CUDA calls are 4.3–38.6× faster than the matched MuJoCo Warp and MJX resident calls.

Blue is GRiD faster, red is the baseline faster. GPU comparisons use resident calls: GRiD includes native launch and synchronization, while competitors also include framework dispatch. CPU comparisons include GRiD's host–device copies. Missing cells reflect this study's adapter coverage and method choices, not a claim that a library cannot perform the operation.

Core-operation speedups against seven baseline modes, with timing boundaries and fp64 exceptions labeled.
Compare like-for-like JAX API boundaries

Compute-only speedup against CPU libraries

Keeping data on the GPU removes the transfer cost and reveals GRiD's compute advantage as the workload grows.

GRiD compute-only speedups against Pinocchio codegen, Pinocchio standard API, and MuJoCo CPU; blue favors GRiD and red favors the baseline.
GRiD uses fp32; Pinocchio's analytical Hessians and MuJoCo CPU use fp64. Figure 2b and comparison details

Choose the API boundary your application uses

Use CUDA directly for the lowest measured call overhead, or access the same robot computations through C++ Host, NumPy, PyTorch, and JAX.

Each bar is the measured wall time for RNEA or its gradient. CUDA Device excludes host–device transfers but includes native launch and synchronization. C++ Host uses prepared host buffers and includes transfers; the Python calls include their full host-to-host API cost.

Call wall times for CUDA Device, C++ Host, NumPy, PyTorch, and JAX, in that order, for RNEA and its gradient on three robots.

Browse every planned cell or download the data and provenance. The main figures use 300 samples per repeat; secondary operations retain their separately labeled 30-sample collection and numerical warnings. This dataset does not include collision timings.

Get started

Start with one robot and one computation.

GRiD has two entry points to the same generated CUDA.

Python wrappers

load_robot(urdf) generates, compiles and caches the robot's CUDA and exposes it as batched NumPy, JAX or PyTorch calls. No CUDA code is required.

pip install grid-rbd            # code generator + NumPy backend + grid-generate CLI
pip install "grid-rbd[jax]"     # or "grid-rbd[torch]", "grid-rbd[all]"

Deep tutorial: gradient descent through GRiD with plain JAX.

Header-only CUDA

Generate one self-contained grid.cuh and #include it in your own kernels, for example to fuse dynamics, derivatives and collisions into an MPC, RL or controls kernel. This path needs only the generator and nvcc: no per-robot .so and no Python at runtime.

pip install grid-rbd
grid-generate robot.urdf -o grid.cuh        # -f floating base, --algorithm-list to trim
nvcc -arch=sm_90 -std=c++17 my_kernel.cu    # the header vendors its GLASS linear algebra

Minimal kernel and build script: examples/cuda/. Deep tutorial: fuse dynamics into your own kernel.

To develop GRiD, or to use the sample URDFs, work from a source checkout of main instead:

git clone --recursive https://github.com/A2R-Lab/GRiD.git
cd GRiD
bash install/base_install.sh
source .venv/bin/activate
import numpy as np
import grid_rbd

robot = grid_rbd.load_robot(
    "grid_assets/robots/iiwa14.urdf",
    algorithm_list=["forward_dynamics"],
    enable_mujoco_kernels=False,
)
q = np.zeros((8, robot.nq), dtype=np.float32)
qd, tau = (np.zeros((8, robot.nv), dtype=np.float32) for _ in range(2))
qdd = robot.forward_dynamics(q, qd, tau)
print(qdd.shape)  # (8, 7)
robot.close()

The first load generates and compiles the robot's CUDA, which takes minutes; later loads reuse the cache. Installation itself needs no GPU or compiler.

Platform and interface scope

Validation ran on Linux x86-64 (Ubuntu 24.04) with CUDA toolkit 13.2, driver 615.71.09 and one RTX 5090 (sm_120); other toolkits and GPUs are untested. Generated code can be rebuilt for different GPU architectures; compiled robot binaries are architecture-specific. This dataset does not cover Jetson. Use the PyPI install above (or the source checkout for development).

See compatibility and known limitations for joint types, operation coverage, runtime contexts, differentiation, and graph-capture restrictions.

Research and continuity

Cite GRiD.

The original ICRA 2022 paper describes the implementation preserved at robot-acceleration/GRiD. Ongoing development lives at A2R-Lab/GRiD. The paper does not describe all current features or establish their performance. If you use GRiD in your research, cite the original paper and record the software commit or release:

@inproceedings{plancher2022grid,
  title={GRiD: GPU-Accelerated Rigid Body Dynamics with Analytical Gradients},
  author={Brian Plancher and Sabrina M. Neuman and Radhika Ghosal and
          Scott Kuindersma and Vijay Janapa Reddi},
  booktitle={IEEE International Conference on Robotics and Automation (ICRA)},
  year={2022},
  month={May}
}

Original paper, PDF, and arXiv

Built with URDFParser, RBDReference, and GLASS. GPU validation records use pytest-GPU-proof.