srb 0.0.1__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 (433) hide show
  1. srb-0.0.1/.devcontainer/devcontainer.json +57 -0
  2. srb-0.0.1/.devcontainer/open.bash +30 -0
  3. srb-0.0.1/.docker/build.bash +40 -0
  4. srb-0.0.1/.docker/demo.bash +29 -0
  5. srb-0.0.1/.docker/dev.bash +51 -0
  6. srb-0.0.1/.docker/host/extract_isaacsim.bash +89 -0
  7. srb-0.0.1/.docker/host/install_docker.bash +130 -0
  8. srb-0.0.1/.docker/hpc/build.bash +51 -0
  9. srb-0.0.1/.docker/hpc/run.bash +94 -0
  10. srb-0.0.1/.docker/hpc/submit.bash +65 -0
  11. srb-0.0.1/.docker/join.bash +96 -0
  12. srb-0.0.1/.docker/run.bash +222 -0
  13. srb-0.0.1/.dockerignore +59 -0
  14. srb-0.0.1/.github/dependabot.yml +11 -0
  15. srb-0.0.1/.github/workflows/dependabot.yml +25 -0
  16. srb-0.0.1/.github/workflows/docker.yml +91 -0
  17. srb-0.0.1/.github/workflows/docs.yml +50 -0
  18. srb-0.0.1/.github/workflows/pre-commit.yml +32 -0
  19. srb-0.0.1/.github/workflows/python.yml +53 -0
  20. srb-0.0.1/.github/workflows/rust.yml +157 -0
  21. srb-0.0.1/.gitignore +40 -0
  22. srb-0.0.1/.gitmodules +4 -0
  23. srb-0.0.1/.pre-commit-config.yaml +87 -0
  24. srb-0.0.1/.vscode/settings.json +578 -0
  25. srb-0.0.1/CMakeLists.txt +21 -0
  26. srb-0.0.1/Cargo.lock +4867 -0
  27. srb-0.0.1/Cargo.toml +19 -0
  28. srb-0.0.1/Dockerfile +386 -0
  29. srb-0.0.1/LICENSE-APACHE +176 -0
  30. srb-0.0.1/LICENSE-MIT +21 -0
  31. srb-0.0.1/PKG-INFO +145 -0
  32. srb-0.0.1/README.md +30 -0
  33. srb-0.0.1/apps/srb.barebones.kit +156 -0
  34. srb-0.0.1/apps/srb.headless.kit +31 -0
  35. srb-0.0.1/apps/srb.headless.rendering.kit +34 -0
  36. srb-0.0.1/apps/srb.kit +44 -0
  37. srb-0.0.1/apps/srb.rendering.kit +35 -0
  38. srb-0.0.1/assets/update.bash +22 -0
  39. srb-0.0.1/crates/srb/Cargo.toml +18 -0
  40. srb-0.0.1/crates/srb/src/lib.rs +1 -0
  41. srb-0.0.1/crates/srb_gui/Cargo.toml +56 -0
  42. srb-0.0.1/crates/srb_gui/assets/fonts/Inter-Regular.otf +0 -0
  43. srb-0.0.1/crates/srb_gui/assets/fonts/MaterialIconsRound-Regular.otf +0 -0
  44. srb-0.0.1/crates/srb_gui/assets/fonts/MonaspaceNeon-Medium.otf +0 -0
  45. srb-0.0.1/crates/srb_gui/build.rs +4 -0
  46. srb-0.0.1/crates/srb_gui/content/_images/debris_capture_orbit.jpg +0 -0
  47. srb-0.0.1/crates/srb_gui/content/_images/gateway.jpg +0 -0
  48. srb-0.0.1/crates/srb_gui/content/_images/ingenuity.jpg +0 -0
  49. srb-0.0.1/crates/srb_gui/content/_images/peg_in_hole_moon.jpg +0 -0
  50. srb-0.0.1/crates/srb_gui/content/_images/peg_in_hole_orbit.jpg +0 -0
  51. srb-0.0.1/crates/srb_gui/content/_images/perseverance.jpg +0 -0
  52. srb-0.0.1/crates/srb_gui/content/_images/sample_collection_mars.jpg +0 -0
  53. srb-0.0.1/crates/srb_gui/content/_images/sample_collection_moon.jpg +0 -0
  54. srb-0.0.1/crates/srb_gui/content/_images/solar_panel_assembly_moon.jpg +0 -0
  55. srb-0.0.1/crates/srb_gui/content/about.md +7 -0
  56. srb-0.0.1/crates/srb_gui/content/controls.md +1 -0
  57. srb-0.0.1/crates/srb_gui/src/app.rs +1472 -0
  58. srb-0.0.1/crates/srb_gui/src/config.rs +163 -0
  59. srb-0.0.1/crates/srb_gui/src/consts.rs +3 -0
  60. srb-0.0.1/crates/srb_gui/src/lib.rs +12 -0
  61. srb-0.0.1/crates/srb_gui/src/macros/fonts.rs +47 -0
  62. srb-0.0.1/crates/srb_gui/src/macros/include.rs +24 -0
  63. srb-0.0.1/crates/srb_gui/src/macros/mod.rs +5 -0
  64. srb-0.0.1/crates/srb_gui/src/main.rs +28 -0
  65. srb-0.0.1/crates/srb_gui/src/page.rs +33 -0
  66. srb-0.0.1/crates/srb_gui/src/style/fonts.rs +20 -0
  67. srb-0.0.1/crates/srb_gui/src/style/mod.rs +23 -0
  68. srb-0.0.1/crates/srb_gui/src/style/text.rs +24 -0
  69. srb-0.0.1/crates/srb_gui/src/style/visuals.rs +207 -0
  70. srb-0.0.1/crates/srb_gui/src/utils/egui.rs +98 -0
  71. srb-0.0.1/crates/srb_gui/src/utils/enums.rs +116 -0
  72. srb-0.0.1/crates/srb_gui/src/utils/mod.rs +6 -0
  73. srb-0.0.1/crates/srb_py/Cargo.toml +18 -0
  74. srb-0.0.1/crates/srb_py/src/lib.rs +1 -0
  75. srb-0.0.1/crates/srb_sys/Cargo.toml +18 -0
  76. srb-0.0.1/crates/srb_sys/src/lib.rs +1 -0
  77. srb-0.0.1/deny.toml +50 -0
  78. srb-0.0.1/docs/.gitignore +2 -0
  79. srb-0.0.1/docs/README.md +11 -0
  80. srb-0.0.1/docs/book.toml +10 -0
  81. srb-0.0.1/docs/src/README.md +29 -0
  82. srb-0.0.1/docs/src/SUMMARY.md +62 -0
  83. srb-0.0.1/docs/src/_images/perseverance_ui.jpg +0 -0
  84. srb-0.0.1/docs/src/_images/srb_gui.jpg +0 -0
  85. srb-0.0.1/docs/src/_images/srb_multi_env.jpg +0 -0
  86. srb-0.0.1/docs/src/development/dev_env/README.md +6 -0
  87. srb-0.0.1/docs/src/development/dev_env/dev_container.md +15 -0
  88. srb-0.0.1/docs/src/development/dev_env/docker.md +11 -0
  89. srb-0.0.1/docs/src/development/new_assets/README.md +5 -0
  90. srb-0.0.1/docs/src/development/new_assets/procgen.md +19 -0
  91. srb-0.0.1/docs/src/development/new_envs.md +19 -0
  92. srb-0.0.1/docs/src/getting_started/installation/README.md +7 -0
  93. srb-0.0.1/docs/src/getting_started/installation/docker.md +51 -0
  94. srb-0.0.1/docs/src/getting_started/requirements.md +36 -0
  95. srb-0.0.1/docs/src/getting_started/usage.md +91 -0
  96. srb-0.0.1/docs/src/instructions/benchmark/README.md +9 -0
  97. srb-0.0.1/docs/src/instructions/benchmark/cfg.md +51 -0
  98. srb-0.0.1/docs/src/instructions/benchmark/gui.md +15 -0
  99. srb-0.0.1/docs/src/instructions/benchmark/parallel_envs.md +13 -0
  100. srb-0.0.1/docs/src/instructions/benchmark/random_zero_agents.md +19 -0
  101. srb-0.0.1/docs/src/instructions/benchmark/visual_observations.md +9 -0
  102. srb-0.0.1/docs/src/instructions/utils/README.md +5 -0
  103. srb-0.0.1/docs/src/instructions/utils/clean_cache.md +7 -0
  104. srb-0.0.1/docs/src/instructions/workflows/README.md +5 -0
  105. srb-0.0.1/docs/src/instructions/workflows/ros2.md +101 -0
  106. srb-0.0.1/docs/src/misc/attributions.md +10 -0
  107. srb-0.0.1/docs/src/misc/contributors.md +3 -0
  108. srb-0.0.1/docs/src/misc/troubleshooting.md +19 -0
  109. srb-0.0.1/docs/src/overview/envs/README.md +19 -0
  110. srb-0.0.1/docs/src/overview/envs/manipulation.md +118 -0
  111. srb-0.0.1/docs/src/overview/envs/mobile.md +6 -0
  112. srb-0.0.1/docs/src/overview/envs/mobile_aerial.md +15 -0
  113. srb-0.0.1/docs/src/overview/envs/mobile_wheeled.md +15 -0
  114. srb-0.0.1/docs/src/overview/integrations/README.md +5 -0
  115. srb-0.0.1/docs/src/overview/integrations/ros2.md +15 -0
  116. srb-0.0.1/docs/theme/favicon.png +0 -0
  117. srb-0.0.1/docs/theme/favicon.svg +13 -0
  118. srb-0.0.1/hyperparams/dreamerv3.yaml +68 -0
  119. srb-0.0.1/hyperparams/robomimic/bc.json +217 -0
  120. srb-0.0.1/hyperparams/robomimic/bcq.json +237 -0
  121. srb-0.0.1/hyperparams/robomimic/cql.json +184 -0
  122. srb-0.0.1/hyperparams/robomimic/gl.json +186 -0
  123. srb-0.0.1/hyperparams/robomimic/hbc.json +293 -0
  124. srb-0.0.1/hyperparams/robomimic/iql.json +194 -0
  125. srb-0.0.1/hyperparams/robomimic/iris.json +465 -0
  126. srb-0.0.1/hyperparams/robomimic/td3_bc.json +167 -0
  127. srb-0.0.1/hyperparams/sb3/ppo.yaml +16 -0
  128. srb-0.0.1/hyperparams/sb3/ppo_lstm.yaml +16 -0
  129. srb-0.0.1/hyperparams/sb3/sac.yaml +0 -0
  130. srb-0.0.1/hyperparams/sbx/ppo.yaml +17 -0
  131. srb-0.0.1/hyperparams/sbx/sac.yaml +0 -0
  132. srb-0.0.1/hyperparams/skrl/ppo.yaml +82 -0
  133. srb-0.0.1/hyperparams/skrl/ppo_rnn.yaml +82 -0
  134. srb-0.0.1/package.xml +24 -0
  135. srb-0.0.1/pyproject.toml +157 -0
  136. srb-0.0.1/scripts/download_isaacsim.bash +51 -0
  137. srb-0.0.1/scripts/download_isaacsim_assets.bash +48 -0
  138. srb-0.0.1/srb/__init__.py +0 -0
  139. srb-0.0.1/srb/__main__.py +1611 -0
  140. srb-0.0.1/srb/_typing/__init__.py +14 -0
  141. srb-0.0.1/srb/_typing/cfg.py +13 -0
  142. srb-0.0.1/srb/_typing/enum.py +5 -0
  143. srb-0.0.1/srb/_typing/step_return.py +25 -0
  144. srb-0.0.1/srb/assets/__init__.py +3 -0
  145. srb-0.0.1/srb/assets/object/__init__.py +20 -0
  146. srb-0.0.1/srb/assets/object/asteroid.py +25 -0
  147. srb-0.0.1/srb/assets/object/beneficiation_unit.py +29 -0
  148. srb-0.0.1/srb/assets/object/debris.py +27 -0
  149. srb-0.0.1/srb/assets/object/light/__init__.py +0 -0
  150. srb-0.0.1/srb/assets/object/payload/__init__.py +1 -0
  151. srb-0.0.1/srb/assets/object/payload/cargo_bay.py +22 -0
  152. srb-0.0.1/srb/assets/object/peg_in_hole.py +93 -0
  153. srb-0.0.1/srb/assets/object/rock.py +40 -0
  154. srb-0.0.1/srb/assets/object/sample.py +28 -0
  155. srb-0.0.1/srb/assets/object/shape.py +18 -0
  156. srb-0.0.1/srb/assets/object/solar_panel.py +26 -0
  157. srb-0.0.1/srb/assets/object/tool/__init__.py +4 -0
  158. srb-0.0.1/srb/assets/object/tool/allegro_hand.py +65 -0
  159. srb-0.0.1/srb/assets/object/tool/franka_hand.py +67 -0
  160. srb-0.0.1/srb/assets/object/tool/scoop.py +29 -0
  161. srb-0.0.1/srb/assets/object/tool/shadow_hand.py +93 -0
  162. srb-0.0.1/srb/assets/robot/__init__.py +5 -0
  163. srb-0.0.1/srb/assets/robot/manipulation/__init__.py +15 -0
  164. srb-0.0.1/srb/assets/robot/manipulation/canadarm3.py +107 -0
  165. srb-0.0.1/srb/assets/robot/manipulation/franka.py +115 -0
  166. srb-0.0.1/srb/assets/robot/manipulation/kinova.py +306 -0
  167. srb-0.0.1/srb/assets/robot/manipulation/unitree.py +96 -0
  168. srb-0.0.1/srb/assets/robot/manipulation/universal_robots.py +740 -0
  169. srb-0.0.1/srb/assets/robot/mobile/__init__.py +11 -0
  170. srb-0.0.1/srb/assets/robot/mobile/agility.py +124 -0
  171. srb-0.0.1/srb/assets/robot/mobile/anymal.py +233 -0
  172. srb-0.0.1/srb/assets/robot/mobile/boston_dynamics.py +206 -0
  173. srb-0.0.1/srb/assets/robot/mobile/crazyflie.py +100 -0
  174. srb-0.0.1/srb/assets/robot/mobile/cubesat.py +51 -0
  175. srb-0.0.1/srb/assets/robot/mobile/fictionlab.py +81 -0
  176. srb-0.0.1/srb/assets/robot/mobile/gateway.py +50 -0
  177. srb-0.0.1/srb/assets/robot/mobile/ingenuity.py +91 -0
  178. srb-0.0.1/srb/assets/robot/mobile/mars_rover.py +123 -0
  179. srb-0.0.1/srb/assets/robot/mobile/perseverance.py +124 -0
  180. srb-0.0.1/srb/assets/robot/mobile/unitree.py +261 -0
  181. srb-0.0.1/srb/assets/robot/mobile_manipulation/__init__.py +7 -0
  182. srb-0.0.1/srb/assets/robot/mobile_manipulation/combined.py +58 -0
  183. srb-0.0.1/srb/assets/robot/mobile_manipulation/generic_humanoid.py +145 -0
  184. srb-0.0.1/srb/assets/robot/mobile_manipulation/unitree.py +266 -0
  185. srb-0.0.1/srb/assets/scenery/__init__.py +3 -0
  186. srb-0.0.1/srb/assets/scenery/gateway.py +15 -0
  187. srb-0.0.1/srb/assets/scenery/ground_plane.py +11 -0
  188. srb-0.0.1/srb/assets/scenery/planetary_surface.py +35 -0
  189. srb-0.0.1/srb/core/__init__.py +0 -0
  190. srb-0.0.1/srb/core/action/__init__.py +6 -0
  191. srb-0.0.1/srb/core/action/action_group.py +53 -0
  192. srb-0.0.1/srb/core/action/group/__init__.py +3 -0
  193. srb-0.0.1/srb/core/action/group/common/__init__.py +11 -0
  194. srb-0.0.1/srb/core/action/group/common/body.py +13 -0
  195. srb-0.0.1/srb/core/action/group/common/joint.py +74 -0
  196. srb-0.0.1/srb/core/action/group/manipulation/__init__.py +4 -0
  197. srb-0.0.1/srb/core/action/group/manipulation/task_space.py +29 -0
  198. srb-0.0.1/srb/core/action/group/mobile/__init__.py +3 -0
  199. srb-0.0.1/srb/core/action/group/mobile/multi_copter.py +20 -0
  200. srb-0.0.1/srb/core/action/group/mobile/non_holonomic.py +15 -0
  201. srb-0.0.1/srb/core/action/group/mobile/wheeled.py +17 -0
  202. srb-0.0.1/srb/core/action/term/__init__.py +4 -0
  203. srb-0.0.1/srb/core/action/term/common/__init__.py +2 -0
  204. srb-0.0.1/srb/core/action/term/common/body_vel.py +43 -0
  205. srb-0.0.1/srb/core/action/term/common/dummy.py +40 -0
  206. srb-0.0.1/srb/core/action/term/manipulation/__init__.py +4 -0
  207. srb-0.0.1/srb/core/action/term/manipulation/differential_ik.py +82 -0
  208. srb-0.0.1/srb/core/action/term/mobile/__init__.py +8 -0
  209. srb-0.0.1/srb/core/action/term/mobile/multi_copter.py +123 -0
  210. srb-0.0.1/srb/core/action/term/mobile/wheeled_rover.py +242 -0
  211. srb-0.0.1/srb/core/action/term/mobile_manipulation/__init__.py +0 -0
  212. srb-0.0.1/srb/core/actuator/__init__.py +1 -0
  213. srb-0.0.1/srb/core/app/__init__.py +1 -0
  214. srb-0.0.1/srb/core/asset/__init__.py +10 -0
  215. srb-0.0.1/srb/core/asset/asset.py +302 -0
  216. srb-0.0.1/srb/core/asset/asset_type.py +18 -0
  217. srb-0.0.1/srb/core/asset/asset_variant.py +18 -0
  218. srb-0.0.1/srb/core/asset/common/__init__.py +2 -0
  219. srb-0.0.1/srb/core/asset/common/frame.py +8 -0
  220. srb-0.0.1/srb/core/asset/common/transform.py +8 -0
  221. srb-0.0.1/srb/core/asset/object/__init__.py +4 -0
  222. srb-0.0.1/srb/core/asset/object/light.py +12 -0
  223. srb-0.0.1/srb/core/asset/object/object.py +114 -0
  224. srb-0.0.1/srb/core/asset/object/object_type.py +19 -0
  225. srb-0.0.1/srb/core/asset/object/payload.py +12 -0
  226. srb-0.0.1/srb/core/asset/object/tool.py +30 -0
  227. srb-0.0.1/srb/core/asset/robot/__init__.py +5 -0
  228. srb-0.0.1/srb/core/asset/robot/manipulation/__init__.py +3 -0
  229. srb-0.0.1/srb/core/asset/robot/manipulation/manipulator.py +133 -0
  230. srb-0.0.1/srb/core/asset/robot/manipulation/manipulator_type.py +16 -0
  231. srb-0.0.1/srb/core/asset/robot/manipulation/serial_manipulator.py +15 -0
  232. srb-0.0.1/srb/core/asset/robot/mobile/__init__.py +5 -0
  233. srb-0.0.1/srb/core/asset/robot/mobile/aerial_robot.py +22 -0
  234. srb-0.0.1/srb/core/asset/robot/mobile/ground_robot.py +29 -0
  235. srb-0.0.1/srb/core/asset/robot/mobile/mobile_robot.py +131 -0
  236. srb-0.0.1/srb/core/asset/robot/mobile/mobile_robot_type.py +18 -0
  237. srb-0.0.1/srb/core/asset/robot/mobile/orbital_robot.py +16 -0
  238. srb-0.0.1/srb/core/asset/robot/mobile_manipulation/__init__.py +7 -0
  239. srb-0.0.1/srb/core/asset/robot/mobile_manipulation/combined/__init__.py +4 -0
  240. srb-0.0.1/srb/core/asset/robot/mobile_manipulation/combined/_metaclass.py +33 -0
  241. srb-0.0.1/srb/core/asset/robot/mobile_manipulation/combined/aerial_manipulator.py +26 -0
  242. srb-0.0.1/srb/core/asset/robot/mobile_manipulation/combined/ground_manipulator.py +26 -0
  243. srb-0.0.1/srb/core/asset/robot/mobile_manipulation/combined/orbital_manipulator.py +26 -0
  244. srb-0.0.1/srb/core/asset/robot/mobile_manipulation/humanoid.py +29 -0
  245. srb-0.0.1/srb/core/asset/robot/mobile_manipulation/mobile_manipulator.py +143 -0
  246. srb-0.0.1/srb/core/asset/robot/mobile_manipulation/mobile_manipulator_type.py +19 -0
  247. srb-0.0.1/srb/core/asset/robot/robot.py +120 -0
  248. srb-0.0.1/srb/core/asset/robot/robot_type.py +18 -0
  249. srb-0.0.1/srb/core/asset/scenery/__init__.py +6 -0
  250. srb-0.0.1/srb/core/asset/scenery/extravehicular.py +16 -0
  251. srb-0.0.1/srb/core/asset/scenery/intravehicular.py +16 -0
  252. srb-0.0.1/srb/core/asset/scenery/scenery.py +120 -0
  253. srb-0.0.1/srb/core/asset/scenery/scenery_type.py +19 -0
  254. srb-0.0.1/srb/core/asset/scenery/subterrane.py +21 -0
  255. srb-0.0.1/srb/core/asset/scenery/terrain.py +23 -0
  256. srb-0.0.1/srb/core/controller/__init__.py +1 -0
  257. srb-0.0.1/srb/core/domain.py +213 -0
  258. srb-0.0.1/srb/core/env/__init__.py +60 -0
  259. srb-0.0.1/srb/core/env/common/__init__.py +12 -0
  260. srb-0.0.1/srb/core/env/common/base/__init__.py +6 -0
  261. srb-0.0.1/srb/core/env/common/base/direct/__init__.py +2 -0
  262. srb-0.0.1/srb/core/env/common/base/direct/cfg.py +21 -0
  263. srb-0.0.1/srb/core/env/common/base/direct/impl.py +251 -0
  264. srb-0.0.1/srb/core/env/common/base/direct_marl/__init__.py +2 -0
  265. srb-0.0.1/srb/core/env/common/base/direct_marl/cfg.py +14 -0
  266. srb-0.0.1/srb/core/env/common/base/direct_marl/impl.py +13 -0
  267. srb-0.0.1/srb/core/env/common/base/env_cfg.py +693 -0
  268. srb-0.0.1/srb/core/env/common/base/event_cfg.py +169 -0
  269. srb-0.0.1/srb/core/env/common/base/managed/__init__.py +2 -0
  270. srb-0.0.1/srb/core/env/common/base/managed/cfg.py +14 -0
  271. srb-0.0.1/srb/core/env/common/base/managed/impl.py +13 -0
  272. srb-0.0.1/srb/core/env/common/base/scene_cfg.py +24 -0
  273. srb-0.0.1/srb/core/env/common/extension/__init__.py +1 -0
  274. srb-0.0.1/srb/core/env/common/extension/visual/__init__.py +2 -0
  275. srb-0.0.1/srb/core/env/common/extension/visual/cfg.py +59 -0
  276. srb-0.0.1/srb/core/env/common/extension/visual/impl.py +77 -0
  277. srb-0.0.1/srb/core/env/manipulation/__init__.py +7 -0
  278. srb-0.0.1/srb/core/env/manipulation/env.py +147 -0
  279. srb-0.0.1/srb/core/env/manipulation/visual_ext.py +52 -0
  280. srb-0.0.1/srb/core/env/mobile/__init__.py +7 -0
  281. srb-0.0.1/srb/core/env/mobile/aerial/__init__.py +2 -0
  282. srb-0.0.1/srb/core/env/mobile/aerial/env.py +75 -0
  283. srb-0.0.1/srb/core/env/mobile/aerial/visual_ext.py +39 -0
  284. srb-0.0.1/srb/core/env/mobile/env.py +61 -0
  285. srb-0.0.1/srb/core/env/mobile/ground/__init__.py +2 -0
  286. srb-0.0.1/srb/core/env/mobile/ground/env.py +78 -0
  287. srb-0.0.1/srb/core/env/mobile/ground/visual_ext.py +39 -0
  288. srb-0.0.1/srb/core/env/mobile/orbital/__init__.py +7 -0
  289. srb-0.0.1/srb/core/env/mobile/orbital/env.py +85 -0
  290. srb-0.0.1/srb/core/env/mobile/orbital/visual_ext.py +26 -0
  291. srb-0.0.1/srb/core/env/mobile_manipulation/__init__.py +3 -0
  292. srb-0.0.1/srb/core/env/mobile_manipulation/aerial_manipulation/__init__.py +7 -0
  293. srb-0.0.1/srb/core/env/mobile_manipulation/aerial_manipulation/env.py +60 -0
  294. srb-0.0.1/srb/core/env/mobile_manipulation/aerial_manipulation/visual_ext.py +52 -0
  295. srb-0.0.1/srb/core/env/mobile_manipulation/ground_manipulation/__init__.py +7 -0
  296. srb-0.0.1/srb/core/env/mobile_manipulation/ground_manipulation/env.py +60 -0
  297. srb-0.0.1/srb/core/env/mobile_manipulation/ground_manipulation/visual_ext.py +52 -0
  298. srb-0.0.1/srb/core/env/mobile_manipulation/orbital_manipulation/__init__.py +7 -0
  299. srb-0.0.1/srb/core/env/mobile_manipulation/orbital_manipulation/env.py +60 -0
  300. srb-0.0.1/srb/core/env/mobile_manipulation/orbital_manipulation/visual_ext.py +39 -0
  301. srb-0.0.1/srb/core/manager/__init__.py +4 -0
  302. srb-0.0.1/srb/core/manager/action_manager.py +39 -0
  303. srb-0.0.1/srb/core/marker/__init__.py +6 -0
  304. srb-0.0.1/srb/core/marker/arrow.py +13 -0
  305. srb-0.0.1/srb/core/marker/cone.py +11 -0
  306. srb-0.0.1/srb/core/marker/cylinder.py +11 -0
  307. srb-0.0.1/srb/core/marker/frame.py +4 -0
  308. srb-0.0.1/srb/core/mdp/__init__.py +9 -0
  309. srb-0.0.1/srb/core/mdp/events.py +502 -0
  310. srb-0.0.1/srb/core/sensor/__init__.py +2 -0
  311. srb-0.0.1/srb/core/sim/__init__.py +4 -0
  312. srb-0.0.1/srb/core/sim/robot_setup/__init__.py +10 -0
  313. srb-0.0.1/srb/core/sim/robot_setup/assembled_bodies.py +7 -0
  314. srb-0.0.1/srb/core/sim/robot_setup/assembled_robot.py +11 -0
  315. srb-0.0.1/srb/core/sim/robot_setup/robot_assembler.py +127 -0
  316. srb-0.0.1/srb/core/sim/schemas/__init__.py +3 -0
  317. srb-0.0.1/srb/core/sim/spawners/__init__.py +21 -0
  318. srb-0.0.1/srb/core/sim/spawners/particles/__init__.py +11 -0
  319. srb-0.0.1/srb/core/sim/spawners/particles/cfg.py +119 -0
  320. srb-0.0.1/srb/core/sim/spawners/particles/impl.py +350 -0
  321. srb-0.0.1/srb/core/sim/spawners/particles/utils.py +23 -0
  322. srb-0.0.1/srb/core/sim/spawners/shapes/__init__.py +2 -0
  323. srb-0.0.1/srb/core/sim/spawners/shapes/extras/__init__.py +1 -0
  324. srb-0.0.1/srb/core/sim/spawners/shapes/extras/cfg.py +33 -0
  325. srb-0.0.1/srb/core/sim/spawners/shapes/extras/impl.py +227 -0
  326. srb-0.0.1/srb/core/sim/spawners/shapes/multi_shape/__init__.py +0 -0
  327. srb-0.0.1/srb/core/sim/spawners/shapes/multi_shape/cfg.py +29 -0
  328. srb-0.0.1/srb/core/sim/spawners/shapes/multi_shape/impl.py +80 -0
  329. srb-0.0.1/srb/core/visuals/__init__.py +11 -0
  330. srb-0.0.1/srb/core/visuals/cfg.py +128 -0
  331. srb-0.0.1/srb/core/visuals/rtx_post.py +217 -0
  332. srb-0.0.1/srb/integrations/__init__.py +0 -0
  333. srb-0.0.1/srb/integrations/dreamer/__init__.py +0 -0
  334. srb-0.0.1/srb/integrations/dreamer/driver.py +40 -0
  335. srb-0.0.1/srb/integrations/dreamer/eval.py +91 -0
  336. srb-0.0.1/srb/integrations/dreamer/main.py +232 -0
  337. srb-0.0.1/srb/integrations/dreamer/selector.py +7 -0
  338. srb-0.0.1/srb/integrations/dreamer/train.py +142 -0
  339. srb-0.0.1/srb/integrations/dreamer/wrapper.py +227 -0
  340. srb-0.0.1/srb/integrations/sb3/__init__.py +0 -0
  341. srb-0.0.1/srb/integrations/sb3/exp_manager.py +99 -0
  342. srb-0.0.1/srb/integrations/sb3/main.py +170 -0
  343. srb-0.0.1/srb/integrations/sb3/wrapper.py +264 -0
  344. srb-0.0.1/srb/integrations/sbx/__init__.py +0 -0
  345. srb-0.0.1/srb/integrations/sbx/main.py +88 -0
  346. srb-0.0.1/srb/integrations/skrl/__init__.py +0 -0
  347. srb-0.0.1/srb/integrations/skrl/main.py +66 -0
  348. srb-0.0.1/srb/integrations/skrl/wrapper.py +115 -0
  349. srb-0.0.1/srb/interfaces/__init__.py +1 -0
  350. srb-0.0.1/srb/interfaces/enums.py +69 -0
  351. srb-0.0.1/srb/interfaces/interface/__init__.py +1 -0
  352. srb-0.0.1/srb/interfaces/interface/base.py +12 -0
  353. srb-0.0.1/srb/interfaces/interface/gui.py +94 -0
  354. srb-0.0.1/srb/interfaces/interface/ros.py +1065 -0
  355. srb-0.0.1/srb/interfaces/teleop/__init__.py +8 -0
  356. srb-0.0.1/srb/interfaces/teleop/combined.py +199 -0
  357. srb-0.0.1/srb/interfaces/teleop/haptic.py +229 -0
  358. srb-0.0.1/srb/interfaces/teleop/keyboard.py +53 -0
  359. srb-0.0.1/srb/interfaces/teleop/ros.py +132 -0
  360. srb-0.0.1/srb/interfaces/teleop/spacemouse.py +109 -0
  361. srb-0.0.1/srb/py.typed +0 -0
  362. srb-0.0.1/srb/tasks/__init__.py +15 -0
  363. srb-0.0.1/srb/tasks/manipulation/__init__.py +0 -0
  364. srb-0.0.1/srb/tasks/manipulation/_manipulation/__init__.py +17 -0
  365. srb-0.0.1/srb/tasks/manipulation/_manipulation/task.py +239 -0
  366. srb-0.0.1/srb/tasks/manipulation/_manipulation/task_visual.py +29 -0
  367. srb-0.0.1/srb/tasks/manipulation/debris_capture/__init__.py +17 -0
  368. srb-0.0.1/srb/tasks/manipulation/debris_capture/asset.py +32 -0
  369. srb-0.0.1/srb/tasks/manipulation/debris_capture/task.py +424 -0
  370. srb-0.0.1/srb/tasks/manipulation/debris_capture/task_visual.py +29 -0
  371. srb-0.0.1/srb/tasks/manipulation/peg_in_hole_assembly/__init__.py +26 -0
  372. srb-0.0.1/srb/tasks/manipulation/peg_in_hole_assembly/asset.py +99 -0
  373. srb-0.0.1/srb/tasks/manipulation/peg_in_hole_assembly/task.py +543 -0
  374. srb-0.0.1/srb/tasks/manipulation/peg_in_hole_assembly/task_multi.py +604 -0
  375. srb-0.0.1/srb/tasks/manipulation/peg_in_hole_assembly/task_visual.py +51 -0
  376. srb-0.0.1/srb/tasks/manipulation/sample_collection/__init__.py +26 -0
  377. srb-0.0.1/srb/tasks/manipulation/sample_collection/asset.py +98 -0
  378. srb-0.0.1/srb/tasks/manipulation/sample_collection/task.py +423 -0
  379. srb-0.0.1/srb/tasks/manipulation/sample_collection/task_multi.py +426 -0
  380. srb-0.0.1/srb/tasks/manipulation/sample_collection/task_visual.py +51 -0
  381. srb-0.0.1/srb/tasks/manipulation/solar_panel_assembly/__init__.py +17 -0
  382. srb-0.0.1/srb/tasks/manipulation/solar_panel_assembly/asset.py +34 -0
  383. srb-0.0.1/srb/tasks/manipulation/solar_panel_assembly/task.py +745 -0
  384. srb-0.0.1/srb/tasks/manipulation/solar_panel_assembly/task_visual.py +29 -0
  385. srb-0.0.1/srb/tasks/mobile/__init__.py +0 -0
  386. srb-0.0.1/srb/tasks/mobile/_aerial/__init__.py +17 -0
  387. srb-0.0.1/srb/tasks/mobile/_aerial/task.py +148 -0
  388. srb-0.0.1/srb/tasks/mobile/_aerial/task_visual.py +29 -0
  389. srb-0.0.1/srb/tasks/mobile/_ground/__init__.py +17 -0
  390. srb-0.0.1/srb/tasks/mobile/_ground/task.py +148 -0
  391. srb-0.0.1/srb/tasks/mobile/_ground/task_visual.py +29 -0
  392. srb-0.0.1/srb/tasks/mobile/_orbital/__init__.py +17 -0
  393. srb-0.0.1/srb/tasks/mobile/_orbital/task.py +148 -0
  394. srb-0.0.1/srb/tasks/mobile/_orbital/task_visual.py +29 -0
  395. srb-0.0.1/srb/tasks/mobile/locomotion_velocity_tracking/__init__.py +17 -0
  396. srb-0.0.1/srb/tasks/mobile/locomotion_velocity_tracking/task.py +489 -0
  397. srb-0.0.1/srb/tasks/mobile/locomotion_velocity_tracking/task_visual.py +32 -0
  398. srb-0.0.1/srb/tasks/mobile/orbital_evasion/__init__.py +17 -0
  399. srb-0.0.1/srb/tasks/mobile/orbital_evasion/asset.py +37 -0
  400. srb-0.0.1/srb/tasks/mobile/orbital_evasion/task.py +252 -0
  401. srb-0.0.1/srb/tasks/mobile/orbital_evasion/task_visual.py +29 -0
  402. srb-0.0.1/srb/tasks/mobile_manipulation/__init__.py +0 -0
  403. srb-0.0.1/srb/tasks/mobile_manipulation/excavation/__init__.py +17 -0
  404. srb-0.0.1/srb/tasks/mobile_manipulation/excavation/task.py +188 -0
  405. srb-0.0.1/srb/tasks/mobile_manipulation/excavation/task_visual.py +29 -0
  406. srb-0.0.1/srb/tasks/mobile_manipulation/mobile_debris_capture/__init__.py +17 -0
  407. srb-0.0.1/srb/tasks/mobile_manipulation/mobile_debris_capture/task.py +176 -0
  408. srb-0.0.1/srb/tasks/mobile_manipulation/mobile_debris_capture/task_visual.py +29 -0
  409. srb-0.0.1/srb/utils/__init__.py +0 -0
  410. srb-0.0.1/srb/utils/cache.py +43 -0
  411. srb-0.0.1/srb/utils/camera.py +1 -0
  412. srb-0.0.1/srb/utils/cfg.py +540 -0
  413. srb-0.0.1/srb/utils/dict.py +50 -0
  414. srb-0.0.1/srb/utils/importer.py +42 -0
  415. srb-0.0.1/srb/utils/io.py +60 -0
  416. srb-0.0.1/srb/utils/isaacsim.py +42 -0
  417. srb-0.0.1/srb/utils/logging.py +80 -0
  418. srb-0.0.1/srb/utils/math.py +122 -0
  419. srb-0.0.1/srb/utils/nucleus.py +19 -0
  420. srb-0.0.1/srb/utils/path.py +24 -0
  421. srb-0.0.1/srb/utils/registry.py +42 -0
  422. srb-0.0.1/srb/utils/ros.py +65 -0
  423. srb-0.0.1/srb/utils/sampling.py +85 -0
  424. srb-0.0.1/srb/utils/spaces.py +1 -0
  425. srb-0.0.1/srb/utils/str.py +33 -0
  426. srb-0.0.1/srb/utils/subprocess.py +53 -0
  427. srb-0.0.1/srb/utils/tracing.py +59 -0
  428. srb-0.0.1/srb/utils/usd.py +1 -0
  429. srb-0.0.1/srb/utils/version.py +12 -0
  430. srb-0.0.1/tests/cli_agent_test.py +155 -0
  431. srb-0.0.1/tests/cli_ls_test.py +29 -0
  432. srb-0.0.1/tests/import_test.py +6 -0
  433. srb-0.0.1/uv.lock +2306 -0
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "${localWorkspaceFolderBasename}",
3
+ "build": {
4
+ "context": "${localWorkspaceFolder}",
5
+ "dockerfile": "${localWorkspaceFolder}/Dockerfile",
6
+ "cacheFrom": "andrejorsula/space_robotics_bench"
7
+ },
8
+ "workspaceFolder": "/root/ws",
9
+ "workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/ws",
10
+ "runArgs": [
11
+ // Network mode
12
+ "--network=host",
13
+ "--ipc=host",
14
+ // NVIDIA GPU
15
+ "--gpus=all",
16
+ // Other GPUs
17
+ "--device=/dev/dri:/dev/dri",
18
+ "--group-add=video"
19
+ ],
20
+ "mounts": [
21
+ /// Common
22
+ // Time
23
+ "type=bind,source=/etc/localtime,target=/etc/localtime,readonly",
24
+ "type=bind,source=/etc/timezone,target=/etc/timezone,readonly",
25
+ // GUI (X11)
26
+ "type=bind,source=/tmp/.X11-unix,target=/tmp/.X11-unix",
27
+ "type=bind,source=${localEnv:TMPDIR:/tmp}/xauth_docker_vsc_${localWorkspaceFolderBasename},target=${localEnv:TMPDIR:/tmp}/xauth_docker_vsc_${localWorkspaceFolderBasename}",
28
+ /// Isaac Sim
29
+ // Data
30
+ "type=bind,source=${localEnv:HOME}/.nvidia-omniverse/data/isaac-sim,target=/root/isaac-sim/kit/data",
31
+ // Cache
32
+ "type=bind,source=${localEnv:HOME}/.cache/isaac-sim,target=/root/isaac-sim/kit/cache",
33
+ "type=bind,source=${localEnv:HOME}/.cache/nvidia/GLCache,target=/root/.cache/nvidia/GLCache",
34
+ "type=bind,source=${localEnv:HOME}/.cache/ov,target=/root/.cache/ov",
35
+ "type=bind,source=${localEnv:HOME}/.nv/ComputeCache,target=/root/.nv/ComputeCache",
36
+ // Logs
37
+ "type=bind,source=${localEnv:HOME}/.nvidia-omniverse/logs,target=/root/.nvidia-omniverse/logs",
38
+ "type=bind,source=${localEnv:HOME}/.nvidia-omniverse/logs/isaac-sim,target=/root/isaac-sim/kit/logs",
39
+ /// SimForge
40
+ // Cache
41
+ "type=bind,source=${localEnv:HOME}/.cache/simforge,target=/root/.cache/simforge"
42
+ ],
43
+ "containerEnv": {
44
+ // GUI (X11)
45
+ "DISPLAY": "${localEnv:DISPLAY}",
46
+ "XAUTHORITY": "${localEnv:TMPDIR:/tmp}/xauth_docker_vsc_${localWorkspaceFolderBasename}",
47
+ // NVIDIA GPU
48
+ "NVIDIA_VISIBLE_DEVICES": "all",
49
+ "NVIDIA_DRIVER_CAPABILITIES": "all"
50
+ },
51
+ "initializeCommand": "XAUTH=\"${localEnv:TMPDIR:/tmp}/xauth_docker_vsc_${localWorkspaceFolderBasename}\"; touch \"${XAUTH}\"; chmod a+r \"${XAUTH}\"; XAUTH_LIST=$(xauth nlist \"${localEnv:DISPLAY}\"); if [ -n \"${XAUTH_LIST}\" ]; then echo \"${XAUTH_LIST}\" | sed -e 's/^..../ffff/' | xauth -f \"${XAUTH}\" nmerge -; fi",
52
+ "customizations": {
53
+ "vscode": {
54
+ "extensions": []
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bash
2
+ ### Open the Dev Container in VS Code
3
+ ### Usage: open.bash
4
+ set -e
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" &>/dev/null && pwd)"
7
+ REPOSITORY_DIR="$(dirname "${SCRIPT_DIR}")"
8
+
9
+ ## Determine the workspace folder
10
+ if [[ -n "$1" ]]; then
11
+ # Use the first argument as the workspace folder if provided
12
+ WORKSPACE_FOLDER="$1"
13
+ else
14
+ # Otherwise, try to extract the workspace folder from `./devcontainer.json`
15
+ WORKSPACE_FOLDER="$(grep -Po '"workspaceFolder":.*?[^\\]",' "${SCRIPT_DIR}/devcontainer.json" | cut -d'"' -f4 || true)"
16
+ if [[ -z "${WORKSPACE_FOLDER}" ]]; then
17
+ # If `./devcontainer.json` does not contain the workspace folder, default to the root
18
+ WORKSPACE_FOLDER="/"
19
+ fi
20
+ fi
21
+
22
+ ## Open the Dev Container in VS Code
23
+ CODE_REMOTE_CMD=(
24
+ code --remote
25
+ "dev-container+$(printf "%s" "${REPOSITORY_DIR}" | xxd -p | tr -d "[:space:]")"
26
+ "${WORKSPACE_FOLDER}"
27
+ )
28
+ echo -e "\033[1;90m${CODE_REMOTE_CMD[*]}\033[0m" | xargs
29
+ # shellcheck disable=SC2048
30
+ exec ${CODE_REMOTE_CMD[*]}
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env bash
2
+ ### Build the Docker image
3
+ ### Usage: build.bash [TAG] [BUILD_ARGS...]
4
+ set -e
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" &>/dev/null && pwd)"
7
+ REPOSITORY_DIR="$(dirname "${SCRIPT_DIR}")"
8
+
9
+ ## If the current user is not in the docker group, all docker commands will be run as root
10
+ if ! grep -qi /etc/group -e "docker.*${USER}"; then
11
+ echo "[INFO] The current user '${USER}' is not detected in the docker group. All docker commands will be run as root."
12
+ WITH_SUDO="sudo"
13
+ fi
14
+
15
+ ## Determine the name of the image to build
16
+ DOCKERHUB_USER="$(${WITH_SUDO} docker info 2>/dev/null | sed '/Username:/!d;s/.* //')"
17
+ PROJECT_NAME="$(basename "${REPOSITORY_DIR}")"
18
+ IMAGE_NAME="${DOCKERHUB_USER:+${DOCKERHUB_USER}/}${PROJECT_NAME,,}"
19
+
20
+ ## Parse TAG and forward additional build arguments
21
+ if [ "${#}" -gt "0" ]; then
22
+ if [[ "${1}" != "-"* ]]; then
23
+ IMAGE_NAME+=":${1}"
24
+ BUILD_ARGS=${*:2}
25
+ else
26
+ BUILD_ARGS=${*:1}
27
+ fi
28
+ fi
29
+
30
+ ## Build the image
31
+ DOCKER_BUILD_CMD=(
32
+ "${WITH_SUDO}" docker build
33
+ "${REPOSITORY_DIR}"
34
+ --file "${REPOSITORY_DIR}/Dockerfile"
35
+ --tag "${IMAGE_NAME}"
36
+ "${BUILD_ARGS}"
37
+ )
38
+ echo -e "\033[1;90m[TRACE] ${DOCKER_BUILD_CMD[*]}\033[0m" | xargs
39
+ # shellcheck disable=SC2048
40
+ exec ${DOCKER_BUILD_CMD[*]}
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+ set -e
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" &>/dev/null && pwd)"
5
+
6
+ ## Config
7
+ # Additional volumes to mount inside the container
8
+ EXTRA_DOCKER_VOLUMES=(
9
+ "${HOME}/Videos:/root/Videos"
10
+ )
11
+ # Additional environment variables to set inside the container
12
+ EXTRA_DOCKER_ENVIRON=()
13
+
14
+ ## Parse arguments
15
+ DEFAULT_CMD="srb gui"
16
+ if [ "${#}" -gt "0" ]; then
17
+ CMD=${*:1}
18
+ fi
19
+
20
+ ## Run the container
21
+ DOCKER_RUN_CMD=(
22
+ "${SCRIPT_DIR}/run.bash"
23
+ "${EXTRA_DOCKER_VOLUMES[@]/#/"-v "}"
24
+ "${EXTRA_DOCKER_ENVIRON[@]/#/"-e "}"
25
+ "${CMD:-${DEFAULT_CMD}}"
26
+ )
27
+ echo -e "\033[1;90m[TRACE] ${DOCKER_RUN_CMD[*]}\033[0m" | xargs
28
+ # shellcheck disable=SC2048
29
+ exec ${DOCKER_RUN_CMD[*]}
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bash
2
+ ### Run a Docker container with additional development volumes mounted
3
+ ### Usage: dev.bash [-v HOST_DIR:DOCKER_DIR:OPTIONS] [-e ENV=VALUE] [TAG] [CMD]
4
+ set -e
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" &>/dev/null && pwd)"
7
+ REPOSITORY_DIR="$(dirname "${SCRIPT_DIR}")"
8
+ WS_DIR="$(dirname "${REPOSITORY_DIR}")"
9
+ export WITH_DEV_VOLUME="${WITH_DEV_VOLUME:-true}"
10
+
11
+ ## Config
12
+ # Development volumes to mount inside the container
13
+ DOCKER_DEV_VOLUMES=(
14
+ "${WS_DIR}/isaaclab:/root/isaaclab:rw"
15
+ # "${WS_DIR}/oxidasim:/root/oxidasim:rw"
16
+ # "${WS_DIR}/simforge:/root/simforge:rw"
17
+ # "${WS_DIR}/simforge_foundry:/root/simforge_foundry:rw"
18
+ # "${WS_DIR}/dreamerv3:/root/dreamerv3:rw"
19
+ # "${WS_DIR}/skrl:/root/skrl:rw"
20
+ )
21
+ # Development environment variables to set inside the container
22
+ DOCKER_DEV_ENVIRON=(
23
+ LOG_LEVEL="${LOG_LEVEL:-debug}"
24
+ HYDRA_FULL_ERROR="${HYDRA_FULL_ERROR:-1}"
25
+ RICH_TRACEBACK="${RICH_TRACEBACK:-true}"
26
+ # RICH_TRACEBACK_LOCALS="${RICH_TRACEBACK_LOCALS:-true}"
27
+ LOGFIRE_ENABLE="${LOGFIRE_ENABLE:-true}"
28
+ # LOGFIRE_SEND_TO_LOGFIRE="${LOGFIRE_SEND_TO_LOGFIRE:-true}"
29
+ )
30
+
31
+ ## Verify that all development volumes exist
32
+ for volume in "${DOCKER_DEV_VOLUMES[@]}"; do
33
+ host_dir="${volume%%:*}"
34
+ target_dir="${volume#*:}"
35
+ target_dir="${target_dir%%:*}"
36
+ if [[ ! -d "${host_dir}" ]]; then
37
+ echo >&2 -e "\033[1;31m[ERROR] The source directory '${host_dir}' to be mounted as a volume at '${target_dir}' does not exist.\033[0m"
38
+ exit 1
39
+ fi
40
+ done
41
+
42
+ ## Run the container with development volumes
43
+ DOCKER_DEV_CMD=(
44
+ "${SCRIPT_DIR}/run.bash"
45
+ "${DOCKER_DEV_VOLUMES[@]/#/"-v "}"
46
+ "${DOCKER_DEV_ENVIRON[@]/#/"-e "}"
47
+ "${*:1}"
48
+ )
49
+ echo -e "\033[1;90m[TRACE] ${DOCKER_DEV_CMD[*]}\033[0m" | xargs
50
+ # shellcheck disable=SC2048
51
+ exec ${DOCKER_DEV_CMD[*]}
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env bash
2
+ ### Extract Isaac Sim from a Docker image
3
+ ### Usage: extract_isaacsim.bash [destination_directory]
4
+ set -e
5
+
6
+ ## Config
7
+ SRC_IMAGE="${SRC_IMAGE:-"andrejorsula/space_robotics_bench:latest"}"
8
+ SRC_PATH="${SRC_PATH:-"/root/isaac-sim"}"
9
+ DEST_DIR="${1:-"${DEST_DIR:-"$HOME/isaac-sim"}"}"
10
+ CONTAINER_NAME="isaac_sim_extract_$(date +%s)"
11
+
12
+ echo "[INFO] Source image: ${SRC_IMAGE}"
13
+ echo "[INFO] Source path: ${SRC_PATH}"
14
+ echo "[INFO] Destination path: ${DEST_DIR}"
15
+
16
+ # Check if the destination directory already exists and prompt for overwrite
17
+ if [[ -d "${DEST_DIR}" ]]; then
18
+ echo -en "\033[1;33m[WARNING] Destination directory already exists, overwrite? [y/N]\033[0m "
19
+ read -r
20
+ if [[ ! "${REPLY}" =~ ^[Yy]$ ]]; then
21
+ echo "[INFO] Exiting"
22
+ exit 0
23
+ fi
24
+ fi
25
+
26
+ # Ensure Docker is running
27
+ if ! docker info >/dev/null 2>&1; then
28
+ echo >&2 -e "\033[1;31m[ERROR] Docker is not running or not accessible\033[0m"
29
+ exit 1
30
+ fi
31
+
32
+ # Check if the image is available locally, pull if necessary
33
+ if [[ -z "$(docker image ls -q "${SRC_IMAGE}")" ]]; then
34
+ echo "[INFO] Pulling the Docker image"
35
+ docker pull "${SRC_IMAGE}" &>/dev/null
36
+ else
37
+ echo "[INFO] Docker image is already available locally"
38
+ fi
39
+
40
+ # Function to clean up the container on exit
41
+ cleanup() {
42
+ echo "[INFO] Stopping container"
43
+ docker stop "${CONTAINER_NAME}" &>/dev/null || true
44
+ }
45
+ trap cleanup EXIT # Ensure cleanup runs on script exit
46
+
47
+ # Start Docker container in the background
48
+ echo "[INFO] Starting a temporary Docker container: ${CONTAINER_NAME}"
49
+ docker run --name "${CONTAINER_NAME}" --rm --entrypoint bash "${SRC_IMAGE}" -c "sleep infinity" &
50
+
51
+ # Wait for the container to be ready
52
+ echo "[INFO] Checking if container is ready"
53
+ for i in {1..10}; do
54
+ sleep 0.5
55
+ if docker ps --format '{{.Names}}' | grep -q "^${CONTAINER_NAME}$"; then
56
+ if docker exec "${CONTAINER_NAME}" ls "${SRC_PATH}" &>/dev/null; then
57
+ echo "[INFO] Container is ready"
58
+ break
59
+ else
60
+ echo >&2 -e "\033[1;31m[ERROR] Path '${SRC_PATH}' not found in container '${SRC_IMAGE}'\033[0m"
61
+ exit 1
62
+ fi
63
+ fi
64
+ if [[ "${i}" -eq 10 ]]; then
65
+ echo >&2 -e "\033[1;31m[ERROR] Container did not start in time\033[0m"
66
+ exit 1
67
+ fi
68
+ done
69
+
70
+ # Ensure the destination directory exists
71
+ mkdir -p "$(dirname "${DEST_DIR}")"
72
+
73
+ # Copy the directory from the container
74
+ echo "[INFO] Copying ${CONTAINER_NAME}:${SRC_PATH} to ${DEST_DIR}"
75
+ docker cp "${CONTAINER_NAME}:${SRC_PATH}" "${DEST_DIR}"
76
+
77
+ # Update pip in the extracted environment
78
+ echo "[INFO] Updating pip in extracted environment"
79
+ if [[ -f "${DEST_DIR}/python.sh" ]]; then
80
+ "${DEST_DIR}/python.sh" -m pip install --upgrade pip
81
+ else
82
+ echo >&2 -e "\033[1;33m[WARNING] python.sh not found in ${DEST_DIR}, skipping pip upgrade\033[0m"
83
+ fi
84
+
85
+ # Print environment setup instructions
86
+ echo "[INFO] Isaac Sim has been extracted to ${DEST_DIR}"
87
+ echo "[INFO] Recommended environment variable setup:"
88
+ echo "[INFO] echo \"export ISAAC_SIM_PYTHON='${DEST_DIR}/python.sh'\" >> ~/.bashrc"
89
+ echo "[INFO] set -Ux ISAAC_SIM_PYTHON '${DEST_DIR}/python.sh' # Fish"
@@ -0,0 +1,130 @@
1
+ #!/usr/bin/env bash
2
+ ### Install Docker and NVIDIA Container Toolkit
3
+ ### Usage: install_docker.bash
4
+ set -e
5
+
6
+ ## Install curl if missing
7
+ if ! command -v curl >/dev/null 2>&1; then
8
+ if command -v apt-get >/dev/null 2>&1; then
9
+ sudo apt-get install -y curl
10
+ elif command -v dnf >/dev/null 2>&1; then
11
+ sudo dnf install -y curl
12
+ elif command -v yum >/dev/null 2>&1; then
13
+ sudo yum install -y curl
14
+ fi
15
+ fi
16
+
17
+ ## Install Docker via the convenience script
18
+ curl -fsSL https://get.docker.com | sh
19
+ sudo systemctl enable --now docker
20
+
21
+ ## (Optional) Install support for NVIDIA if an NVIDIA GPU is detected and the installation is requested
22
+ check_nvidia_gpu() {
23
+ if ! lshw -C display 2>/dev/null | grep -qi "vendor.*nvidia"; then
24
+ return 1 # NVIDIA GPU is not present
25
+ elif ! command -v nvidia-smi >/dev/null 2>&1; then
26
+ return 1 # NVIDIA GPU is present but nvidia-utils not installed
27
+ elif ! nvidia-smi -L &>/dev/null; then
28
+ return 1 # NVIDIA GPU is present but is not working properly
29
+ else
30
+ return 0 # NVIDIA GPU is present and appears to be working
31
+ fi
32
+ }
33
+ configure_nvidia_apt_repository() {
34
+ curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey |
35
+ sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg &&
36
+ curl -sL https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list |
37
+ sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' |
38
+ sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
39
+ sudo apt-get update
40
+ }
41
+ if check_nvidia_gpu; then
42
+ echo -e "[INFO] NVIDIA GPU detected."
43
+ DOCKER_VERSION="$(sudo docker version --format '{{.Server.Version}}' 2>/dev/null)"
44
+ MIN_VERSION_FOR_TOOLKIT="19.3"
45
+ if [ "$(printf '%s\n' "${MIN_VERSION_FOR_TOOLKIT}" "${DOCKER_VERSION}" | sort -V | head -n1)" = "$MIN_VERSION_FOR_TOOLKIT" ]; then
46
+ if ! command -v nvidia-container-toolkit >/dev/null 2>&1; then
47
+ while true; do
48
+ read -erp "Do you want to install NVIDIA Container Toolkit? [Y/n]: " INSTALL_NVIDIA_CONTAINER_TOOLKIT
49
+ case "${INSTALL_NVIDIA_CONTAINER_TOOLKIT,,}" in
50
+ "" | y | yes)
51
+ INSTALL_NVIDIA_CONTAINER_TOOLKIT=true
52
+ break
53
+ ;;
54
+ n | no)
55
+ INSTALL_NVIDIA_CONTAINER_TOOLKIT=false
56
+ break
57
+ ;;
58
+ esac
59
+ done
60
+ if [[ "${INSTALL_NVIDIA_CONTAINER_TOOLKIT}" = true ]]; then
61
+ if command -v apt-get >/dev/null 2>&1; then
62
+ configure_nvidia_apt_repository
63
+ sudo apt-get install -y nvidia-container-toolkit
64
+ elif command -v yum >/dev/null 2>&1; then
65
+ curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo |
66
+ sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo
67
+ sudo yum install -y nvidia-container-toolkit
68
+ else
69
+ echo >&2 -e "\033[1;31m[ERROR] Supported package manager not found. Please install nvidia-container-toolkit manually.\033[0m"
70
+ fi
71
+ sudo systemctl restart --now docker
72
+ fi
73
+ else
74
+ echo -e "[INFO] NVIDIA Container Toolkit is already installed."
75
+ fi
76
+ else
77
+ if ! command -v nvidia-docker >/dev/null 2>&1; then
78
+ while true; do
79
+ read -erp "Do you want to install NVIDIA Docker [Y/n]: " INSTALL_NVIDIA_DOCKER
80
+ case "${INSTALL_NVIDIA_DOCKER,,}" in
81
+ "" | y | yes)
82
+ INSTALL_NVIDIA_DOCKER=true
83
+ break
84
+ ;;
85
+ n | no)
86
+ INSTALL_NVIDIA_DOCKER=false
87
+ break
88
+ ;;
89
+ esac
90
+ done
91
+ if [[ "${INSTALL_NVIDIA_DOCKER}" = true ]]; then
92
+ if command -v apt-get >/dev/null 2>&1; then
93
+ configure_nvidia_apt_repository
94
+ sudo apt-get install -y nvidia-docker2
95
+ else
96
+ echo >&2 -e "\033[1;31m[ERROR] Supported package manager not found. Please install nvidia-docker2 manually.\033[0m"
97
+ fi
98
+ sudo systemctl restart --now docker
99
+ fi
100
+ else
101
+ echo -e "[INFO] NVIDIA Docker is already installed."
102
+ fi
103
+ fi
104
+ fi
105
+
106
+ if [[ $(grep /etc/group -e "docker") != *"${USER}"* ]]; then
107
+ [ -z "${PS1}" ]
108
+ ## (Optional) Add user to docker group
109
+ while true; do
110
+ read -erp "Do you want to add the current user ${USER} to the docker group? [Y/n]: " ADD_USER_TO_DOCKER_GROUP
111
+ case "${ADD_USER_TO_DOCKER_GROUP,,}" in
112
+ "" | y | yes)
113
+ ADD_USER_TO_DOCKER_GROUP=true
114
+ break
115
+ ;;
116
+ n | no)
117
+ ADD_USER_TO_DOCKER_GROUP=false
118
+ break
119
+ ;;
120
+ esac
121
+ done
122
+ if [[ "${ADD_USER_TO_DOCKER_GROUP}" = true ]]; then
123
+ sudo groupadd -f docker
124
+ sudo usermod -aG docker "${USER}"
125
+ newgrp docker
126
+ echo -e "[INFO] The current user ${USER} was added to the docker group."
127
+ fi
128
+ else
129
+ echo -e "[INFO] The current user ${USER} is already in the docker group."
130
+ fi
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bash
2
+ ### Build a Singularity image from the Docker image
3
+ ### Usage: build.bash [TAG] [BUILD_ARGS...]
4
+ set -e
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" &>/dev/null && pwd)"
7
+ DOT_DOCKER_DIR="$(dirname "${SCRIPT_DIR}")"
8
+ REPOSITORY_DIR="$(dirname "${DOT_DOCKER_DIR}")"
9
+ IMAGES_DIR="${SCRIPT_DIR}/images"
10
+ DOCKER_BUILD_SCRIPT="${DOT_DOCKER_DIR}/build.bash"
11
+ export APPTAINER_TMPDIR="${APPTAINER_TMPDIR:-"${HOME}/.apptainer/tmp"}"
12
+
13
+ ## If the current user is not in the docker group, all docker commands will be run as root
14
+ if ! grep -qi /etc/group -e "docker.*${USER}"; then
15
+ echo "[INFO] The current user '${USER}' is not detected in the docker group. All docker commands will be run as root."
16
+ WITH_SUDO="sudo"
17
+ fi
18
+
19
+ ## Determine the name of the image to build and the output path
20
+ DOCKERHUB_USER="$(${WITH_SUDO} docker info 2>/dev/null | sed '/Username:/!d;s/.* //')"
21
+ PROJECT_NAME="$(basename "${REPOSITORY_DIR}")"
22
+ IMAGE_NAME="${DOCKERHUB_USER:+${DOCKERHUB_USER}/}${PROJECT_NAME,,}"
23
+ OUTPUT_PATH="${IMAGES_DIR}/${PROJECT_NAME}.sif"
24
+
25
+ ## Parse TAG and forward additional build arguments
26
+ if [ "${#}" -gt "0" ]; then
27
+ if [[ "${1}" != "-"* ]]; then
28
+ TAG="${1}"
29
+ BUILD_ARGS=${*:2}
30
+ else
31
+ BUILD_ARGS=${*:1}
32
+ fi
33
+ fi
34
+ TAG="${TAG:-"latest"}"
35
+ IMAGE_NAME+=":${TAG}"
36
+
37
+ ## Create the temporary directory for the Singularity image
38
+ mkdir -p "${APPTAINER_TMPDIR}"
39
+
40
+ ## Build the Docker image
41
+ "${DOCKER_BUILD_SCRIPT}" "${TAG}" "${BUILD_ARGS}"
42
+
43
+ ## Convert the Docker image to a Singularity image
44
+ APPTAINER_BUILD_CMD=(
45
+ apptainer build
46
+ "${OUTPUT_PATH}"
47
+ "docker-daemon:${IMAGE_NAME}"
48
+ )
49
+ echo -e "\033[1;90m[TRACE] ${APPTAINER_BUILD_CMD[*]}\033[0m" | xargs
50
+ # shellcheck disable=SC2048
51
+ exec ${APPTAINER_BUILD_CMD[*]}
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env bash
2
+ ### Run a command inside the Singularity container
3
+ ### Usage: run.bash [CMD]
4
+ set -e
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" &>/dev/null && pwd)"
7
+ DOT_DOCKER_DIR="$(dirname "${SCRIPT_DIR}")"
8
+ REPOSITORY_DIR="$(dirname "${DOT_DOCKER_DIR}")"
9
+ IMAGES_DIR="${SCRIPT_DIR}/images"
10
+ PROJECT_NAME="$(basename "${REPOSITORY_DIR}")"
11
+
12
+ ## Configuration
13
+ # Path to the image to run
14
+ IMAGE_PATH="${IMAGE_PATH:-"${IMAGES_DIR}/${PROJECT_NAME}.sif"}"
15
+ # Options for running the container
16
+ SINGULARITY_EXEC_OPTS="${SINGULARITY_EXEC_OPTS:-
17
+ --no-home
18
+ }"
19
+ # Flag to enable GPU
20
+ WITH_GPU="${WITH_GPU:-true}"
21
+ # Volumes to mount inside the container
22
+ VOLUMES_ROOT="${SCRATCH:-${HOME}}/volumes/${PROJECT_NAME}"
23
+ SINGULARITY_VOLUMES=(
24
+ ## Isaac Sim
25
+ # Data
26
+ "${VOLUMES_ROOT}/.nvidia-omniverse/data/isaac-sim:/root/isaac-sim/kit/data:rw"
27
+ # Cache
28
+ "${VOLUMES_ROOT}/.cache/isaac-sim:/root/isaac-sim/kit/cache:rw"
29
+ "${VOLUMES_ROOT}/.cache/nvidia/GLCache:/root/.cache/nvidia/GLCache:rw"
30
+ "${VOLUMES_ROOT}/.cache/ov:/root/.cache/ov:rw"
31
+ "${VOLUMES_ROOT}/.nv/ComputeCache:/root/.nv/ComputeCache:rw"
32
+ # Logs
33
+ "${VOLUMES_ROOT}/.nvidia-omniverse/logs:/root/.nvidia-omniverse/logs:rw"
34
+ "${VOLUMES_ROOT}/.nvidia-omniverse/logs/isaac-sim:/root/isaac-sim/kit/logs:rw"
35
+ ## SimForge
36
+ # Cache
37
+ "${VOLUMES_ROOT}/.cache/simforge:/root/.cache/simforge:rw"
38
+ ## Project
39
+ # Source
40
+ "${REPOSITORY_DIR}:/root/ws:rw"
41
+ ## Misc
42
+ "${VOLUMES_ROOT}/home/users:/home/users:rw"
43
+ )
44
+
45
+ ## Ensure the image exists
46
+ if [ ! -f "${IMAGE_PATH}" ]; then
47
+ echo >&2 -e "\033[1;31m[ERROR] Singularity image not found at ${IMAGE_PATH}\033[0m"
48
+ exit 1
49
+ fi
50
+
51
+ ## Parse CMD
52
+ if [ "${#}" -gt "0" ]; then
53
+ CMD=${*:1}
54
+ else
55
+ echo >&2 -e "\033[1;31m[ERROR] No command provided.\033[0m"
56
+ exit 1
57
+ fi
58
+
59
+ ## Ensure the host directories exist
60
+ for volume in "${SINGULARITY_VOLUMES[@]}"; do
61
+ if [[ "${volume}" =~ ^([^:]+):([^:]+).*$ ]]; then
62
+ host_dir="${BASH_REMATCH[1]}"
63
+ if [ ! -d "${host_dir}" ]; then
64
+ mkdir -p "${host_dir}"
65
+ echo -e "[INFO] Created directory ${host_dir}"
66
+ fi
67
+ fi
68
+ done
69
+
70
+ ## GPU
71
+ if [[ "${WITH_GPU,,}" = true ]]; then
72
+ SINGULARITY_EXEC_OPTS+=" --nv"
73
+ fi
74
+
75
+ ## Environment
76
+ if ! command -v module >/dev/null 2>&1; then
77
+ echo >&2 -e "\033[1;31m[ERROR] The 'module' command is not available. Please run this script on a compute node.\033[0m"
78
+ exit 1
79
+ fi
80
+ # Load the Singularity module
81
+ module purge
82
+ module load tools/Singularity
83
+
84
+ ## Run the container
85
+ SINGULARITY_EXEC_CMD=(
86
+ singularity exec
87
+ "${SINGULARITY_EXEC_OPTS}"
88
+ "${SINGULARITY_VOLUMES[@]/#/"--bind "}"
89
+ "${IMAGE_PATH}"
90
+ "${CMD}"
91
+ )
92
+ echo -e "\033[1;90m[TRACE] ${SINGULARITY_EXEC_CMD[*]}\033[0m" | xargs
93
+ # shellcheck disable=SC2048
94
+ exec ${SINGULARITY_EXEC_CMD[*]}
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env bash
2
+ ### Submit a job using Slurm
3
+ ### Usage: submit.bash [CMD]
4
+ set -e
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" &>/dev/null && pwd)"
7
+ DOT_DOCKER_DIR="$(dirname "${SCRIPT_DIR}")"
8
+ REPOSITORY_DIR="$(dirname "${DOT_DOCKER_DIR}")"
9
+ IMAGES_DIR="${SCRIPT_DIR}/images"
10
+ PROJECT_NAME="$(basename "${REPOSITORY_DIR}")"
11
+
12
+ ## Configuration
13
+ # Path to the image to run
14
+ IMAGE_PATH="${IMAGE_PATH:-"${IMAGES_DIR}/${PROJECT_NAME}.sif"}"
15
+ JOBS_DIR="${JOBS_DIR:-"${HOME}/jobs"}"
16
+
17
+ ## Ensure the image exists
18
+ if [ ! -f "${IMAGE_PATH}" ]; then
19
+ echo >&2 -e "\033[1;31m[ERROR] Singularity image not found at ${IMAGE_PATH}\033[0m"
20
+ exit 1
21
+ fi
22
+
23
+ ## Parse CMD
24
+ if [ "${#}" -gt "0" ]; then
25
+ CMD=${*:1}
26
+ else
27
+ echo >&2 -e "\033[1;31m[ERROR] No command provided.\033[0m"
28
+ exit 1
29
+ fi
30
+
31
+ # Create a job file directory if it does not exist
32
+ if [ ! -d "${JOBS_DIR}" ]; then
33
+ mkdir -p "${JOBS_DIR}"
34
+ echo -e "[INFO] Created directory ${JOBS_DIR}"
35
+ fi
36
+
37
+ # Create a job file
38
+ TIMESTAMP="$(date +%Y-%m-%d_%H-%M-%S)"
39
+ JOB_PATH="${JOBS_DIR}/job_${TIMESTAMP}.bash"
40
+ cat <<EOT >"${JOB_PATH}"
41
+ #!/bin/bash -l
42
+ #SBATCH --job-name="job_${TIMESTAMP}"
43
+ #SBATCH --time=1-12:00:00
44
+ #SBATCH --qos=normal
45
+ #SBATCH --nodes=1
46
+ #SBATCH --ntasks-per-node=1
47
+ #SBATCH --cpus-per-task=3
48
+ #SBATCH --mem=168GB
49
+ #SBATCH --partition=gpu
50
+ #SBATCH --constraint volta32
51
+ #SBATCH --gpus=1
52
+ #SBATCH --gpus-per-node=1
53
+ #SBATCH --gpus-per-task=1
54
+ #SBATCH --signal=B:SIGKILL@60
55
+
56
+ bash "${SCRIPT_DIR}/run.bash" "${CMD}"
57
+ EOT
58
+
59
+ ## Submit the job
60
+ SBATCH_CMD=(
61
+ sbatch "${JOB_PATH}"
62
+ )
63
+ echo -e "\033[1;90m[TRACE] ${SBATCH_CMD[*]}\033[0m" | xargs
64
+ # shellcheck disable=SC2048
65
+ exec ${SBATCH_CMD[*]}