Skip to main content

GRiD

CI docs license python agent-ready All Contributors

GRiD is a GPU-accelerated library for robot dynamics, kinematics and collisions with analytical derivatives and Hessians.

The GRiD package ecosystem: a user's URDF goes through URDFParser to the code generator (built on GLASS) and RBDReference, producing CUDA C++ with NumPy, JAX, and PyTorch wrappers; benchmarks and tests, backed by pytest-gpu-proof and external oracles, produce validated outputs and performance benchmarks.

GRiD generates optimized, robot-specific CUDA C++ from a URDF: rigid-body dynamics, kinematics, their analytical first- and second-order derivatives, and a plant layer for trajectory optimization. The generated code is exposed as a NumPy handle, a jax.jit-able FFI surface, torch.autograd-aware ops, or a single header-only grid.cuh for use in your own kernels. Every algorithm runs as one CUDA block per problem and is batched across problems; results are bit-deterministic and independent of the thread count. The same model and API rebuild for each target architecture, with one artifact per sm_XX. GRiD builds on URDFParser for URDF parsing, RBDReference for Pinocchio-validated reference dynamics and GLASS for GPU linear algebra.

The full documentation is the website, https://a2r-lab.org/GRiD/: installation, tutorials, the How do I…? index, concepts, API reference, benchmarks and validation. This README points to it.

Version 0.7.0 is on PyPI; 0.5.0 was the first packaged release. GRiD is alpha software and APIs may change between minor versions (see the changelog). The GPU test receipt and the release timing ran on Linux x86-64 with CPython 3.12, CUDA toolkit 13.2 and one RTX 5090 (sm_120); CPython 3.10, 3.11 and 3.13 wheels are built and import-checked on CPU in CI, and the CPU test lane runs on 3.10, 3.12 and 3.13. Other toolkits, GPUs and interpreters are untested; the compatibility page lists the exact environment. The original ICRA 2022 paper describes the implementation preserved in the archival robot-acceleration/GRiD repository; it does not describe the feature set or the performance of this release.

Two entry points

Both entry points use 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]"
import numpy as np, grid_rbd
robot = grid_rbd.load_robot("robot.urdf",      # any URDF; samples: grid_assets/robots/ in the repository
                            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))
print(robot.forward_dynamics(q, qd, tau).shape)  # (8, 7)

See Python wrappers and installation. Deep tutorial: gradient descent through GRiD with plain JAX (examples/jax/ik_gradient_descent.py).

Header-only CUDA

Generate one self-contained grid.cuh and #include it in your own kernels. 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

See Generate CUDA for a robot and examples/cuda/. Deep tutorial: fuse dynamics into your own kernel (examples/cuda/fused_control_step/, checked and timed against the host-function path).

Installation needs no GPU or compiler. Registering a robot compiles its CUDA on a machine with a compatible NVIDIA GPU, CUDA toolkit and C++17 host compiler; the first load takes minutes and later loads reuse the cache. To develop GRiD, or to use the sample URDFs in grid_assets/robots/, work from a checkout: git clone --recursive https://github.com/A2R-Lab/GRiD.git && cd GRiD && bash install/base_install.sh && source .venv/bin/activate.

A Docker image with grid-rbd, jax[cuda12], a cu128 torch wheel and the generated iiwa14 header is published as ghcr.io/a2r-lab/grid:<version> (install/docker/Dockerfile; run with --gpus all). A conda recipe (install/environment.yml) and a uv recipe are on the installation page; neither is tested in CI.

Where things are documented

Topic Site page
Everyday tasks, index of everything How do I…?
Python API (register_robot/load_robot, backends, env knobs, fp64 alpha) Python wrappers
grid-generate CLI, the generated header, debug/print helpers Generate CUDA for a robot
Floating-base conventions (pinocchio / legacy orderings), URDF parsing URDF API
Supported joints, algorithms and restrictions; per-backend inventory CUDA support status · backend coverage
C++ API layers (*_device / *_kernel / host wrapper) codegen architecture
Tests, signed GPU receipts, fixing a red receipt CI job CUDA validation
Benchmark harness, bench-only troubleshooting (e.g. --ptxas-opt-level) benchmarks
Release measurements and their method release measurements
Contributing, adding an algorithm contribution guidelines · adding an algorithm · CONTRIBUTING.md

Repo map

Directory Owns
grid_codegen/ the code-generation engine: emits grid.cuh and the checked-in generated binding regions, driven by the abi_specs.py table
bindings/ the grid-rbd Python package (NumPy/JAX/torch handles over a cached per-robot .so); see bindings/README.md
grid_assets/ ten sample robots and three test fixtures (robots/) + tuned per-GPU launch configs (launch_configs/)
test/ pytest suites + the split-suite/receipt machinery
examples/ notebooks/ (Python tour), codegen/, cuda/; see examples/README.md
docs/ the Sphinx site (source/), the cover page (landing/), agent_debugging_guide.md, design_history/
external/, install/ peer submodules (GLASS, RBDReference, URDFParser); install scripts and requirements files

Performance

Core-operation speedups against seven baseline modes, with timing boundaries and fp64 exceptions labeled.

The release measurements (September and October 2026, one NVIDIA RTX 5090 and an Intel Core Ultra 9 285K) cover RNEA, its analytical gradient and its Hessian on iiwa14, go2 and G1 at batch sizes 16 to 1024. Ratios are baseline time over GRiD time, so values above 1x favor GRiD. The method, every timing boundary and the caveats are on the release measurements page, and the benchmark harness reproduces the collection.

Citing GRiD

If you use GRiD in your research, please cite our paper "GRiD: GPU-Accelerated Rigid Body Dynamics with Analytical Gradients":

@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}
}

License

MIT; see LICENSE.

Contributors

Brian Plancher
Brian Plancher

Zachary Pestrikov
Zachary Pestrikov

Kwamena A
Kwamena A

Danelle Tuchman
Danelle Tuchman

Ann Li
Ann Li

=
=

EmreAdabag
EmreAdabag

Cael Yasutake
Cael Yasutake

Naren Loganathan
Naren Loganathan

emilyburnett2003
emilyburnett2003

pruyontrarakk
pruyontrarakk

Kimiya Shahamat
Kimiya Shahamat

Kimiya Shahamat
Kimiya Shahamat

Metadata

Release files for grid-rbd 0.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grid-rbd 0.7.2
File Size Uploaded Provenance Actions
grid_rbd-0.7.2.tar.gz 1.5 MB With provenance Details for grid_rbd-0.7.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for grid-rbd 0.7.2
File Actions
grid_rbd-0.7.2-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details for grid_rbd-0.7.2-cp313-cp313-manylinux_2_34_x86_64.whl
grid_rbd-0.7.2-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details for grid_rbd-0.7.2-cp312-cp312-manylinux_2_34_x86_64.whl
grid_rbd-0.7.2-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details for grid_rbd-0.7.2-cp311-cp311-manylinux_2_34_x86_64.whl
grid_rbd-0.7.2-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details for grid_rbd-0.7.2-cp310-cp310-manylinux_2_34_x86_64.whl

Total release size: 9.2 MB

Release files / grid_rbd-0.7.2.tar.gz

Download URL grid_rbd-0.7.2.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
cfe72ea4175d5f76f9ee7aca410677c7f97aaf1293ba6e9d0e830a1d4196f43d
BLAKE2b-256 checksum
How to use checksums
015189e5b886b3392cbf740857b0a17dac1f2c08a1d9e1a1a081ffd10e3fdbce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / grid_rbd-0.7.2-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL grid_rbd-0.7.2-cp313-cp313-manylinux_2_34_x86_64.whl
Size 1.9 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
2c66c77b007a3ab812e1a655591c5d449f475cfc053f87421a5db6b9c0ac4b94
BLAKE2b-256 checksum
How to use checksums
183d50855d1194136794b710097e0f8ceb651fbc117ccfef54b6b4362600be31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / grid_rbd-0.7.2-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL grid_rbd-0.7.2-cp312-cp312-manylinux_2_34_x86_64.whl
Size 1.9 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
fa6fb9a4358814a0efef68ba636f77c361310de9e0fb4856b5811a359b9f9455
BLAKE2b-256 checksum
How to use checksums
30ee10e8246bd24216e7d4149ac96665f0d55722ef36826262abe40b842fcba5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / grid_rbd-0.7.2-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL grid_rbd-0.7.2-cp311-cp311-manylinux_2_34_x86_64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
25ce97688f9dc5656c9de05ad7485ee278def8d1ac011e6d7a64d08015ac98f0
BLAKE2b-256 checksum
How to use checksums
9bc385eb81aca8b331e31e8cba1bd3c3c659686141716a302448f1b69cc282d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / grid_rbd-0.7.2-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL grid_rbd-0.7.2-cp310-cp310-manylinux_2_34_x86_64.whl
Size 1.9 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
e23e0b4a016a01f15ba946d3ff2397f768cd20beead6c228202d017e882925d5
BLAKE2b-256 checksum
How to use checksums
211654cf1fe85c7f059f41de187e6d3cb6c6f7e6aa2f428c5cfc48f20f6b9be5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for grid-rbd 0.7.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for grid_rbd-0.7.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page