Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
172 lines (161 loc) · 7.19 KB
/
Copy pathpyproject.toml
File metadata and controls
172 lines (161 loc) · 7.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
[build-system]
requires = ["setuptools>=77", "pybind11>=2.11"]
build-backend = "setuptools.build_meta"
[project]
# Single distribution for the whole repo. `GRiD-RBD` (the codegen toolkit) and
# `grid-rbd` (the runtime Python wrapper) normalize to the SAME PEP 503 name and
# the wrapper hard-imports the codegen tree at register_robot time, so they were
# always one distribution — now folded into one editable install.
name = "grid-rbd"
version = "0.5.1"
description = "GPU robot dynamics, kinematics and collisions with analytical derivatives"
readme = "README.md"
# 3.10 floor: the runtime wrapper + its pybind11 _core ext require it; codegen
# is 3.9-compatible but there is no reason to ship the split floor.
requires-python = ">=3.10"
license = "MIT"
license-files = ["LICENSE*"]
authors = [
{name = "A2R Lab"},
]
keywords = ["robotics", "rigid-body-dynamics", "kinematics", "collision-checking", "analytical-derivatives", "cuda", "gpu", "code-generation", "trajectory-optimization", "jax", "pytorch", "mujoco", "pinocchio"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: C++",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Software Development :: Code Generators",
"Environment :: GPU :: NVIDIA CUDA",
"Intended Audience :: Developers",
"Programming Language :: Python :: Implementation :: CPython",
"Typing :: Typed",
]
dependencies = [
# codegen / reference toolkit
"numpy>=1.23",
"sympy>=1.7.1",
"beautifulsoup4>=4.9.3",
"lxml>=4.2.1",
# collision codegen: mesh <collision> elements are voxel-filled into spheres
# (grid_codegen/algorithms/_spherize.py); iiwa14 and most robot assets have them
"trimesh>=4",
"scipy>=1.9", # mesh voxelization and bounded-bulge distance transforms
# runtime wrapper (cache dirs; nvcc invoked at register_robot time)
"platformdirs>=4.0",
]
[project.optional-dependencies]
# Backend extras mirror the jax-vs-jax[cuda] pattern: the user picks the GPU
# wheel (jax[cuda] / a torch cu1xx build) matching their arch; we only pin the
# minimum API version. No upper cap — an over-tight cap just blocks users.
jax = [
"jax>=0.4.40",
]
torch = [
"torch>=2.1",
]
# Both backend surfaces in one shot (recursive self-extras). NO dev/benchmark
# weight here, and NO cuRobo — cuRobo installs last via the bench channel.
all = [
"grid-rbd[jax]",
"grid-rbd[torch]",
]
# Test deps for the bindings suite (imports grid_rbd.jax / grid_rbd.torch to
# exercise the jax<->torch parity + autograd paths). The optional real-MuJoCo
# cross-check is importorskip-guarded, so `mujoco` stays optional. The heavy
# comparator/oracle stack (pinocchio/mjx/frax) lives in install/requirements-dev.txt.
dev = [
"grid-rbd[all]",
"pytest>=7.0",
]
[project.scripts]
grid-generate = "grid_codegen.cli:main"
grid-spherize = "grid_codegen.spherize:main"
[project.urls]
Homepage = "https://a2r-lab.org/GRiD/"
Repository = "https://github.com/A2R-Lab/GRiD"
Documentation = "https://a2r-lab.org/GRiD/"
Changelog = "https://github.com/A2R-Lab/GRiD/blob/main/CHANGELOG.md"
Issues = "https://github.com/A2R-Lab/GRiD/issues"
Paper = "https://a2r-lab.org/publication/grid/"
[tool.setuptools]
# The runtime wrapper ships a C++ extension (grid_rbd._core); a minimal root
# setup.py owns the Extension declaration. Explicit package-data patterns ship
# the templates/markers; build hooks add the pinned resource bundle.
include-package-data = false
[tool.setuptools.packages.find]
# grid_codegen at ./, grid_rbd under ./bindings, peer products under ./external.
where = [".", "bindings", "external"]
include = ["grid_codegen*", "grid_rbd*", "URDFParser", "RBDReference"]
namespaces = false
[tool.setuptools.package-data]
# py.typed (PEP 561): ship inline type annotations so consumers' type checkers /
# IDEs honor them (grid_rbd is a typed package, no separate .pyi).
grid_rbd = ["wrapper_template.cu", "wrapper_common.cuh", "py.typed"]
"grid_rbd.jax" = ["py.typed"]
"grid_rbd.torch" = ["py.typed"]
grid_codegen = ["collision/*.cuh", "collision/assets/*.urdf", "_data/**/*", "_data/provenance.json"]
[tool.black]
line-length = 88 # Sets the maximum line length; default is 88, but you can adjust it if needed.
target-version = ['py39'] # Specify the Python version(s) you're targeting, e.g., 'py39' for Python 3.9.
skip-string-normalization = true # Optional: keep existing string quotes instead of converting to double quotes
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.nox
| \.tox
| \.venv
| _build
| source
| buck-out
| build
| dist
)/
'''
[tool.pytest.ini_options]
# pytest's defaults plus the gitignored local scratch dir at the repo root (a stray
# scratchpad/*/_test.py produced 10 collection errors in a full-tree run, 2026-09-24).
norecursedirs = ["*.egg", ".*", "_darcs", "build", "CVS", "dist", "node_modules", "venv", "{arch}", "scratchpad"]
markers = [
"pinocchio_equivalence: Pinocchio equivalence coverage for GRiD reference code.",
"developer_only: Optional developer-only tests that require extra dependencies.",
"floating_base: Tests that exercise floating-base model paths.",
"robot_smoke: Smoke-tier robot coverage.",
"robot_curated: Curated-tier robot coverage.",
"robot_nightly: Nightly-tier robot coverage.",
"cuda_equivalence: CUDA executable equivalence coverage for generated GRiD code.",
"python_wrappers: grid-rbd Python wrapper coverage; requires CUDA + grid-rbd installed.",
"notebooks: Executable example notebooks (run via nbval-lax); requires CUDA + grid-rbd installed.",
"gpu_proof: Test outcomes recorded in the signed pytest-gpu-proof receipt (auto-applied to cuda_equivalence + python_wrappers by test/conftest.py).",
]
[tool.gpu_proof]
# GPU tests run locally on a real GPU; the signed receipt (gpu-proof.json) is
# verified in CPU-only CI via github.com/plancherb1.keys. See test/run_gpu_proof.sh.
mode = "local"
output = "gpu-proof.json"
github_username = "plancherb1" # org remotes (A2R-Lab) carry no SSH keys — sign as the keyholder
required_marker = "gpu_proof"
# Bind evidence to correctness inputs, including peer gitlinks. Commit ancestry
# alone does NOT detect changed code. Docs/figures stay outside this scope so
# presentation-only descendant commits can reuse a completed receipt.
fingerprint_paths = [
"grid_codegen", "bindings/grid_rbd", "bindings/src",
"external/GLASS", "external/RBDReference", "external/URDFParser",
"config", "pyproject.toml", "setup.py", "_build_resources.py", "MANIFEST.in",
"test/cuda_equivalents", "test/python_wrappers", "test/conftest.py",
"test/helpers.py", "test/run_gpu_proof.sh", "test/run_split_suite.py",
"test/compile_sched.py", "test/prewarm_cuda_flagship.py",
"test/codegen_neutrality.py", "test/header_key_replay.py",
"test/receipt_integrity.py", "test/gpu-proof-tests.txt", "test/run_validation.py",
"tools/check_installed_package.py",
]
max_age_days = 30
require_gpu = true