grid-rbd 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. grid_rbd-0.5.0/LICENSE +21 -0
  2. grid_rbd-0.5.0/MANIFEST.in +25 -0
  3. grid_rbd-0.5.0/PKG-INFO +372 -0
  4. grid_rbd-0.5.0/README.md +322 -0
  5. grid_rbd-0.5.0/_build_resources.py +95 -0
  6. grid_rbd-0.5.0/bindings/grid_rbd/__init__.py +1002 -0
  7. grid_rbd-0.5.0/bindings/grid_rbd/_cache.py +626 -0
  8. grid_rbd-0.5.0/bindings/grid_rbd/_compile.py +745 -0
  9. grid_rbd-0.5.0/bindings/grid_rbd/_configuration.py +35 -0
  10. grid_rbd-0.5.0/bindings/grid_rbd/_handle.py +2450 -0
  11. grid_rbd-0.5.0/bindings/grid_rbd/_mujoco.py +143 -0
  12. grid_rbd-0.5.0/bindings/grid_rbd/_out_transform.py +182 -0
  13. grid_rbd-0.5.0/bindings/grid_rbd/_payload.py +90 -0
  14. grid_rbd-0.5.0/bindings/grid_rbd/_surface_common.py +410 -0
  15. grid_rbd-0.5.0/bindings/grid_rbd/_vjp_common.py +149 -0
  16. grid_rbd-0.5.0/bindings/grid_rbd/jax/__init__.py +1738 -0
  17. grid_rbd-0.5.0/bindings/grid_rbd/jax/py.typed +0 -0
  18. grid_rbd-0.5.0/bindings/grid_rbd/py.typed +0 -0
  19. grid_rbd-0.5.0/bindings/grid_rbd/torch/__init__.py +1360 -0
  20. grid_rbd-0.5.0/bindings/grid_rbd/torch/py.typed +0 -0
  21. grid_rbd-0.5.0/bindings/grid_rbd/wrapper_template.cu +7850 -0
  22. grid_rbd-0.5.0/bindings/src/_core.cpp +2638 -0
  23. grid_rbd-0.5.0/external/RBDReference/RBDReference.py +4962 -0
  24. grid_rbd-0.5.0/external/RBDReference/__init__.py +1 -0
  25. grid_rbd-0.5.0/external/RBDReference/_centroidal.py +565 -0
  26. grid_rbd-0.5.0/external/RBDReference/_energy.py +199 -0
  27. grid_rbd-0.5.0/external/RBDReference/_plant.py +511 -0
  28. grid_rbd-0.5.0/external/RBDReference/_regressor.py +285 -0
  29. grid_rbd-0.5.0/external/URDFParser/InertiaSet.py +23 -0
  30. grid_rbd-0.5.0/external/URDFParser/Joint.py +795 -0
  31. grid_rbd-0.5.0/external/URDFParser/Link.py +145 -0
  32. grid_rbd-0.5.0/external/URDFParser/Robot.py +1098 -0
  33. grid_rbd-0.5.0/external/URDFParser/SpatialAlgebra.py +159 -0
  34. grid_rbd-0.5.0/external/URDFParser/URDFParser.py +679 -0
  35. grid_rbd-0.5.0/external/URDFParser/__init__.py +7 -0
  36. grid_rbd-0.5.0/external/URDFParser/errors.py +48 -0
  37. grid_rbd-0.5.0/grid_codegen/GRiDCodeGenerator.py +1118 -0
  38. grid_rbd-0.5.0/grid_codegen/__init__.py +1 -0
  39. grid_rbd-0.5.0/grid_codegen/_algo_profiles.py +272 -0
  40. grid_rbd-0.5.0/grid_codegen/_constants_arena.py +2207 -0
  41. grid_rbd-0.5.0/grid_codegen/_data/GLASS/glass-cgrps.cuh +25 -0
  42. grid_rbd-0.5.0/grid_codegen/_data/GLASS/glass-defaults.cuh +469 -0
  43. grid_rbd-0.5.0/grid_codegen/_data/GLASS/glass-dispatch.cuh +149 -0
  44. grid_rbd-0.5.0/grid_codegen/_data/GLASS/glass-nvidia.cuh +280 -0
  45. grid_rbd-0.5.0/grid_codegen/_data/GLASS/glass.cuh +190 -0
  46. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/argreduce.cuh +416 -0
  47. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/asum.cuh +206 -0
  48. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/axpy.cuh +244 -0
  49. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/axpy_strided.cuh +117 -0
  50. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/clip.cuh +48 -0
  51. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/copy.cuh +187 -0
  52. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/copy_strided.cuh +117 -0
  53. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/dot.cuh +273 -0
  54. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/dot_strided.cuh +55 -0
  55. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/dot_strided_coalesced.cuh +82 -0
  56. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/elementwise_logic.cuh +416 -0
  57. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/iamax.cuh +395 -0
  58. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/ident.cuh +140 -0
  59. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/infnorm.cuh +57 -0
  60. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/norm.cuh +164 -0
  61. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/nrm1_diff.cuh +211 -0
  62. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/nrm2.cuh +243 -0
  63. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/prefix_sum.cuh +60 -0
  64. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/reduce.cuh +563 -0
  65. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/rot.cuh +223 -0
  66. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/scal.cuh +184 -0
  67. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/set_const.cuh +44 -0
  68. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/softmax.cuh +228 -0
  69. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/swap.cuh +46 -0
  70. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/symmetrize.cuh +170 -0
  71. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/transpose.cuh +102 -0
  72. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L1/vote.cuh +43 -0
  73. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L2/gemv.cuh +366 -0
  74. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L2/gemv_reduced.cuh +135 -0
  75. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L2/gemv_segmented.cuh +210 -0
  76. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L2/gemv_strided.cuh +70 -0
  77. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L2/ger.cuh +61 -0
  78. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L2/trsv.cuh +318 -0
  79. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/congruence.cuh +387 -0
  80. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/dimm.cuh +65 -0
  81. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/eigh.cuh +293 -0
  82. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/gemm.cuh +662 -0
  83. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/gemm_batched_indexed.cuh +120 -0
  84. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/gemm_reduced.cuh +208 -0
  85. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/gemm_strided.cuh +79 -0
  86. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/getrf.cuh +366 -0
  87. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/gn_step.cuh +90 -0
  88. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/inv.cuh +607 -0
  89. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/ldlt.cuh +782 -0
  90. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/posv.cuh +343 -0
  91. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/potrf.cuh +287 -0
  92. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/riccati.cuh +191 -0
  93. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/syev.cuh +374 -0
  94. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/symm.cuh +260 -0
  95. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/syrk.cuh +716 -0
  96. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/syrk_reduced.cuh +161 -0
  97. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/tensor_contract.cuh +307 -0
  98. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/L3/trsm.cuh +362 -0
  99. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/banded/bdmv.cuh +90 -0
  100. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/banded/bdsv.cuh +170 -0
  101. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/banded/block_access.cuh +136 -0
  102. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/barrier.cuh +125 -0
  103. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/dispatch.cuh +299 -0
  104. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/est/svd3.cuh +374 -0
  105. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/flags.cuh +16 -0
  106. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/geom/frame.cuh +45 -0
  107. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/geom/segment.cuh +88 -0
  108. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/geom/sphere.cuh +163 -0
  109. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/geom/transform_points.cuh +86 -0
  110. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/lie/angle.cuh +96 -0
  111. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/lie/pose.cuh +222 -0
  112. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/lie/quat.cuh +663 -0
  113. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/lie/se3.cuh +652 -0
  114. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/lie/so3.cuh +435 -0
  115. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/pcg/solve.cuh +152 -0
  116. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/proj/cone.cuh +169 -0
  117. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/proj/interval.cuh +325 -0
  118. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/spatial/cross.cuh +387 -0
  119. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/spatial/inertia.cuh +173 -0
  120. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/base/spatial/transform.cuh +317 -0
  121. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/cgrps/l1.cuh +276 -0
  122. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/cgrps/l2.cuh +191 -0
  123. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/cgrps/l3.cuh +387 -0
  124. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/internal/box_qp.cuh +157 -0
  125. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/l1.cuh +148 -0
  126. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/l1_warp.cuh +132 -0
  127. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/l2.cuh +456 -0
  128. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/l3.cuh +772 -0
  129. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/l3_simt.cuh +245 -0
  130. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/lapack.cuh +1409 -0
  131. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/lapack_thread.cuh +177 -0
  132. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/query.cuh +126 -0
  133. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/query_simt.cuh +300 -0
  134. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/tuning_table.cuh +181 -0
  135. grid_rbd-0.5.0/grid_codegen/_data/GLASS/src/nvidia/types.cuh +61 -0
  136. grid_rbd-0.5.0/grid_codegen/_data/launch_configs/baxter/rtx5090_sm120.json +923 -0
  137. grid_rbd-0.5.0/grid_codegen/_data/launch_configs/g1/rtx5090_sm120.json +1056 -0
  138. grid_rbd-0.5.0/grid_codegen/_data/launch_configs/go2/rtx5090_sm120.json +1056 -0
  139. grid_rbd-0.5.0/grid_codegen/_data/launch_configs/h1_2/rtx5090_sm120.json +948 -0
  140. grid_rbd-0.5.0/grid_codegen/_data/launch_configs/h2_plus/rtx5090_sm120.json +939 -0
  141. grid_rbd-0.5.0/grid_codegen/_data/launch_configs/iiwa14/rtx5090_sm120.json +1056 -0
  142. grid_rbd-0.5.0/grid_codegen/_data/licenses/GLASS/LICENSE +21 -0
  143. grid_rbd-0.5.0/grid_codegen/_data/licenses/RBDReference/LICENSE +21 -0
  144. grid_rbd-0.5.0/grid_codegen/_data/licenses/URDFParser/LICENSE +21 -0
  145. grid_rbd-0.5.0/grid_codegen/_data/provenance.json +139 -0
  146. grid_rbd-0.5.0/grid_codegen/_feature_macros.py +170 -0
  147. grid_rbd-0.5.0/grid_codegen/_reference_impl.py +603 -0
  148. grid_rbd-0.5.0/grid_codegen/abi_specs.py +1286 -0
  149. grid_rbd-0.5.0/grid_codegen/algo_registry.py +925 -0
  150. grid_rbd-0.5.0/grid_codegen/algorithms/__init__.py +30 -0
  151. grid_rbd-0.5.0/grid_codegen/algorithms/_aba.py +1572 -0
  152. grid_rbd-0.5.0/grid_codegen/algorithms/_bounded_spheres.py +112 -0
  153. grid_rbd-0.5.0/grid_codegen/algorithms/_centroidal.py +910 -0
  154. grid_rbd-0.5.0/grid_codegen/algorithms/_collision.py +1574 -0
  155. grid_rbd-0.5.0/grid_codegen/algorithms/_combos.py +143 -0
  156. grid_rbd-0.5.0/grid_codegen/algorithms/_coriolis.py +762 -0
  157. grid_rbd-0.5.0/grid_codegen/algorithms/_crba.py +1008 -0
  158. grid_rbd-0.5.0/grid_codegen/algorithms/_dccrba.py +943 -0
  159. grid_rbd-0.5.0/grid_codegen/algorithms/_eepose_gradient_hessian.py +3335 -0
  160. grid_rbd-0.5.0/grid_codegen/algorithms/_eepose_runtime.py +571 -0
  161. grid_rbd-0.5.0/grid_codegen/algorithms/_f_ext_contact.py +835 -0
  162. grid_rbd-0.5.0/grid_codegen/algorithms/_f_ext_gradient.py +940 -0
  163. grid_rbd-0.5.0/grid_codegen/algorithms/_fdsva_so.py +1351 -0
  164. grid_rbd-0.5.0/grid_codegen/algorithms/_forward_dynamics.py +373 -0
  165. grid_rbd-0.5.0/grid_codegen/algorithms/_forward_dynamics_gradient.py +673 -0
  166. grid_rbd-0.5.0/grid_codegen/algorithms/_frame_jacobian.py +1009 -0
  167. grid_rbd-0.5.0/grid_codegen/algorithms/_idsva_so.py +5054 -0
  168. grid_rbd-0.5.0/grid_codegen/algorithms/_integrator.py +1265 -0
  169. grid_rbd-0.5.0/grid_codegen/algorithms/_integrator_gradient.py +2265 -0
  170. grid_rbd-0.5.0/grid_codegen/algorithms/_inverse_dynamics.py +1015 -0
  171. grid_rbd-0.5.0/grid_codegen/algorithms/_inverse_dynamics_gradient.py +2358 -0
  172. grid_rbd-0.5.0/grid_codegen/algorithms/_minv.py +843 -0
  173. grid_rbd-0.5.0/grid_codegen/algorithms/_mjx_blockpar.py +42 -0
  174. grid_rbd-0.5.0/grid_codegen/algorithms/_multitarget.py +647 -0
  175. grid_rbd-0.5.0/grid_codegen/algorithms/_plant.py +2823 -0
  176. grid_rbd-0.5.0/grid_codegen/algorithms/_regressor.py +496 -0
  177. grid_rbd-0.5.0/grid_codegen/algorithms/_regressor_energy.py +487 -0
  178. grid_rbd-0.5.0/grid_codegen/algorithms/_regressor_fd_parameter_gradient.py +346 -0
  179. grid_rbd-0.5.0/grid_codegen/algorithms/_regressor_gradient.py +578 -0
  180. grid_rbd-0.5.0/grid_codegen/algorithms/_spherize.py +258 -0
  181. grid_rbd-0.5.0/grid_codegen/cli.py +185 -0
  182. grid_rbd-0.5.0/grid_codegen/collision/assets/go2_spherized.urdf +598 -0
  183. grid_rbd-0.5.0/grid_codegen/collision/assets/iiwa14_spherized.urdf +427 -0
  184. grid_rbd-0.5.0/grid_codegen/collision/grid_collision_geometry.cuh +750 -0
  185. grid_rbd-0.5.0/grid_codegen/core_body_gen.py +285 -0
  186. grid_rbd-0.5.0/grid_codegen/env_knobs.py +39 -0
  187. grid_rbd-0.5.0/grid_codegen/helpers/__init__.py +17 -0
  188. grid_rbd-0.5.0/grid_codegen/helpers/_code_generation_helpers.py +1512 -0
  189. grid_rbd-0.5.0/grid_codegen/helpers/_gpu_err.py +133 -0
  190. grid_rbd-0.5.0/grid_codegen/helpers/_host_clamp.py +126 -0
  191. grid_rbd-0.5.0/grid_codegen/helpers/_lin_alg_helpers.py +406 -0
  192. grid_rbd-0.5.0/grid_codegen/helpers/_spatial_algebra_helpers.py +230 -0
  193. grid_rbd-0.5.0/grid_codegen/helpers/_topology_helpers.py +1875 -0
  194. grid_rbd-0.5.0/grid_codegen/kernel_attrs.py +746 -0
  195. grid_rbd-0.5.0/grid_codegen/launch_config.py +235 -0
  196. grid_rbd-0.5.0/grid_codegen/resources.py +46 -0
  197. grid_rbd-0.5.0/grid_codegen/spherize.py +73 -0
  198. grid_rbd-0.5.0/grid_codegen/wrapper_body_gen.py +1222 -0
  199. grid_rbd-0.5.0/grid_codegen/wrapper_mjx_docs.py +191 -0
  200. grid_rbd-0.5.0/grid_codegen/wrapper_plant_gen.py +570 -0
  201. grid_rbd-0.5.0/grid_codegen/wrapper_surface_docs.py +231 -0
  202. grid_rbd-0.5.0/grid_rbd.egg-info/PKG-INFO +372 -0
  203. grid_rbd-0.5.0/grid_rbd.egg-info/SOURCES.txt +103 -0
  204. grid_rbd-0.5.0/grid_rbd.egg-info/dependency_links.txt +1 -0
  205. grid_rbd-0.5.0/grid_rbd.egg-info/entry_points.txt +3 -0
  206. grid_rbd-0.5.0/grid_rbd.egg-info/requires.txt +21 -0
  207. grid_rbd-0.5.0/grid_rbd.egg-info/top_level.txt +4 -0
  208. grid_rbd-0.5.0/pyproject.toml +172 -0
  209. grid_rbd-0.5.0/setup.cfg +4 -0
  210. grid_rbd-0.5.0/setup.py +38 -0
grid_rbd-0.5.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Hardware Acceleration for Robotics
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,25 @@
1
+ include _build_resources.py
2
+ include LICENSE*
3
+ include bindings/src/_core.cpp
4
+ recursive-include grid_codegen *.py *.cuh *.urdf
5
+ recursive-include grid_codegen/_data *
6
+ recursive-include bindings/grid_rbd *.py *.cuh *.cu py.typed
7
+ include external/URDFParser/*.py
8
+ include external/RBDReference/*.py
9
+ global-exclude __pycache__ *.pyc
10
+ prune docs
11
+ prune test
12
+ prune examples
13
+ prune install
14
+ prune config
15
+ prune .github
16
+ prune external/GLASS
17
+ prune external/URDFParser/tests
18
+ prune external/URDFParser/docs
19
+ prune external/RBDReference/tests
20
+ prune external/RBDReference/docs
21
+ prune external/RBDReference/equivalents
22
+ prune bindings/tests
23
+ prune bindings/examples
24
+ prune tools
25
+ exclude gpu-proof.json CLAUDE.md
@@ -0,0 +1,372 @@
1
+ Metadata-Version: 2.4
2
+ Name: grid-rbd
3
+ Version: 0.5.0
4
+ Summary: GPU robot dynamics, kinematics and collisions with analytical derivatives
5
+ Author: A2R Lab
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://a2r-lab.org/GRiD/
8
+ Project-URL: Repository, https://github.com/A2R-Lab/GRiD
9
+ Project-URL: Documentation, https://a2r-lab.org/GRiD/
10
+ Project-URL: Changelog, https://github.com/A2R-Lab/GRiD/blob/main/CHANGELOG.md
11
+ Project-URL: Issues, https://github.com/A2R-Lab/GRiD/issues
12
+ Project-URL: Paper, https://a2r-lab.org/publication/grid/
13
+ Keywords: robotics,rigid-body-dynamics,kinematics,collision-checking,analytical-derivatives,cuda,gpu,code-generation,trajectory-optimization,jax,pytorch,mujoco,pinocchio
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: C++
22
+ Classifier: Topic :: Scientific/Engineering
23
+ Classifier: Topic :: Scientific/Engineering :: Physics
24
+ Classifier: Topic :: Software Development :: Code Generators
25
+ Classifier: Environment :: GPU :: NVIDIA CUDA
26
+ Classifier: Intended Audience :: Developers
27
+ Classifier: Programming Language :: Python :: Implementation :: CPython
28
+ Classifier: Typing :: Typed
29
+ Requires-Python: >=3.10
30
+ Description-Content-Type: text/markdown
31
+ License-File: LICENSE
32
+ Requires-Dist: numpy>=1.23
33
+ Requires-Dist: sympy>=1.7.1
34
+ Requires-Dist: beautifulsoup4>=4.9.3
35
+ Requires-Dist: lxml>=4.2.1
36
+ Requires-Dist: trimesh>=4
37
+ Requires-Dist: scipy>=1.9
38
+ Requires-Dist: platformdirs>=4.0
39
+ Provides-Extra: jax
40
+ Requires-Dist: jax>=0.4.40; extra == "jax"
41
+ Provides-Extra: torch
42
+ Requires-Dist: torch>=2.1; extra == "torch"
43
+ Provides-Extra: all
44
+ Requires-Dist: grid-rbd[jax]; extra == "all"
45
+ Requires-Dist: grid-rbd[torch]; extra == "all"
46
+ Provides-Extra: dev
47
+ Requires-Dist: grid-rbd[all]; extra == "dev"
48
+ Requires-Dist: pytest>=7.0; extra == "dev"
49
+ Dynamic: license-file
50
+
51
+ # GRiD
52
+ [![CI](https://img.shields.io/github/actions/workflow/status/A2R-Lab/GRiD/verify-gpu-proof.yml?branch=main&style=flat-square&label=CI)](https://github.com/A2R-Lab/GRiD/actions/workflows/verify-gpu-proof.yml)
53
+ [![docs](https://img.shields.io/github/actions/workflow/status/A2R-Lab/GRiD/gh-pages.yml?branch=main&style=flat-square&label=docs)](https://a2r-lab.org/GRiD/)
54
+ [![license](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](https://github.com/A2R-Lab/GRiD/blob/main/LICENSE)
55
+ [![python](https://img.shields.io/badge/python-3.10%2B-blue?style=flat-square)](https://github.com/A2R-Lab/GRiD/blob/main/pyproject.toml)
56
+ [![agent-ready](https://img.shields.io/badge/agent--ready-CLAUDE.md-8A2BE2?style=flat-square)](https://github.com/A2R-Lab/GRiD/blob/main/CLAUDE.md)
57
+ [![All Contributors](https://img.shields.io/github/all-contributors/A2R-Lab/GRiD?color=ee8449&style=flat-square)](#contributors)
58
+
59
+ A GPU-accelerated library for robot dynamics, kinematics, and collisions, with analytical derivatives and Hessians for supported numerical operations.
60
+
61
+ ![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.](https://raw.githubusercontent.com/A2R-Lab/GRiD/main/docs/imgs/GRiD.png)
62
+
63
+ GRiD turns a URDF into optimized, per-robot CUDA C++ for rigid-body dynamics, kinematics, their analytical
64
+ first- and second-order derivatives and a trajectory-optimization plant layer, then hands you that code three
65
+ ways — a numpy handle, a `jax.jit`-able FFI surface, or `torch.autograd`-aware ops — from one content-addressed
66
+ `.so` cache. One CUDA block per problem, batched, bit-deterministic and thread-count invariant; the same
67
+ model and API rebuild for each target architecture (one artifact per `sm_XX`), with runtime memory
68
+ adaptation from embedded Jetson class devices to desktop GPUs. Website: https://a2r-lab.org/GRiD/.
69
+
70
+ GRiD builds on our [URDFParser](https://github.com/A2R-Lab/URDFParser), [RBDReference](https://github.com/A2R-Lab/RBDReference), and [GLASS](https://github.com/A2R-Lab/GLASS) packages (URDF parsing, Pinocchio-validated reference dynamics, and GPU linear algebra), together with its own bundled code generator. Using its scripts, users can easily generate and test optimized rigid body dynamics CUDA C++ code for their URDF files.
71
+
72
+ **Status: 0.5.0 is the first packaged release and is alpha software.** APIs may still change between
73
+ minor versions; see [CHANGELOG.md](https://github.com/A2R-Lab/GRiD/blob/main/CHANGELOG.md) for what has
74
+ landed since the paper and what is known to be missing. The [original ICRA 2022 paper](https://a2r-lab.org/publication/grid/)
75
+ describes the implementation preserved in the archival [robot-acceleration/GRiD](https://github.com/robot-acceleration/GRiD)
76
+ repository, not the feature set or performance of this release. See the [project website](https://a2r-lab.org/GRiD/)
77
+ for the overview. Collision routines use the generated CUDA interface; numerical Python interface coverage
78
+ is documented separately.
79
+
80
+ ## I want to…
81
+
82
+ | Task | Start here |
83
+ |------|------------|
84
+ | **Call GRiD from Python** (numpy/JAX/torch) | `grid_rbd.load_robot("robot.urdf", backend=...)` — [Python wrappers docs](https://a2r-lab.org/GRiD/user_guide/tutorials/python_wrappers.html) · [agent guide](https://github.com/A2R-Lab/GRiD/blob/main/bindings/examples/AGENT_INTEGRATION_GUIDE.md) |
85
+ | **Generate CUDA for a new robot** | `grid-generate config/robot_assets/iiwa14.urdf` — see Quick Start below |
86
+ | **Fit a humanoid build in RAM** | [fast robot setup](https://a2r-lab.org/GRiD/user_guide/getting_started/fast_robot_setup.html) (`algorithm_list=`, `enable_mujoco_kernels=False`) |
87
+ | **Add an algorithm** | [adding an algorithm](https://a2r-lab.org/GRiD/user_guide/tutorials/adding_an_algorithm.html) |
88
+ | **Run tests / fix a red receipt CI job** | [CUDA validation](https://a2r-lab.org/GRiD/user_guide/tutorials/cuda_validation.html) + `test/run_gpu_proof.sh --help` |
89
+ | **Benchmark** | [benchmarks](https://a2r-lab.org/GRiD/user_guide/tutorials/benchmarks.html) |
90
+ | **Debug a CUDA-vs-numpy mismatch** | [docs/agent_debugging_guide.md](https://github.com/A2R-Lab/GRiD/blob/main/docs/agent_debugging_guide.md) — the bug-class bible |
91
+ | **Get MuJoCo/mjx-convention I/O** | `handle.mujoco.<method>(...)` — values AND derivatives/second-order |
92
+ | **Everything else** | [How do I…?](https://a2r-lab.org/GRiD/how_do_i.html) on the docs site |
93
+
94
+ **Start-here track:** [`examples/README.md`](https://github.com/A2R-Lab/GRiD/blob/main/examples/README.md) routes the four usage tracks — the [`examples/notebooks/`](https://github.com/A2R-Lab/GRiD/tree/main/examples/notebooks/) Python-bindings tour (01-quickstart → 07-inline-cuda), the runnable [`bindings/examples/`](https://github.com/A2R-Lab/GRiD/tree/main/bindings/examples/) scripts, codegen scripts, and hand-written-CUDA walkthroughs.
95
+
96
+ **A checkout contains submodules: run ```git submodule update --init --recursive``` after cloning without `--recursive`.** A PyPI install bundles them.
97
+
98
+ ## Quick Start
99
+
100
+ Install from PyPI (Linux x86-64, Python 3.10–3.12; no GPU or compiler needed to install — robot CUDA is
101
+ compiled by `register_robot` using the `nvcc` on your `PATH`):
102
+ ```shell
103
+ pip install grid-rbd # code generator + numpy backend + grid-generate / grid-spherize CLIs
104
+ pip install "grid-rbd[jax]" # + JAX FFI surface (install a CUDA jax wheel yourself)
105
+ pip install "grid-rbd[torch]" # + torch backend (install a CUDA torch wheel yourself)
106
+ pip install "grid-rbd[all]" # jax + torch
107
+ ```
108
+
109
+ Or work from a checkout (creates a local venv, editable install, registers the CLIs):
110
+ ```shell
111
+ git clone --recursive https://github.com/A2R-Lab/GRiD.git && cd GRiD
112
+ bash install/base_install.sh
113
+ source .venv/bin/activate
114
+ ```
115
+
116
+ Generate CUDA code for your robot (ten ready-to-use URDFs ship in
117
+ `config/robot_assets/` — iiwa14, go2, fr3, g1, h1_2, …):
118
+ ```shell
119
+ # Via the installed CLI (works on a clean base install):
120
+ grid-generate config/robot_assets/iiwa14.urdf # arm, fixed base
121
+ grid-generate config/robot_assets/go2.urdf -f # quadruped, floating base
122
+ grid-generate path/to/robot.urdf [-t EE_JOINT_NAME] [-n NAMESPACE] [-f] [--algorithm-list LIST] [-o OUT.cuh]
123
+
124
+ # Or via a hardcoded zero-config example (these two pull their URDFs from the
125
+ # robot_descriptions package — a DEV dependency; install install/requirements-dev.txt first):
126
+ python examples/codegen/generate_iiwa14.py # iiwa14 fixed base
127
+ python examples/codegen/generate_go2_floating.py # Go2 floating base
128
+ ```
129
+
130
+ Validate and debug:
131
+ ```shell
132
+ # Print CPU reference values for all algorithms:
133
+ python examples/codegen/print_reference_values.py path/to/robot.urdf
134
+
135
+ # Compile and run the CUDA print kernel (requires nvcc):
136
+ python examples/codegen/print_grid.py path/to/robot.urdf
137
+ ```
138
+
139
+ Write your own CUDA kernel against the generated header:
140
+ ```shell
141
+ # Step-by-step walkthrough + compiling/validated example kernels:
142
+ # examples/cuda/README.md (and examples/cuda/wrapper_types.md)
143
+ bash examples/cuda/build_and_validate.sh # generate → nvcc → run → validate
144
+ ```
145
+
146
+ > **Requires a C++17-capable host compiler** (e.g., g++ ≥ 7, clang++ ≥ 5).
147
+ > The benchmark and codegen runtime compile with `-std=c++17` — needed for
148
+ > inline variables in the bench common header. With the `[torch]` extra the
149
+ > per-robot `.so` follows torch's ATen requirement (`-std=c++20` from torch
150
+ > 2.14; needs CUDA 12+ and g++ ≥ 10).
151
+
152
+ ## Usage
153
+ + `grid-generate PATH_TO_URDF` — generate `grid.cuh`; add `-d` for full debug mode, `-f` for floating base, `-t JOINT_NAME` to target a specific end-effector joint
154
+ + `python examples/codegen/print_reference_values.py PATH_TO_URDF` — print CPU reference values for all algorithms to validate CUDA output
155
+ + `python examples/codegen/print_grid.py PATH_TO_URDF` — compile and run the CUDA print kernel against the generated header
156
+
157
+ ## Floating-Base Conventions
158
+ Floating-base parsing and the Python reference path now accept a public
159
+ floating-base convention flag. The default is Pinocchio-compatible:
160
+
161
+ + `floating_base_convention="pinocchio"`:
162
+ `q = [x, y, z, qx, qy, qz, qw]`,
163
+ `v = [vx, vy, vz, wx, wy, wz]`
164
+ + `floating_base_convention="legacy"`:
165
+ `q = [x, y, z, qw, qx, qy, qz]`,
166
+ `v = [wx, wy, wz, vx, vy, vz]`
167
+
168
+ GRiD normalizes both public conventions into one shared internal floating-base
169
+ representation, so the code generator and `RBDReference` stay consistent under
170
+ the hood while callers can choose the input/output ordering they need.
171
+
172
+ ## Developer Testing
173
+
174
+ Contributor-facing test workflows (floating-convention regression suite, CUDA
175
+ equivalence env overrides, shared-memory targets) moved to
176
+ [CONTRIBUTING.md](https://github.com/A2R-Lab/GRiD/blob/main/CONTRIBUTING.md#developer-testing); the receipt/verification
177
+ policy lives in the
178
+ [CUDA validation guide](https://a2r-lab.org/GRiD/user_guide/tutorials/cuda_validation.html).
179
+
180
+
181
+ ## Current Support
182
+ GRiD supports open-chain and tree models with revolute, prismatic, fixed,
183
+ floating, mimic, and additional joint types. Support is operation-specific;
184
+ see the [joint and algorithm restrictions](https://a2r-lab.org/GRiD/docs/user_guide/tutorials/cuda_support_status.html)
185
+ and [backend inventory](https://a2r-lab.org/GRiD/docs/user_guide/tutorials/backend_coverage.html).
186
+
187
+ GRiD implements the full modern rigid-body-dynamics stack: RNEA / CRBA / ABA /
188
+ Minv / forward dynamics; analytical first-order gradients (ID + FD, incl.
189
+ external-force gradients); the second-order derivatives (IDSVA-SO both frames
190
+ with a codegen-time dispatcher, FDSVA-SO); the kinematics family (EE pose /
191
+ Jacobian / Hessian, general-frame `frame_jacobian`/`J̇`/OSC inertia, runtime
192
+ multi-EE targets); integrators + integrator gradients; the centroidal family
193
+ (CoM, CCRBA, `dccrba`, CMM time-variation, Coriolis matrix, energy/ID
194
+ regressors); the inertial-parameter (π) family (the joint-torque regressor
195
+ `Y` with its analytic gradient ∂Y/∂(q,v) and the FD parameter gradient
196
+ ∂q̈/∂π); contact-frame wrench mapping (`contact_fext` /
197
+ `register_robot(contact_frames=...)`); runtime tool/payload welding
198
+ (`attach_tool`/`tool_fext`); runtime multi-target positions; the collision
199
+ family (two-tier `config_free`); a trajectory-optimization `grid_plant`
200
+ cost/step layer; and
201
+ runtime-mutable inertia/transform/joint-dynamics tables. The **complete
202
+ per-algorithm catalog with citations and per-feature detail** lives in the
203
+ [CUDA support status page](https://a2r-lab.org/GRiD/user_guide/tutorials/cuda_support_status.html).
204
+
205
+ `RBDReference` additionally provides numpy reference oracles — validated against [Pinocchio](https://github.com/stack-of-tasks/pinocchio) — for generalized gravity, nonlinear effects, kinetic/potential/mechanical energy, the Coriolis matrix, the centroidal quantities (CoM, CoM Jacobian, CCRBA, centroidal momentum) and their derivatives (the analytic `dccrba` ∂A/∂q tensor — replacing the prior finite-difference oracle — and `cmm_time_variation` Ȧ), the inverse-dynamics and kinetic/potential-energy regressors, the general-frame Jacobian / J̇ / OSC inertia described above, and the plant/cost/barrier layer above.
206
+
207
+ **Dual-surface equivalence.** Every algorithm exists on two surfaces that are tested for numerical agreement: the `RBDReference` numpy implementation (the oracle, checked against Pinocchio) and the generated CUDA C++ kernels (checked against that same numpy reference). This keeps the GPU codegen honest against an independent, Pinocchio-validated baseline.
208
+
209
+ **Mimic-joint support:** per-robot gating is now essentially eliminated. Non-gradient algorithms (RNEA, forward dynamics, ABA, CRBA, …) work for robots with mimic joints, and every **gradient** emits a correct mimic-reduced result on **both** the fixed and floating base: `inverse_dynamics_gradient`/`forward_dynamics_gradient`, `end_effector_pose_gradient`/`end_effector_pose_hessian`, the second-order `idsva_so`/`fdsva_so`, the external-force gradients (`f_ext_gradient`), and the integrator gradients. The centroidal family — `com`, `ccrba`, `energy`, and the centroidal derivatives `dccrba`/`cmm_time_variation` — now also runs on mimic robots (the per-body Jacobian and per-unit motion columns carry the mimic multiplier α, validated against the mimic-aware reference). `dccrba`/`cmm_time_variation` additionally run on big floating-base robots (e.g. `g1`/`h1_2`-floating) via the sweep-pool spill path. No algorithm raises `NotImplementedError` for mimic robots anymore.
210
+
211
+ Additional algorithms and features are in development. If you have a particular algorithm or feature in mind please let us know by posting a GitHub issue. We'd also love your collaboration in implementing the Python reference implementation of any algorithm you'd like implemented!
212
+
213
+ ## Repo map
214
+
215
+ | Directory | Owns | Entry doc |
216
+ |-----------|------|-----------|
217
+ | `grid_codegen/` | the code-generation engine: emits `grid.cuh` AND the checked-in generated binding regions, all driven by the `abi_specs.py` table | [codegen architecture](https://a2r-lab.org/GRiD/user_guide/concepts/codegen_architecture.html) |
218
+ | `bindings/` | the `grid-rbd` Python package (numpy/jax/torch handles over a cached per-robot `.so`) | [`bindings/README.md`](https://github.com/A2R-Lab/GRiD/blob/main/bindings/README.md) · [agent guide](https://github.com/A2R-Lab/GRiD/blob/main/bindings/examples/AGENT_INTEGRATION_GUIDE.md) |
219
+ | `external/` | the peer-product submodules: `GLASS` (GPU linear algebra), `RBDReference` (Pinocchio-validated numpy oracle), `URDFParser` | each submodule's README |
220
+ | `examples/` | the start-here track: `notebooks/` (Python tour), `codegen/`, `cuda/` | [`examples/README.md`](https://github.com/A2R-Lab/GRiD/blob/main/examples/README.md) |
221
+ | `test/` | pytest suites + the split-suite/receipt machinery (`run_split_suite.py`, `run_gpu_proof.sh`, `compile_sched.py`) | [CUDA validation](https://a2r-lab.org/GRiD/user_guide/tutorials/cuda_validation.html) |
222
+ | `config/` | ten sample URDFs (`robot_assets/`) + tuned per-GPU launch configs (`launch_configs/`) + `autotune_robot.sh` | `config/robot_assets/URDF_SOURCES.md` |
223
+ | `docs/` | the Sphinx site (`source/`) + `agent_debugging_guide.md` (the bug-class bible) | [docs site](https://a2r-lab.org/GRiD/) |
224
+ | `install/` | install scripts (`base_install.sh`, `developer_install.sh`) + requirements files | [installation guide](https://a2r-lab.org/GRiD/user_guide/getting_started/installation.html) |
225
+
226
+ ## C++ API
227
+ The generated external interface has three layers: `*_device` (algorithm-specific
228
+ buffer and scratch contract, with placement owned by the device function),
229
+ `*_kernel` (global entry point with batched timestep loop), and the
230
+ host wrapper (CPU launcher with H↔D copies). Internal `*_inner` helpers support
231
+ composition without repeating shared setup. See the
232
+ [codegen architecture docs](https://a2r-lab.org/GRiD/user_guide/concepts/codegen_architecture.html)
233
+ for the rationale and concrete signatures.
234
+
235
+ ## Python API (`grid-rbd`)
236
+
237
+ For Python users the `grid-rbd` package (in [`bindings/`](https://github.com/A2R-Lab/GRiD/tree/main/bindings/)) wraps
238
+ the per-robot codegen behind a register-then-run UX with `numpy`, `jax`,
239
+ and `torch` backends. It ships in the same `grid-rbd` distribution as the code generator, so
240
+ `pip install grid-rbd` (or `pip install -e .` from a checkout, what `install/base_install.sh` runs)
241
+ installs the codegen toolkit *and* the `grid_rbd` wrapper together. The base install is minimal;
242
+ pick a backend extra for the surface you want:
243
+
244
+ ```bash
245
+ pip install grid-rbd # base: numpy backend only
246
+ pip install "grid-rbd[jax]" # + JAX FFI surface
247
+ pip install "grid-rbd[torch]" # + torch backend (CUDA wheel matching your GPU arch)
248
+ pip install "grid-rbd[all]" # jax + torch
249
+ ```
250
+
251
+ See the [install matrix in `bindings/README.md`](https://github.com/A2R-Lab/GRiD/blob/main/bindings/README.md#install-editable-from-a-grid-checkout)
252
+ for what each extra unlocks (and the torch CUDA-wheel note).
253
+
254
+ ```python
255
+ import grid_rbd
256
+
257
+ # numpy (default), jax, or torch; urdf_string= also accepted instead of urdf_path
258
+ handle = grid_rbd.register_robot("iiwa14", urdf_path="iiwa.urdf", backend="torch")
259
+
260
+ qdd = handle.forward_dynamics(q, qd, u) # autograd-aware torch.Tensor
261
+ qdd.sum().backward() # gradients flow to q, qd, u
262
+ ```
263
+
264
+ The `torch` backend exposes autograd-aware `inverse_dynamics` / `forward_dynamics` /
265
+ `aba` / `integrator` (analytic backward passes) plus CUDA-Graphs capture,
266
+ and the handle also surfaces the `grid_plant` cost/barrier methods. `inverse_dynamics`
267
+ (alias `rnea`) takes an optional `qdd=` (the
268
+ autograd gradient is qdd-aware, returning the correct ∂τ/∂(q,q̇) including the
269
+ ∂(M·q̈)/∂q term), and all three backends expose the value ops `coriolis_matrix`,
270
+ `kinetic_energy_regressor`, `potential_energy_regressor`, `dccrba`, and
271
+ `cmm_time_variation` (forward-only on jax/torch). The π-regressor family
272
+ (`inverse_dynamics_regressor`, the differentiable
273
+ `inverse_dynamics_wrt_params`/`forward_dynamics_wrt_params`, and the
274
+ `forward_dynamics_parameter_gradient` ∂q̈/∂π), runtime tool welding
275
+ (`attach_tool`/`tool_fext`, via `enable_tool=True`), and multi-contact
276
+ wrench mapping (`contact_fext`, via `register_robot(contact_frames=[...])`)
277
+ are bound as well. For true fp64 compute build with
278
+ `register_robot(..., dtype="float64")` (its own cache entry); `allow_fp64=True`
279
+ is only the numpy handle's fp64-in/fp64-out convenience cast on an fp32 build
280
+ (ignored when `dtype="float64"`). See
281
+ [`bindings/README.md`](https://github.com/A2R-Lab/GRiD/blob/main/bindings/README.md) and the
282
+ [Python wrappers docs](https://a2r-lab.org/GRiD/user_guide/tutorials/python_wrappers.html).
283
+
284
+ ## Citing GRiD
285
+ To cite GRiD in your research, please use the following bibtex for our paper ["GRiD: GPU-Accelerated Rigid Body Dynamics with Analytical Gradients"](https://brianplancher.com/publication/grid/):
286
+ ```
287
+ @inproceedings{plancher2022grid,
288
+ title={GRiD: GPU-Accelerated Rigid Body Dynamics with Analytical Gradients},
289
+ author={Brian Plancher and Sabrina M. Neuman and Radhika Ghosal and Scott Kuindersma and Vijay Janapa Reddi},
290
+ booktitle={IEEE International Conference on Robotics and Automation (ICRA)},
291
+ year={2022},
292
+ month={May}
293
+ }
294
+ ```
295
+
296
+ ## Performance
297
+ Release measurements from the 27 September 2026 run on one NVIDIA RTX 5090 with an Intel Core Ultra 9 285K cover RNEA,
298
+ its analytical gradient (∇RNEA), and its analytical Hessian (∇²RNEA) on iiwa14 (fixed base, 7 velocities), go2
299
+ (floating base, 18), and G1 (floating base, 35) at batch sizes 16–1024. The
300
+ [release measurements](https://a2r-lab.org/GRiD/release_measurements.html) page gives the method, every timing boundary, and the
301
+ caveats; the [benchmark harness](https://github.com/A2R-Lab/GRiD/tree/main/test/benchmarks/) reproduces the collection.
302
+
303
+ ![Core-operation speedups against seven baseline modes, with timing boundaries and fp64 exceptions labeled.](https://raw.githubusercontent.com/A2R-Lab/GRiD/main/docs/source/_static/release/speedup_core.png)
304
+
305
+ Ratios are baseline time divided by GRiD time; above 1× favors GRiD. Each column names its timing boundary: GRiD host
306
+ calls including copies against the CPU libraries, and GRiD compute-only calls against the GPU libraries' resident
307
+ calls. `*` marks cells where the evaluated baseline path required fp64 and `~` a side whose run means span more than
308
+ 1.5×. Colors are clipped at 100×.
309
+
310
+ ![Clustered GRiD, Pinocchio and MuJoCo timing bars on three robots; Hessians compare GRiD with Pinocchio's standard API only.](https://raw.githubusercontent.com/A2R-Lab/GRiD/main/docs/source/_static/release/stacked_core.png)
311
+
312
+ Microseconds per complete batch on a log axis. GRiD's bar splits into its CUDA compute-only call, the GPU–CPU I/O
313
+ increment, and the JAX wrapper increment. These are differences of measured call times, not isolated measurements of
314
+ each component.
315
+
316
+ ![Call wall times for RNEA, its gradient and its Hessian on three robots: a no-I/O group (CUDA Device, PyTorch resident, JAX resident) beside a host-call group (C++ Host, NumPy, PyTorch, JAX); Python host bars are solid to the allocate-once call and hatched up to the default call.](https://raw.githubusercontent.com/A2R-Lab/GRiD/main/docs/source/_static/release/wrappers.png)
317
+
318
+ Call wall times through each API boundary: native CUDA, the C++ host call, NumPy, PyTorch, and JAX. Pick the
319
+ boundary your application uses. For the Python surfaces the solid bar is the call with its buffers allocated once
320
+ and reused (measured 2 October 2026), and the hatched cap reaches the default call, which allocates its output every
321
+ time. With reused buffers, NumPy and PyTorch land within a few percent of the C++ host call on large outputs.
322
+
323
+ ## Installation
324
+ The Quick Start above covers the common-case install. For CUDA Toolkit
325
+ setup, developer dependencies (Pinocchio, robot_descriptions, benchmarks),
326
+ and Docker, see the full
327
+ [installation guide](https://a2r-lab.org/GRiD/user_guide/getting_started/installation.html).
328
+
329
+ ## Troubleshooting
330
+
331
+ ### Bench harness `nvcc` hangs on floating-base kernels (sm_8x)
332
+
333
+ On Ampere (sm_86 / CUDA 12.6) the bench harness can wedge `nvcc` /
334
+ `ptxas` at 100 % CPU when compiling heavy floating-base GRiD harnesses.
335
+ Pass `--ptxas-opt-level 2` to `test/benchmarks/run_multi_version.py` — it
336
+ forwards `-Xptxas -O2` to floating-base compiles only. Blackwell (sm_120) does
337
+ not hit this. Typical user code that includes `grid.cuh` and calls the
338
+ batch host wrappers (e.g. `grid::forward_dynamics<T>(...)`) does not
339
+ trigger the hang — it's specific to the timing-bench template surface.
340
+
341
+
342
+ ## Contributing
343
+
344
+ Contributions welcome — see [CONTRIBUTING.md](https://github.com/A2R-Lab/GRiD/blob/main/CONTRIBUTING.md) for the
345
+ workflow (and [CLAUDE.md](https://github.com/A2R-Lab/GRiD/blob/main/CLAUDE.md) for the repo conventions AI agents and
346
+ humans both follow).
347
+
348
+ ## Contributors
349
+
350
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
351
+ <!-- prettier-ignore-start -->
352
+ <!-- markdownlint-disable -->
353
+ <table>
354
+ <tbody>
355
+ <tr>
356
+ <td align="center" valign="top" width="20%"><a href="https://github.com/plancherb1"><img src="https://avatars.githubusercontent.com/plancherb1?s=100" width="100px;" alt="Brian Plancher"/><br /><sub><b>Brian Plancher</b></sub></a><br /></td>
357
+ <td align="center" valign="top" width="20%"><a href="https://github.com/Z4KH"><img src="https://avatars.githubusercontent.com/Z4KH?s=100" width="100px;" alt="Zachary Pestrikov"/><br /><sub><b>Zachary Pestrikov</b></sub></a><br /></td>
358
+ <td align="center" valign="top" width="20%"><a href="https://github.com/kawotwi"><img src="https://avatars.githubusercontent.com/kawotwi?s=100" width="100px;" alt="Kwamena A"/><br /><sub><b>Kwamena A</b></sub></a><br /></td>
359
+ <td align="center" valign="top" width="20%"><a href="https://github.com/anncli"><img src="https://avatars.githubusercontent.com/anncli?s=100" width="100px;" alt="Ann Li"/><br /><sub><b>Ann Li</b></sub></a><br /></td>
360
+ <td align="center" valign="top" width="20%"><a href="https://github.com/caelyasutake"><img src="https://avatars.githubusercontent.com/caelyasutake?s=100" width="100px;" alt="Cael Yasutake"/><br /><sub><b>Cael Yasutake</b></sub></a><br /></td>
361
+ </tr>
362
+ <tr>
363
+ <td align="center" valign="top" width="20%"><a href="https://github.com/pruyontrarakk"><img src="https://avatars.githubusercontent.com/pruyontrarakk?s=100" width="100px;" alt="pruyontrarakk"/><br /><sub><b>pruyontrarakk</b></sub></a><br /></td>
364
+ <td align="center" valign="top" width="20%"><a href="https://github.com/the-eater"><img src="https://avatars.githubusercontent.com/the-eater?s=100" width="100px;" alt="="/><br /><sub><b>=</b></sub></a><br /></td>
365
+ </tr>
366
+ </tbody>
367
+ </table>
368
+
369
+ <!-- markdownlint-restore -->
370
+ <!-- prettier-ignore-end -->
371
+
372
+ <!-- ALL-CONTRIBUTORS-LIST:END -->