Compute how your robot moves
Batched inverse and forward dynamics, inertia matrices, and centroidal quantities for fixed- and floating-base robots.
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
Batched inverse and forward dynamics, inertia matrices, and centroidal quantities for fixed- and floating-base robots.
End-effector poses, frame Jacobians, and runtime targets for task-space computation.
Generate self- and environment-collision routines from robot geometry, with coarse-to-fine checks in CUDA.
Analytical gradients and Hessians for supported dynamics, kinematics, and optimization operations.
Joint support is operation-specific; see support and restrictions and the library overview.
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
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.

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.

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

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.

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.
GRiD has two entry points to the same generated CUDA.
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.
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.
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.
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.