agenticros 0.0.1 → 0.1.1

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 (330) hide show
  1. package/LICENSE +192 -0
  2. package/README.md +90 -4
  3. package/dist/commands/config.d.ts +20 -0
  4. package/dist/commands/config.d.ts.map +1 -0
  5. package/dist/commands/config.js +179 -0
  6. package/dist/commands/config.js.map +1 -0
  7. package/dist/commands/doctor.d.ts +33 -0
  8. package/dist/commands/doctor.d.ts.map +1 -0
  9. package/dist/commands/doctor.js +232 -0
  10. package/dist/commands/doctor.js.map +1 -0
  11. package/dist/commands/down.d.ts +15 -0
  12. package/dist/commands/down.d.ts.map +1 -0
  13. package/dist/commands/down.js +91 -0
  14. package/dist/commands/down.js.map +1 -0
  15. package/dist/commands/init.d.ts +21 -0
  16. package/dist/commands/init.d.ts.map +1 -0
  17. package/dist/commands/init.js +259 -0
  18. package/dist/commands/init.js.map +1 -0
  19. package/dist/commands/logs.d.ts +18 -0
  20. package/dist/commands/logs.d.ts.map +1 -0
  21. package/dist/commands/logs.js +67 -0
  22. package/dist/commands/logs.js.map +1 -0
  23. package/dist/commands/status.d.ts +12 -0
  24. package/dist/commands/status.d.ts.map +1 -0
  25. package/dist/commands/status.js +56 -0
  26. package/dist/commands/status.js.map +1 -0
  27. package/dist/commands/up.d.ts +20 -0
  28. package/dist/commands/up.d.ts.map +1 -0
  29. package/dist/commands/up.js +70 -0
  30. package/dist/commands/up.js.map +1 -0
  31. package/dist/index.d.ts +12 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +107 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/menu.d.ts +9 -0
  36. package/dist/menu.d.ts.map +1 -0
  37. package/dist/menu.js +96 -0
  38. package/dist/menu.js.map +1 -0
  39. package/dist/runners/real-robot.d.ts +15 -0
  40. package/dist/runners/real-robot.d.ts.map +1 -0
  41. package/dist/runners/real-robot.js +46 -0
  42. package/dist/runners/real-robot.js.map +1 -0
  43. package/dist/runners/sim.d.ts +19 -0
  44. package/dist/runners/sim.d.ts.map +1 -0
  45. package/dist/runners/sim.js +53 -0
  46. package/dist/runners/sim.js.map +1 -0
  47. package/dist/util/env.d.ts +24 -0
  48. package/dist/util/env.d.ts.map +1 -0
  49. package/dist/util/env.js +53 -0
  50. package/dist/util/env.js.map +1 -0
  51. package/dist/util/logger.d.ts +24 -0
  52. package/dist/util/logger.d.ts.map +1 -0
  53. package/dist/util/logger.js +62 -0
  54. package/dist/util/logger.js.map +1 -0
  55. package/dist/util/paths.d.ts +57 -0
  56. package/dist/util/paths.d.ts.map +1 -0
  57. package/dist/util/paths.js +132 -0
  58. package/dist/util/paths.js.map +1 -0
  59. package/dist/util/pidfile.d.ts +16 -0
  60. package/dist/util/pidfile.d.ts.map +1 -0
  61. package/dist/util/pidfile.js +63 -0
  62. package/dist/util/pidfile.js.map +1 -0
  63. package/dist/util/state.d.ts +26 -0
  64. package/dist/util/state.d.ts.map +1 -0
  65. package/dist/util/state.js +55 -0
  66. package/dist/util/state.js.map +1 -0
  67. package/package.json +60 -1
  68. package/runtime/BUNDLE.json +11 -0
  69. package/runtime/LICENSE +192 -0
  70. package/runtime/README.md +273 -0
  71. package/runtime/docs/architecture.md +366 -0
  72. package/runtime/docs/cli.md +140 -0
  73. package/runtime/docs/memory.md +292 -0
  74. package/runtime/docs/robot-setup.md +347 -0
  75. package/runtime/package.json +28 -0
  76. package/runtime/packages/agenticros/agenticros-agenticros-0.0.1.tgz +0 -0
  77. package/runtime/packages/agenticros/openclaw.plugin.json +451 -0
  78. package/runtime/packages/agenticros/package.json +41 -0
  79. package/runtime/packages/agenticros/src/camera-snapshot-cache.ts +59 -0
  80. package/runtime/packages/agenticros/src/camera-snapshot-routes.ts +44 -0
  81. package/runtime/packages/agenticros/src/commands/estop.ts +41 -0
  82. package/runtime/packages/agenticros/src/commands/transport.ts +195 -0
  83. package/runtime/packages/agenticros/src/config-file.ts +136 -0
  84. package/runtime/packages/agenticros/src/config-page.ts +498 -0
  85. package/runtime/packages/agenticros/src/context/robot-context.ts +373 -0
  86. package/runtime/packages/agenticros/src/depth.ts +313 -0
  87. package/runtime/packages/agenticros/src/describer.ts +157 -0
  88. package/runtime/packages/agenticros/src/image-binary-trim.ts +16 -0
  89. package/runtime/packages/agenticros/src/index.ts +85 -0
  90. package/runtime/packages/agenticros/src/landing-page.ts +38 -0
  91. package/runtime/packages/agenticros/src/memory.ts +44 -0
  92. package/runtime/packages/agenticros/src/plugin-api.ts +173 -0
  93. package/runtime/packages/agenticros/src/plugin-image-base64.ts +69 -0
  94. package/runtime/packages/agenticros/src/preflight.ts +110 -0
  95. package/runtime/packages/agenticros/src/routes.ts +328 -0
  96. package/runtime/packages/agenticros/src/safety/validator.ts +43 -0
  97. package/runtime/packages/agenticros/src/service.ts +359 -0
  98. package/runtime/packages/agenticros/src/skill-api.ts +65 -0
  99. package/runtime/packages/agenticros/src/skill-loader.ts +146 -0
  100. package/runtime/packages/agenticros/src/teleop/page.ts +498 -0
  101. package/runtime/packages/agenticros/src/teleop/routes.ts +650 -0
  102. package/runtime/packages/agenticros/src/tools/index.ts +26 -0
  103. package/runtime/packages/agenticros/src/tools/ros2-action.ts +50 -0
  104. package/runtime/packages/agenticros/src/tools/ros2-camera.ts +221 -0
  105. package/runtime/packages/agenticros/src/tools/ros2-depth-distance.ts +58 -0
  106. package/runtime/packages/agenticros/src/tools/ros2-introspect.ts +62 -0
  107. package/runtime/packages/agenticros/src/tools/ros2-memory.ts +158 -0
  108. package/runtime/packages/agenticros/src/tools/ros2-param.ts +87 -0
  109. package/runtime/packages/agenticros/src/tools/ros2-publish.ts +52 -0
  110. package/runtime/packages/agenticros/src/tools/ros2-service.ts +46 -0
  111. package/runtime/packages/agenticros/src/tools/ros2-subscribe.ts +71 -0
  112. package/runtime/packages/agenticros/tsconfig.json +9 -0
  113. package/runtime/packages/agenticros-claude-code/README.md +260 -0
  114. package/runtime/packages/agenticros-claude-code/config.example.json +9 -0
  115. package/runtime/packages/agenticros-claude-code/dist/config.d.ts +8 -0
  116. package/runtime/packages/agenticros-claude-code/dist/config.d.ts.map +1 -0
  117. package/runtime/packages/agenticros-claude-code/dist/config.js +93 -0
  118. package/runtime/packages/agenticros-claude-code/dist/config.js.map +1 -0
  119. package/runtime/packages/agenticros-claude-code/dist/depth.d.ts +20 -0
  120. package/runtime/packages/agenticros-claude-code/dist/depth.d.ts.map +1 -0
  121. package/runtime/packages/agenticros-claude-code/dist/depth.js +126 -0
  122. package/runtime/packages/agenticros-claude-code/dist/depth.js.map +1 -0
  123. package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.d.ts +6 -0
  124. package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.d.ts.map +1 -0
  125. package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.js +36 -0
  126. package/runtime/packages/agenticros-claude-code/dist/find-object/coco-classes.js.map +1 -0
  127. package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.d.ts +33 -0
  128. package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.d.ts.map +1 -0
  129. package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.js +134 -0
  130. package/runtime/packages/agenticros-claude-code/dist/find-object/find-object.js.map +1 -0
  131. package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.d.ts +43 -0
  132. package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.d.ts.map +1 -0
  133. package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.js +73 -0
  134. package/runtime/packages/agenticros-claude-code/dist/follow-me/controller.js.map +1 -0
  135. package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.d.ts +58 -0
  136. package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.d.ts.map +1 -0
  137. package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.js +251 -0
  138. package/runtime/packages/agenticros-claude-code/dist/follow-me/detector.js.map +1 -0
  139. package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.d.ts +61 -0
  140. package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.d.ts.map +1 -0
  141. package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.js +268 -0
  142. package/runtime/packages/agenticros-claude-code/dist/follow-me/loop.js.map +1 -0
  143. package/runtime/packages/agenticros-claude-code/dist/index.d.ts +3 -0
  144. package/runtime/packages/agenticros-claude-code/dist/index.d.ts.map +1 -0
  145. package/runtime/packages/agenticros-claude-code/dist/index.js +111 -0
  146. package/runtime/packages/agenticros-claude-code/dist/index.js.map +1 -0
  147. package/runtime/packages/agenticros-claude-code/dist/memory.d.ts +17 -0
  148. package/runtime/packages/agenticros-claude-code/dist/memory.d.ts.map +1 -0
  149. package/runtime/packages/agenticros-claude-code/dist/memory.js +44 -0
  150. package/runtime/packages/agenticros-claude-code/dist/memory.js.map +1 -0
  151. package/runtime/packages/agenticros-claude-code/dist/safety.d.ts +10 -0
  152. package/runtime/packages/agenticros-claude-code/dist/safety.d.ts.map +1 -0
  153. package/runtime/packages/agenticros-claude-code/dist/safety.js +34 -0
  154. package/runtime/packages/agenticros-claude-code/dist/safety.js.map +1 -0
  155. package/runtime/packages/agenticros-claude-code/dist/tools.d.ts +36 -0
  156. package/runtime/packages/agenticros-claude-code/dist/tools.d.ts.map +1 -0
  157. package/runtime/packages/agenticros-claude-code/dist/tools.js +777 -0
  158. package/runtime/packages/agenticros-claude-code/dist/tools.js.map +1 -0
  159. package/runtime/packages/agenticros-claude-code/dist/transport.d.ts +17 -0
  160. package/runtime/packages/agenticros-claude-code/dist/transport.d.ts.map +1 -0
  161. package/runtime/packages/agenticros-claude-code/dist/transport.js +46 -0
  162. package/runtime/packages/agenticros-claude-code/dist/transport.js.map +1 -0
  163. package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.d.ts +42 -0
  164. package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.d.ts.map +1 -0
  165. package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.js +114 -0
  166. package/runtime/packages/agenticros-claude-code/dist/zero-shot/detector.js.map +1 -0
  167. package/runtime/packages/agenticros-claude-code/package.json +29 -0
  168. package/runtime/packages/agenticros-claude-code/src/config.ts +96 -0
  169. package/runtime/packages/agenticros-claude-code/src/depth.ts +173 -0
  170. package/runtime/packages/agenticros-claude-code/src/find-object/coco-classes.ts +38 -0
  171. package/runtime/packages/agenticros-claude-code/src/find-object/find-object.ts +190 -0
  172. package/runtime/packages/agenticros-claude-code/src/follow-me/controller.ts +109 -0
  173. package/runtime/packages/agenticros-claude-code/src/follow-me/depth-loop.ts +420 -0
  174. package/runtime/packages/agenticros-claude-code/src/follow-me/detector.ts +303 -0
  175. package/runtime/packages/agenticros-claude-code/src/follow-me/loop.ts +330 -0
  176. package/runtime/packages/agenticros-claude-code/src/index.ts +125 -0
  177. package/runtime/packages/agenticros-claude-code/src/memory.ts +51 -0
  178. package/runtime/packages/agenticros-claude-code/src/safety.ts +44 -0
  179. package/runtime/packages/agenticros-claude-code/src/tools.ts +891 -0
  180. package/runtime/packages/agenticros-claude-code/src/transport.ts +58 -0
  181. package/runtime/packages/agenticros-claude-code/src/zero-shot/detector.ts +169 -0
  182. package/runtime/packages/agenticros-claude-code/tsconfig.json +9 -0
  183. package/runtime/packages/agenticros-claude-code/yolo-debug.mjs +106 -0
  184. package/runtime/packages/agenticros-gemini/README.md +139 -0
  185. package/runtime/packages/agenticros-gemini/package.json +28 -0
  186. package/runtime/packages/agenticros-gemini/scripts/smoke-api.mjs +42 -0
  187. package/runtime/packages/agenticros-gemini/src/chat.ts +139 -0
  188. package/runtime/packages/agenticros-gemini/src/config.ts +92 -0
  189. package/runtime/packages/agenticros-gemini/src/depth.ts +173 -0
  190. package/runtime/packages/agenticros-gemini/src/index.ts +58 -0
  191. package/runtime/packages/agenticros-gemini/src/memory.ts +32 -0
  192. package/runtime/packages/agenticros-gemini/src/safety.ts +44 -0
  193. package/runtime/packages/agenticros-gemini/src/tools.ts +516 -0
  194. package/runtime/packages/agenticros-gemini/src/transport.ts +58 -0
  195. package/runtime/packages/agenticros-gemini/tsconfig.json +8 -0
  196. package/runtime/packages/core/package.json +47 -0
  197. package/runtime/packages/core/src/banner.ts +32 -0
  198. package/runtime/packages/core/src/cmd-vel-twist.ts +31 -0
  199. package/runtime/packages/core/src/config.ts +279 -0
  200. package/runtime/packages/core/src/index.ts +54 -0
  201. package/runtime/packages/core/src/memory/__tests__/factory.test.ts +70 -0
  202. package/runtime/packages/core/src/memory/__tests__/local-provider.test.ts +195 -0
  203. package/runtime/packages/core/src/memory/__tests__/mem0-provider.test.ts +192 -0
  204. package/runtime/packages/core/src/memory/__tests__/smart-defaults.test.ts +46 -0
  205. package/runtime/packages/core/src/memory/factory.ts +63 -0
  206. package/runtime/packages/core/src/memory/index.ts +10 -0
  207. package/runtime/packages/core/src/memory/local/provider.ts +229 -0
  208. package/runtime/packages/core/src/memory/mem0/provider.ts +379 -0
  209. package/runtime/packages/core/src/memory/types.ts +96 -0
  210. package/runtime/packages/core/src/topic-utils.ts +95 -0
  211. package/runtime/packages/core/src/transport/factory.ts +47 -0
  212. package/runtime/packages/core/src/transport/local/conversion.ts +333 -0
  213. package/runtime/packages/core/src/transport/local/entities.ts +129 -0
  214. package/runtime/packages/core/src/transport/local/transport.ts +406 -0
  215. package/runtime/packages/core/src/transport/rosbridge/actions.ts +81 -0
  216. package/runtime/packages/core/src/transport/rosbridge/adapter.ts +157 -0
  217. package/runtime/packages/core/src/transport/rosbridge/client.ts +438 -0
  218. package/runtime/packages/core/src/transport/rosbridge/services.ts +41 -0
  219. package/runtime/packages/core/src/transport/rosbridge/topics.ts +60 -0
  220. package/runtime/packages/core/src/transport/rosbridge/types.ts +118 -0
  221. package/runtime/packages/core/src/transport/transport.ts +77 -0
  222. package/runtime/packages/core/src/transport/types.ts +137 -0
  223. package/runtime/packages/core/src/transport/webrtc/signaling-client.ts +196 -0
  224. package/runtime/packages/core/src/transport/webrtc/signaling-types.ts +130 -0
  225. package/runtime/packages/core/src/transport/webrtc/transport.ts +516 -0
  226. package/runtime/packages/core/src/transport/zenoh/adapter.ts +357 -0
  227. package/runtime/packages/core/src/transport/zenoh/cdr.ts +183 -0
  228. package/runtime/packages/core/src/transport/zenoh/keys.ts +51 -0
  229. package/runtime/packages/core/tsconfig.json +9 -0
  230. package/runtime/packages/ros-camera/package.json +30 -0
  231. package/runtime/packages/ros-camera/src/index.ts +13 -0
  232. package/runtime/packages/ros-camera/src/snapshot.ts +372 -0
  233. package/runtime/packages/ros-camera/tsconfig.json +9 -0
  234. package/runtime/pnpm-lock.yaml +5260 -0
  235. package/runtime/pnpm-workspace.yaml +2 -0
  236. package/runtime/ros2_ws/src/agenticros_agent/agenticros_agent/__init__.py +0 -0
  237. package/runtime/ros2_ws/src/agenticros_agent/agenticros_agent/agent_node.py +561 -0
  238. package/runtime/ros2_ws/src/agenticros_agent/package.xml +25 -0
  239. package/runtime/ros2_ws/src/agenticros_agent/resource/agenticros_agent +0 -0
  240. package/runtime/ros2_ws/src/agenticros_agent/setup.cfg +4 -0
  241. package/runtime/ros2_ws/src/agenticros_agent/setup.py +25 -0
  242. package/runtime/ros2_ws/src/agenticros_bringup/README.md +128 -0
  243. package/runtime/ros2_ws/src/agenticros_bringup/agenticros_bringup/__init__.py +1 -0
  244. package/runtime/ros2_ws/src/agenticros_bringup/agenticros_bringup/cmd_vel_relay.py +33 -0
  245. package/runtime/ros2_ws/src/agenticros_bringup/launch/cmd_vel_bridge.launch.py +58 -0
  246. package/runtime/ros2_ws/src/agenticros_bringup/launch/gazebo_turtlebot3.launch.py +69 -0
  247. package/runtime/ros2_ws/src/agenticros_bringup/launch/mode_a_gazebo.launch.py +55 -0
  248. package/runtime/ros2_ws/src/agenticros_bringup/launch/mode_a_gazebo_rviz.launch.py +48 -0
  249. package/runtime/ros2_ws/src/agenticros_bringup/launch/realsense_rosbridge.launch.py +154 -0
  250. package/runtime/ros2_ws/src/agenticros_bringup/launch/rosbridge_gazebo.launch.py +54 -0
  251. package/runtime/ros2_ws/src/agenticros_bringup/launch/rviz.launch.py +38 -0
  252. package/runtime/ros2_ws/src/agenticros_bringup/launch/turtlebot3_gazebo_rviz.launch.py +42 -0
  253. package/runtime/ros2_ws/src/agenticros_bringup/package.xml +24 -0
  254. package/runtime/ros2_ws/src/agenticros_bringup/resource/agenticros_bringup +0 -0
  255. package/runtime/ros2_ws/src/agenticros_bringup/rviz/turtlebot3_agenticros.rviz +174 -0
  256. package/runtime/ros2_ws/src/agenticros_bringup/setup.cfg +4 -0
  257. package/runtime/ros2_ws/src/agenticros_bringup/setup.py +28 -0
  258. package/runtime/ros2_ws/src/agenticros_discovery/agenticros_discovery/__init__.py +0 -0
  259. package/runtime/ros2_ws/src/agenticros_discovery/agenticros_discovery/discovery_node.py +172 -0
  260. package/runtime/ros2_ws/src/agenticros_discovery/package.xml +22 -0
  261. package/runtime/ros2_ws/src/agenticros_discovery/resource/agenticros_discovery +0 -0
  262. package/runtime/ros2_ws/src/agenticros_discovery/setup.cfg +5 -0
  263. package/runtime/ros2_ws/src/agenticros_discovery/setup.py +25 -0
  264. package/runtime/ros2_ws/src/agenticros_follow_me/README.md +66 -0
  265. package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/__init__.py +1 -0
  266. package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/__main__.py +5 -0
  267. package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/follow_me_node.py +278 -0
  268. package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/follower_controller.py +631 -0
  269. package/runtime/ros2_ws/src/agenticros_follow_me/agenticros_follow_me/person_tracker.py +635 -0
  270. package/runtime/ros2_ws/src/agenticros_follow_me/package.xml +22 -0
  271. package/runtime/ros2_ws/src/agenticros_follow_me/resource/agenticros_follow_me +0 -0
  272. package/runtime/ros2_ws/src/agenticros_follow_me/setup.py +25 -0
  273. package/runtime/ros2_ws/src/agenticros_msgs/CMakeLists.txt +26 -0
  274. package/runtime/ros2_ws/src/agenticros_msgs/msg/CapabilityManifest.msg +9 -0
  275. package/runtime/ros2_ws/src/agenticros_msgs/package.xml +22 -0
  276. package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeGetStatus.srv +11 -0
  277. package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeSetDistance.srv +4 -0
  278. package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeSetTarget.srv +6 -0
  279. package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeStart.srv +5 -0
  280. package/runtime/ros2_ws/src/agenticros_msgs/srv/FollowMeStop.srv +3 -0
  281. package/runtime/ros2_ws/src/agenticros_msgs/srv/GetCapabilities.srv +5 -0
  282. package/runtime/ros2_ws/src/agenticros_sim/CMakeLists.txt +24 -0
  283. package/runtime/ros2_ws/src/agenticros_sim/README.md +120 -0
  284. package/runtime/ros2_ws/src/agenticros_sim/config/agenticros-sim.config.json +28 -0
  285. package/runtime/ros2_ws/src/agenticros_sim/config/amr_bridge.yaml +111 -0
  286. package/runtime/ros2_ws/src/agenticros_sim/config/amr_view.rviz +172 -0
  287. package/runtime/ros2_ws/src/agenticros_sim/env-hooks/gz_resource_path.dsv.in +3 -0
  288. package/runtime/ros2_ws/src/agenticros_sim/env-hooks/gz_resource_path.sh.in +7 -0
  289. package/runtime/ros2_ws/src/agenticros_sim/launch/sim_amr.launch.py +159 -0
  290. package/runtime/ros2_ws/src/agenticros_sim/models/agenticros_amr/model.config +17 -0
  291. package/runtime/ros2_ws/src/agenticros_sim/models/agenticros_amr/model.sdf +244 -0
  292. package/runtime/ros2_ws/src/agenticros_sim/package.xml +27 -0
  293. package/runtime/ros2_ws/src/agenticros_sim/worlds/agenticros_indoor.sdf +183 -0
  294. package/runtime/scripts/activate_workspace.sh +285 -0
  295. package/runtime/scripts/agenticros-describer.policy.yaml +96 -0
  296. package/runtime/scripts/agenticros-proxy.cjs +99 -0
  297. package/runtime/scripts/agenticros-rosbridge.policy.yaml +62 -0
  298. package/runtime/scripts/check-cli-tarball-size.mjs +42 -0
  299. package/runtime/scripts/configure_agenticros.sh +200 -0
  300. package/runtime/scripts/configure_for_sim.sh +64 -0
  301. package/runtime/scripts/fix-openclaw-control-ui-path.sh +20 -0
  302. package/runtime/scripts/install_cli.sh +94 -0
  303. package/runtime/scripts/install_rosbridge_from_source.sh +67 -0
  304. package/runtime/scripts/lib/agenticros-banner.sh +28 -0
  305. package/runtime/scripts/onboard_robot.sh +75 -0
  306. package/runtime/scripts/openai.policy.yaml +77 -0
  307. package/runtime/scripts/openclaw-dashboard-url.cjs +49 -0
  308. package/runtime/scripts/pack-runtime.mjs +245 -0
  309. package/runtime/scripts/run_demo_native.sh +43 -0
  310. package/runtime/scripts/run_nemoclaw_host_stack.sh +91 -0
  311. package/runtime/scripts/run_robot_rosbridge.sh +36 -0
  312. package/runtime/scripts/sandbox_rosbridge_relay.py +137 -0
  313. package/runtime/scripts/setup-openclaw-local.cjs +75 -0
  314. package/runtime/scripts/setup_gateway_plugin.sh +329 -0
  315. package/runtime/scripts/setup_robot.sh +113 -0
  316. package/runtime/scripts/setup_workspace.sh +484 -0
  317. package/runtime/scripts/sim/run_sim.sh +146 -0
  318. package/runtime/scripts/smoke_test_nemoclaw.sh +123 -0
  319. package/runtime/scripts/start_demo.sh +55 -0
  320. package/runtime/scripts/sync-skill-tools.mjs +335 -0
  321. package/runtime/scripts/test-follow-me-sim.mjs +135 -0
  322. package/runtime/scripts/test-mcp-e2e.mjs +184 -0
  323. package/runtime/scripts/test-rclnodejs.mts +129 -0
  324. package/runtime/scripts/use-openclaw-2026.2.26.sh +19 -0
  325. package/runtime/scripts/use-openclaw-2026.3.11.sh +19 -0
  326. package/runtime/scripts/zenoh-bridge-ros2dds-robot.json5 +30 -0
  327. package/runtime/scripts/zenohd-agenticros.json5 +11 -0
  328. package/runtime/scripts/zenohd-rosclaw.json5 +11 -0
  329. package/runtime/tsconfig.base.json +19 -0
  330. package/index.js +0 -6
@@ -0,0 +1,200 @@
1
+ #!/usr/bin/env bash
2
+ # configure_agenticros.sh — Configure AgenticROS plugin: transport mode, namespace, and optional Docker
3
+ #
4
+ # Updates ~/.openclaw/openclaw.json (or OPENCLAW_CONFIG) with plugins.entries.agenticros.config
5
+ # so that transport.mode, rosbridge.url, zenoh.routerEndpoint, robot.namespace, etc. are set.
6
+ #
7
+ # Usage:
8
+ # ./scripts/configure_agenticros.sh [OPTIONS]
9
+ # ./scripts/configure_agenticros.sh --interactive
10
+ #
11
+ # Options:
12
+ # --mode MODE A|B|C|D or local|rosbridge|webrtc|zenoh
13
+ # --namespace NS Robot namespace (e.g. robot-uuid) → topics like /robot-uuid/cmd_vel
14
+ # --robot-ip IP For Mode B: robot IP/hostname (sets rosbridge.url = ws://IP:9090)
15
+ # --zenoh-endpoint For Mode D: Zenoh router endpoint (e.g. ws://localhost:10000)
16
+ # --zenoh-domain For Mode D: domain ID (default 0)
17
+ # --docker For demo: use Mode B and start Docker ROS2+rosbridge (ws://localhost:9090)
18
+ # --interactive Prompt for mode and namespace
19
+ # --config FILE OpenClaw config path (default: $HOME/.openclaw/openclaw.json or OPENCLAW_CONFIG)
20
+ #
21
+ # Mode summary:
22
+ # A / local — Everything on robot (OpenClaw + ROS2 on same machine)
23
+ # B / rosbridge — Robot on network; plugin connects via rosbridge (ws://robot-ip:9090)
24
+ # C / webrtc — Remote robot (WebRTC); set signaling URL, robot ID/key in plugin config
25
+ # D / zenoh — Robot uses Zenoh RMW; plugin connects to Zenoh router
26
+
27
+ set -e
28
+
29
+ REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
30
+ source "$REPO_ROOT/scripts/lib/agenticros-banner.sh"
31
+ OPENCLAW_JSON="${OPENCLAW_CONFIG:-$HOME/.openclaw/openclaw.json}"
32
+ MODE=""
33
+ NAMESPACE=""
34
+ ROBOT_IP=""
35
+ ZENOH_ENDPOINT=""
36
+ ZENOH_DOMAIN="0"
37
+ DOCKER=false
38
+ INTERACTIVE=false
39
+
40
+ usage() {
41
+ sed -n '2,28p' "$0" | sed 's/^# \?//'
42
+ echo ""
43
+ echo "Examples:"
44
+ echo " ./scripts/configure_agenticros.sh --mode B --robot-ip 192.168.1.50 --namespace mybot"
45
+ echo " ./scripts/configure_agenticros.sh --mode D --zenoh-endpoint ws://localhost:10000"
46
+ echo " ./scripts/configure_agenticros.sh --docker"
47
+ echo " ./scripts/configure_agenticros.sh --interactive"
48
+ exit 0
49
+ }
50
+
51
+ while [[ $# -gt 0 ]]; do
52
+ case $1 in
53
+ -h|--help) usage ;;
54
+ --mode) MODE="$2"; shift 2 ;;
55
+ --namespace) NAMESPACE="$2"; shift 2 ;;
56
+ --robot-ip) ROBOT_IP="$2"; shift 2 ;;
57
+ --zenoh-endpoint) ZENOH_ENDPOINT="$2"; shift 2 ;;
58
+ --zenoh-domain) ZENOH_DOMAIN="${2:-0}"; shift 2 ;;
59
+ --docker) DOCKER=true; shift ;;
60
+ --interactive) INTERACTIVE=true; shift ;;
61
+ --config) OPENCLAW_JSON="$2"; shift 2 ;;
62
+ *) echo "Unknown option: $1"; usage ;;
63
+ esac
64
+ done
65
+
66
+ # Map friendly mode to transport mode
67
+ resolve_mode() {
68
+ local m="$1"
69
+ case "$m" in
70
+ A|local) echo "local" ;;
71
+ B|rosbridge) echo "rosbridge" ;;
72
+ C|webrtc) echo "webrtc" ;;
73
+ D|zenoh) echo "zenoh" ;;
74
+ *) echo "$m" ;;
75
+ esac
76
+ }
77
+
78
+ if [[ "$INTERACTIVE" == true ]]; then
79
+ agenticros_banner
80
+ echo "AgenticROS configuration"
81
+ echo ""
82
+ echo "Mode A — Everything on robot (OpenClaw on robot, transport = local)"
83
+ echo "Mode B — Connected robot (OpenClaw here, robot on network; transport = rosbridge)"
84
+ echo "Mode C — Remote robot / WebRTC (robot behind NAT; transport = webrtc)"
85
+ echo "Mode D — Zenoh (robot uses Zenoh RMW; transport = zenoh)"
86
+ echo ""
87
+ read -r -p "Choose mode (A/B/C/D) [B]: " mode_choice
88
+ mode_choice="${mode_choice:-B}"
89
+ MODE=$(resolve_mode "$mode_choice")
90
+
91
+ read -r -p "Robot namespace (empty for global topics) []: " NAMESPACE
92
+
93
+ if [[ "$MODE" == "rosbridge" ]]; then
94
+ if [[ "$DOCKER" != true ]]; then
95
+ read -r -p "Robot IP or hostname (for rosbridge URL) [localhost]: " ROBOT_IP
96
+ ROBOT_IP="${ROBOT_IP:-localhost}"
97
+ else
98
+ ROBOT_IP="localhost"
99
+ fi
100
+ fi
101
+
102
+ if [[ "$MODE" == "zenoh" ]]; then
103
+ read -r -p "Zenoh router endpoint (e.g. ws://localhost:10000) [ws://localhost:10000]: " ZENOH_ENDPOINT
104
+ ZENOH_ENDPOINT="${ZENOH_ENDPOINT:-ws://localhost:10000}"
105
+ fi
106
+ fi
107
+
108
+ # Docker implies Mode B + localhost
109
+ if [[ "$DOCKER" == true ]]; then
110
+ MODE="rosbridge"
111
+ ROBOT_IP="localhost"
112
+ fi
113
+
114
+ # If no mode chosen, show current config and exit
115
+ if [[ -z "$MODE" ]]; then
116
+ echo "Config file: $OPENCLAW_JSON"
117
+ if [[ -f "$OPENCLAW_JSON" ]] && command -v jq &>/dev/null; then
118
+ echo ""
119
+ jq '.plugins.entries.agenticros.config // "not set"' "$OPENCLAW_JSON" 2>/dev/null || echo "Could not read plugin config."
120
+ else
121
+ echo "Use --mode, --interactive, or --help."
122
+ fi
123
+ exit 0
124
+ fi
125
+
126
+ TRANSPORT_MODE=$(resolve_mode "$MODE")
127
+
128
+ echo "=============================================="
129
+ echo " AgenticROS configuration"
130
+ echo "=============================================="
131
+ echo " Config: $OPENCLAW_JSON"
132
+ echo " Mode: $TRANSPORT_MODE"
133
+ [[ -n "$NAMESPACE" ]] && echo " Namespace: $NAMESPACE"
134
+ [[ -n "$ROBOT_IP" ]] && echo " Rosbridge: ws://${ROBOT_IP}:9090"
135
+ [[ -n "$ZENOH_ENDPOINT" ]] && echo " Zenoh: $ZENOH_ENDPOINT"
136
+ echo ""
137
+
138
+ # Ensure config file and plugins.entries.agenticros exist
139
+ if [[ ! -f "$OPENCLAW_JSON" ]]; then
140
+ echo "Config file not found: $OPENCLAW_JSON"
141
+ echo "Create it by running OpenClaw configure once, or set OPENCLAW_CONFIG."
142
+ exit 1
143
+ fi
144
+
145
+ if ! command -v jq &>/dev/null; then
146
+ echo "jq is required to update the config file. Install jq or edit $OPENCLAW_JSON manually:"
147
+ echo ""
148
+ echo " transport.mode: $TRANSPORT_MODE"
149
+ [[ -n "$NAMESPACE" ]] && echo " robot.namespace: $NAMESPACE"
150
+ if [[ "$TRANSPORT_MODE" == "rosbridge" ]]; then
151
+ echo " rosbridge.url: ws://${ROBOT_IP:-localhost}:9090"
152
+ fi
153
+ if [[ "$TRANSPORT_MODE" == "zenoh" ]]; then
154
+ echo " zenoh.routerEndpoint: ${ZENOH_ENDPOINT:-ws://localhost:10000}"
155
+ echo " zenoh.domainId: $ZENOH_DOMAIN"
156
+ fi
157
+ exit 1
158
+ fi
159
+
160
+ # Build the config fragment we want under plugins.entries.agenticros.config
161
+ # jq: merge existing config with our overrides
162
+ CONFIG_OVERRIDES='.transport.mode = "'"$TRANSPORT_MODE"'"'
163
+ [[ -n "$NAMESPACE" ]] && CONFIG_OVERRIDES="$CONFIG_OVERRIDES | .robot.namespace = \"$NAMESPACE\""
164
+
165
+ if [[ "$TRANSPORT_MODE" == "rosbridge" ]]; then
166
+ CONFIG_OVERRIDES="$CONFIG_OVERRIDES | .rosbridge.url = \"ws://${ROBOT_IP:-localhost}:9090\""
167
+ fi
168
+
169
+ if [[ "$TRANSPORT_MODE" == "zenoh" ]]; then
170
+ CONFIG_OVERRIDES="$CONFIG_OVERRIDES | .zenoh.routerEndpoint = \"${ZENOH_ENDPOINT:-ws://localhost:10000}\""
171
+ CONFIG_OVERRIDES="$CONFIG_OVERRIDES | .zenoh.domainId = ($ZENOH_DOMAIN | tonumber)"
172
+ CONFIG_OVERRIDES="$CONFIG_OVERRIDES | .zenoh.keyFormat = \"ros2dds\""
173
+ fi
174
+
175
+ # Read current config, ensure structure, merge, write back
176
+ TMP=$(mktemp)
177
+ jq '
178
+ .plugins.entries.agenticros.config = ((.plugins.entries.agenticros.config // {}) | '"$CONFIG_OVERRIDES"')
179
+ ' "$OPENCLAW_JSON" > "$TMP" && mv "$TMP" "$OPENCLAW_JSON"
180
+
181
+ echo "Updated $OPENCLAW_JSON with transport.mode=$TRANSPORT_MODE and selected options."
182
+ echo ""
183
+
184
+ if [[ "$DOCKER" == true ]]; then
185
+ echo "Starting Docker stack (ROS2 + rosbridge) in background..."
186
+ if [[ -f "$REPO_ROOT/docker/docker-compose.yml" ]]; then
187
+ (cd "$REPO_ROOT" && docker compose -f docker/docker-compose.yml up -d ros2) || true
188
+ echo "Run: docker compose -f docker/docker-compose.yml logs -f ros2"
189
+ else
190
+ echo "docker/docker-compose.yml not found; start your ROS2+rosbridge stack manually."
191
+ fi
192
+ echo ""
193
+ fi
194
+
195
+ echo "Next steps:"
196
+ echo " 1. Restart the OpenClaw gateway so the plugin picks up the new config."
197
+ echo " 2. For Mode B: ensure rosbridge is running on the robot (e.g. ros2 launch rosbridge_server rosbridge_websocket_launch.xml)."
198
+ echo " 3. For Mode D: ensure Zenoh router is running with zenoh-plugin-remote-api and ROS2 uses RMW_IMPLEMENTATION=rmw_zenoh_cpp."
199
+ echo ""
200
+ echo "See docs/robot-setup.md for details."
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env bash
2
+ # configure_for_sim.sh
3
+ #
4
+ # One-shot helper: copy the simulation-tuned AgenticROS config template into
5
+ # ~/.agenticros/config.json. Use this when you want the MCP server + OpenClaw
6
+ # plugin to talk to the sim AMR's topics (which use no robot-namespace
7
+ # prefix - so a fresh "real robot" config with a UUID namespace would miss
8
+ # every topic).
9
+ #
10
+ # Usage:
11
+ # ./scripts/configure_for_sim.sh # writes ~/.agenticros/config.json
12
+ # ./scripts/configure_for_sim.sh --backup # back up an existing config first
13
+ # ./scripts/configure_for_sim.sh --print # print the template to stdout
14
+ #
15
+ # After running, restart the MCP server (or run `agenticros up sim-amr`).
16
+
17
+ set -euo pipefail
18
+
19
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
20
+ SRC="$ROOT/ros2_ws/src/agenticros_sim/config/agenticros-sim.config.json"
21
+ DEST_DIR="$HOME/.agenticros"
22
+ DEST="$DEST_DIR/config.json"
23
+
24
+ PRINT_ONLY=false
25
+ DO_BACKUP=false
26
+
27
+ while [[ $# -gt 0 ]]; do
28
+ case "$1" in
29
+ --print) PRINT_ONLY=true; shift ;;
30
+ --backup) DO_BACKUP=true; shift ;;
31
+ -h|--help) sed -n '2,16p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'; exit 0 ;;
32
+ *) echo "Unknown arg: $1" >&2; exit 2 ;;
33
+ esac
34
+ done
35
+
36
+ if [[ ! -f "$SRC" ]]; then
37
+ echo "Template missing: $SRC" >&2
38
+ echo "Did you build the ros2 workspace? (cd $ROOT/ros2_ws && colcon build)" >&2
39
+ exit 1
40
+ fi
41
+
42
+ if [[ "$PRINT_ONLY" == "true" ]]; then
43
+ cat "$SRC"
44
+ exit 0
45
+ fi
46
+
47
+ mkdir -p "$DEST_DIR"
48
+
49
+ if [[ -f "$DEST" ]]; then
50
+ if [[ "$DO_BACKUP" == "true" ]]; then
51
+ BAK="${DEST}.real.$(date +%Y%m%d-%H%M%S).bak"
52
+ cp -a "$DEST" "$BAK"
53
+ echo "[configure_for_sim] Backed up existing config -> $BAK"
54
+ else
55
+ echo "[configure_for_sim] $DEST already exists. Re-run with --backup to keep a copy." >&2
56
+ echo "[configure_for_sim] Aborting (use --backup to overwrite)." >&2
57
+ exit 1
58
+ fi
59
+ fi
60
+
61
+ cp "$SRC" "$DEST"
62
+ echo "[configure_for_sim] Wrote $DEST"
63
+ echo "[configure_for_sim] Inspect with: agenticros config show"
64
+ echo "[configure_for_sim] Bring up sim with: agenticros up sim-amr"
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env bash
2
+ # Fix Control UI 404 when OpenClaw is installed globally (npm install -g openclaw).
3
+ # The gateway's path resolver often fails to find dist/control-ui; this symlink fixes it.
4
+ # See: https://getclawkit.com/docs/troubleshooting/control-ui-assets-not-found
5
+ set -e
6
+ OPENCLAW_ROOT=$(npm root -g)/openclaw
7
+ if [[ ! -d "$OPENCLAW_ROOT" ]]; then
8
+ echo "OpenClaw not found at $OPENCLAW_ROOT. Install it first: npm install -g openclaw@2026.2.26"
9
+ exit 1
10
+ fi
11
+ if [[ ! -d "$OPENCLAW_ROOT/dist/control-ui" ]]; then
12
+ echo "No dist/control-ui at $OPENCLAW_ROOT — reinstall OpenClaw: npm install -g openclaw@2026.2.26"
13
+ exit 1
14
+ fi
15
+ ln -sf "$OPENCLAW_ROOT/dist/control-ui" "$OPENCLAW_ROOT/control-ui"
16
+ echo ""
17
+ echo " Symlink created: $OPENCLAW_ROOT/control-ui -> dist/control-ui"
18
+ echo " Restart the gateway, then open the dashboard URL (with #token=...)."
19
+ echo " If you need the URL: node scripts/openclaw-dashboard-url.cjs"
20
+ echo ""
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env bash
2
+ # install_cli.sh - put the AgenticROS CLI on PATH for the current user.
3
+ #
4
+ # Three install strategies are tried, in order of preference:
5
+ # 1. `pnpm link --global` against the workspace package (best for contributors;
6
+ # live edits to packages/agenticros-cli/src/ are visible immediately after
7
+ # `pnpm --filter agenticros build`).
8
+ # 2. PATH symlink under ~/.local/bin pointing at the repo's ./agenticros shim
9
+ # (works without a global pnpm prefix).
10
+ # 3. Print clear next-step instructions.
11
+ #
12
+ # Usage:
13
+ # ./scripts/install_cli.sh # auto-pick the best strategy
14
+ # ./scripts/install_cli.sh --method symlink # force one
15
+ #
16
+ # After install, run `agenticros --version` to confirm.
17
+
18
+ set -euo pipefail
19
+
20
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
21
+ CLI_DIR="$ROOT/packages/agenticros-cli"
22
+ ROOT_SHIM="$ROOT/agenticros"
23
+ METHOD="auto"
24
+
25
+ while [[ $# -gt 0 ]]; do
26
+ case "$1" in
27
+ --method) METHOD="$2"; shift 2 ;;
28
+ --help|-h)
29
+ sed -n '2,16p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'
30
+ exit 0 ;;
31
+ *) echo "Unknown flag: $1" >&2; exit 2 ;;
32
+ esac
33
+ done
34
+
35
+ log() { printf "\033[36m[install-cli]\033[0m %s\n" "$*"; }
36
+ ok() { printf "\033[32m[install-cli]\033[0m %s\n" "$*"; }
37
+ warn(){ printf "\033[33m[install-cli]\033[0m %s\n" "$*"; }
38
+ err() { printf "\033[31m[install-cli]\033[0m %s\n" "$*" >&2; }
39
+
40
+ ensure_built() {
41
+ if [[ ! -f "$CLI_DIR/dist/index.js" ]]; then
42
+ log "Building the CLI (one-time)..."
43
+ (cd "$ROOT" && pnpm --filter agenticros build)
44
+ fi
45
+ }
46
+
47
+ try_pnpm_link() {
48
+ command -v pnpm >/dev/null || return 1
49
+ ensure_built
50
+ log "Installing via pnpm link --global from $CLI_DIR"
51
+ (cd "$CLI_DIR" && pnpm link --global) || return 1
52
+ ok "Linked. Run: agenticros --version"
53
+ return 0
54
+ }
55
+
56
+ try_symlink() {
57
+ local target="$HOME/.local/bin"
58
+ mkdir -p "$target"
59
+ ensure_built
60
+ if ln -sf "$ROOT_SHIM" "$target/agenticros"; then
61
+ ok "Symlinked $ROOT_SHIM -> $target/agenticros"
62
+ case ":$PATH:" in
63
+ *":$target:"*) ok "$target is already on PATH." ;;
64
+ *) warn "Add $target to PATH (e.g. add 'export PATH=\"\$HOME/.local/bin:\$PATH\"' to your shell rc)." ;;
65
+ esac
66
+ return 0
67
+ fi
68
+ return 1
69
+ }
70
+
71
+ print_instructions() {
72
+ cat <<EOF >&2
73
+ Failed to install the CLI automatically. Manual options:
74
+
75
+ 1. Add the repo's shim to PATH for this shell:
76
+ export PATH="$ROOT:\$PATH"
77
+
78
+ 2. Use pnpm directly:
79
+ cd "$ROOT" && pnpm --filter agenticros build && pnpm --filter agenticros link --global
80
+
81
+ 3. Use the bundled root shim ad-hoc:
82
+ $ROOT_SHIM --help
83
+
84
+ After any of the above, run: agenticros --version
85
+ EOF
86
+ return 1
87
+ }
88
+
89
+ case "$METHOD" in
90
+ pnpm-link) try_pnpm_link || print_instructions ;;
91
+ symlink) try_symlink || print_instructions ;;
92
+ auto) try_pnpm_link || try_symlink || print_instructions ;;
93
+ *) err "Unknown --method $METHOD"; exit 2 ;;
94
+ esac
@@ -0,0 +1,67 @@
1
+ #!/bin/bash
2
+ # install_rosbridge_from_source.sh - Build and install rosbridge_suite from source
3
+ #
4
+ # Use this when apt install ros-<distro>-rosbridge-suite fails (e.g. 404).
5
+ # Usage: ./scripts/install_rosbridge_from_source.sh [jazzy|humble]
6
+ # Default: jazzy
7
+
8
+ set -e
9
+
10
+ ROS_DISTRO="${1:-jazzy}"
11
+ REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
12
+ ROS2_WS="$REPO_ROOT/ros2_ws"
13
+ SRC="$ROS2_WS/src"
14
+ BRIDGE_REPO="$SRC/rosbridge_suite_repo"
15
+
16
+ echo "Installing rosbridge_suite from source for ROS2 $ROS_DISTRO"
17
+ echo "Workspace: $ROS2_WS"
18
+ echo ""
19
+
20
+ source "/opt/ros/$ROS_DISTRO/setup.bash"
21
+
22
+ # Python deps required by rosbridge_server (tornado). Use a venv to avoid touching system Python.
23
+ VENV_ROSBRIDGE="$ROS2_WS/venv_rosbridge"
24
+ if [[ ! -d "$VENV_ROSBRIDGE" ]]; then
25
+ echo "Creating venv for rosbridge at $VENV_ROSBRIDGE..."
26
+ python3 -m venv "$VENV_ROSBRIDGE"
27
+ fi
28
+ echo "Installing Python deps in venv (tornado, pymongo, cbor2, ujson)..."
29
+ "$VENV_ROSBRIDGE/bin/pip" install --quiet tornado pymongo cbor2 ujson
30
+ echo "Venv ready. Run scripts will set PYTHONPATH automatically."
31
+
32
+ # Clone repo (ros2 branch) if not present
33
+ if [[ ! -d "$BRIDGE_REPO" ]]; then
34
+ echo "Cloning RobotWebTools/rosbridge_suite (branch ros2)..."
35
+ git clone -b ros2 --depth 1 https://github.com/RobotWebTools/rosbridge_suite.git "$BRIDGE_REPO"
36
+ else
37
+ echo "Repo already at $BRIDGE_REPO, pulling latest..."
38
+ (cd "$BRIDGE_REPO" && git fetch origin ros2 && git checkout ros2 && git pull --ff-only)
39
+ fi
40
+
41
+ # Symlink packages into src so colcon finds them (avoid name clash: repo dir is rosbridge_suite_repo)
42
+ for pkg in rosapi_msgs rosbridge_msgs rosbridge_library rosapi rosbridge_server rosbridge_suite; do
43
+ if [[ -d "$BRIDGE_REPO/$pkg" ]]; then
44
+ if [[ -L "$SRC/$pkg" ]]; then
45
+ rm -f "$SRC/$pkg"
46
+ fi
47
+ if [[ ! -e "$SRC/$pkg" ]]; then
48
+ ln -sf "$(basename "$BRIDGE_REPO")/$pkg" "$SRC/$pkg"
49
+ echo "Linked $pkg"
50
+ fi
51
+ fi
52
+ done
53
+
54
+ # Build (skip tests so we don't need ament_cmake_mypy)
55
+ echo ""
56
+ echo "Building workspace (this may take a few minutes)..."
57
+ cd "$ROS2_WS"
58
+ colcon build --symlink-install --packages-up-to rosbridge_server --cmake-args -DBUILD_TESTING=OFF
59
+
60
+ echo ""
61
+ echo "Done. Source and run rosbridge with:"
62
+ echo " source /opt/ros/$ROS_DISTRO/setup.bash"
63
+ echo " source $ROS2_WS/install/setup.bash"
64
+ echo " ros2 launch rosbridge_server rosbridge_websocket_launch.xml"
65
+ echo ""
66
+ echo "Or use: ./scripts/run_robot_rosbridge.sh $ROS_DISTRO"
67
+ echo "Or: ./scripts/run_demo_native.sh $ROS_DISTRO"
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env bash
2
+
3
+ agenticros_banner() {
4
+ if [[ "${AGENTICROS_NO_BANNER:-}" == "1" ]]; then
5
+ return 0
6
+ fi
7
+
8
+ local reset=""
9
+ local green=""
10
+ local yellow=""
11
+ local dim=""
12
+ if [[ -t 1 ]] && command -v tput >/dev/null 2>&1; then
13
+ reset="$(tput sgr0 || true)"
14
+ green="$(tput setaf 10 || true)"
15
+ yellow="$(tput setaf 11 || true)"
16
+ dim="$(tput dim || true)"
17
+ fi
18
+
19
+ cat <<EOF
20
+ ${green} _ _ _ ____ ___ ____
21
+ / \ __ _ ___ _ __ | |_(_) ___ | _ \ / _ \/ ___|
22
+ / _ \ / _\` |/ _ \ '_ \| __| |/ __|| |_) | | | \___ \\
23
+ / ___ \ (_| | __/ | | | |_| | (__ | _ <| |_| |___) |
24
+ /_/ \_\__, |\___|_| |_|\__|_|\___||_| \_\\___/|____/
25
+ |___/${reset}
26
+ ${yellow} AgenticROS${reset} ${dim}- agentic AI for ROS-powered robots${reset}
27
+ EOF
28
+ }
@@ -0,0 +1,75 @@
1
+ #!/bin/bash
2
+ # onboard_robot.sh - Interactive onboarding for a new AgenticROS robot
3
+ #
4
+ # Run from the agenticros repo root. Asks whether you're on the robot or the
5
+ # gateway, then runs the right setup and prints a checklist.
6
+ #
7
+ # Usage: ./scripts/onboard_robot.sh
8
+
9
+ set -e
10
+
11
+ REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
12
+ cd "$REPO_ROOT"
13
+ source "$REPO_ROOT/scripts/lib/agenticros-banner.sh"
14
+
15
+ echo ""
16
+ agenticros_banner
17
+ echo ""
18
+ echo " AgenticROS - Onboard a new robot"
19
+ echo ""
20
+
21
+ # Where are we?
22
+ echo "Where is this script running?"
23
+ echo " 1) On the ROBOT (Ubuntu + ROS2) — set up rosbridge and run bridges"
24
+ echo " 2) On the GATEWAY (where OpenClaw runs) — set up the AgenticROS plugin"
25
+ echo " 3) Do BOTH (robot and gateway on this machine)"
26
+ echo ""
27
+ read -p "Choice [1/2/3]: " choice
28
+ choice=${choice:-1}
29
+
30
+ run_robot() {
31
+ echo ""
32
+ echo "--- Robot setup ---"
33
+ read -p "ROS2 distro (jazzy/humble) [auto]: " distro
34
+ if [[ -n "$distro" ]]; then
35
+ "$REPO_ROOT/scripts/setup_robot.sh" --ros-distro "$distro"
36
+ else
37
+ "$REPO_ROOT/scripts/setup_robot.sh"
38
+ fi
39
+ }
40
+
41
+ run_gateway() {
42
+ echo ""
43
+ echo "--- Gateway plugin setup ---"
44
+ read -p "Rosbridge URL (e.g. ws://localhost:9090 or ws://ROBOT_IP:9090) [skip]: " url
45
+ read -p "Robot namespace for cmd_vel (e.g. robot3946b404c33e4aa39a8d16deb1c5c593) [skip]: " ns
46
+ args=()
47
+ [[ -n "$url" ]] && args+=(--rosbridge-url "$url")
48
+ [[ -n "$ns" ]] && args+=(--robot-namespace "$ns")
49
+ "$REPO_ROOT/scripts/setup_gateway_plugin.sh" "${args[@]}"
50
+ }
51
+
52
+ case "$choice" in
53
+ 1) run_robot ;;
54
+ 2) run_gateway ;;
55
+ 3) run_robot; run_gateway ;;
56
+ *) echo "Invalid choice."; exit 1 ;;
57
+ esac
58
+
59
+ echo ""
60
+ echo " Onboarding checklist"
61
+ echo ""
62
+ if [[ "$choice" == "1" || "$choice" == "3" ]]; then
63
+ echo " On the robot:"
64
+ echo " [ ] Start bridges: ./scripts/run_demo_native.sh"
65
+ echo " [ ] (Optional) Open firewall for port 9090 if gateway is remote: sudo ufw allow 9090/tcp"
66
+ fi
67
+ if [[ "$choice" == "2" || "$choice" == "3" ]]; then
68
+ echo " On the gateway:"
69
+ echo " [ ] Restart OpenClaw: systemctl --user restart openclaw-gateway.service"
70
+ echo " [ ] Enable AgenticROS plugin in the dashboard (Plugins, not Channels)"
71
+ echo " [ ] Set plugin config: rosbridge URL, robot namespace (if needed)"
72
+ fi
73
+ echo ""
74
+ echo " Full guide: docs/robot-setup.md"
75
+ echo ""
@@ -0,0 +1,77 @@
1
+ # NemoClaw policy preset: opens api.openai.com / cdn.openai.com for the
2
+ # OpenClaw gateway when running OpenAI as the inference provider.
3
+ #
4
+ # Why this is required:
5
+ # By default the sandbox egress policy doesn't include any OpenAI host.
6
+ # Without this preset, requests fail in /var/log/openshell.*.log with:
7
+ # DENIED /usr/local/bin/node(...) -> api.openai.com:443
8
+ # [policy:- engine:opa]
9
+ # [reason:endpoint api.openai.com:443 not in policy '...']
10
+ #
11
+ # Apply with:
12
+ # nemoclaw nemo policy-add --yes \
13
+ # --from-file scripts/openai.policy.yaml \
14
+ # "$(docker ps --format '{{.Names}}' | grep '^openshell-nemo-')"
15
+ #
16
+ # After applying, the gateway hot-reloads automatically — no need to
17
+ # `nemoclaw nemo recover` (and that command's probe gives false negatives
18
+ # in this sandbox anyway; see docs/nemoclaw.md troubleshooting).
19
+ #
20
+ # Note 1: unlike the rosbridge preset, no `allowed_ips` block is needed —
21
+ # api.openai.com resolves to PUBLIC IPs, so the OpenShell SSRF guard
22
+ # (which only default-denies private/RFC1918 destinations) doesn't fire.
23
+ #
24
+ # Note 2: NO `binaries:` allowlist on this preset, and that is intentional.
25
+ # The actual code path is:
26
+ # OpenClaw (node) → CONNECT inference.local:443 via OPA proxy
27
+ # → openshell-router (Rust) → api.openai.com:443
28
+ # The hop that crosses api.openai.com is made by the openshell-router
29
+ # binary (/opt/openshell/bin/openshell-sandbox), not Node. If you restrict
30
+ # `binaries:` to openclaw/node, OPA can't attribute the router's outbound
31
+ # connection to any allowed binary and denies the request with
32
+ # DENIED -(0) -> api.openai.com:443
33
+ # [reason:failed to resolve peer binary: No ESTABLISHED TCP connection
34
+ # found for port ...]
35
+ # Removing the binaries clause lets any process inside the sandbox
36
+ # netns reach the listed hosts — fine because the hosts themselves are
37
+ # narrowly scoped to OpenAI's public endpoints.
38
+
39
+ preset:
40
+ name: openai
41
+ description: "OpenAI API access for inference (api.openai.com + cdn.openai.com)"
42
+
43
+ network_policies:
44
+ openai:
45
+ name: openai
46
+ endpoints:
47
+ # Chat completions, embeddings, files, images — everything in the
48
+ # standard OpenAI REST surface goes through api.openai.com.
49
+ # We use the REST-aware shape (protocol/rules) that the built-in
50
+ # `managed_inference` and `local_inference` policies use, NOT the
51
+ # raw L4 `access: full` shape. The REST-aware shape tells OpenShell
52
+ # to terminate TLS at its proxy, inspect the HTTP layer, and route
53
+ # the request itself — which lets the openshell-router make the
54
+ # outbound api.openai.com hop on behalf of the sandbox without
55
+ # tripping OPA's peer-binary attribution check (which fails for
56
+ # router-originated connections — see "OpenAI inference fails with
57
+ # 'failed to resolve peer binary'" in docs/nemoclaw.md).
58
+ - host: api.openai.com
59
+ port: 443
60
+ protocol: rest
61
+ enforcement: enforce
62
+ rules:
63
+ - allow:
64
+ method: GET
65
+ path: /**
66
+ - allow:
67
+ method: POST
68
+ path: /**
69
+ # OpenAI's CDN host for binary downloads (file responses, etc.).
70
+ - host: cdn.openai.com
71
+ port: 443
72
+ protocol: rest
73
+ enforcement: enforce
74
+ rules:
75
+ - allow:
76
+ method: GET
77
+ path: /**
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Ensure OpenClaw config has a gateway auth token and print the dashboard URL
4
+ * so the web chat can connect (required in 2026.2.26 when using a token for WS auth).
5
+ *
6
+ * Usage: node scripts/openclaw-dashboard-url.cjs
7
+ * Then open the printed URL in your browser.
8
+ */
9
+
10
+ const fs = require('fs');
11
+ const path = require('path');
12
+ const crypto = require('crypto');
13
+
14
+ const configPath = process.env.OPENCLAW_CONFIG || path.join(process.env.HOME || '', '.openclaw', 'openclaw.json');
15
+
16
+ let config;
17
+ try {
18
+ const raw = fs.readFileSync(configPath, 'utf8');
19
+ config = JSON.parse(raw);
20
+ } catch (e) {
21
+ console.error('Could not read OpenClaw config:', configPath, e.message);
22
+ process.exit(1);
23
+ }
24
+
25
+ if (!config.gateway) config.gateway = {};
26
+ if (!config.gateway.auth) config.gateway.auth = {};
27
+ const auth = config.gateway.auth;
28
+
29
+ let token = auth.token;
30
+ if (!token || typeof token !== 'string' || token.length === 0) {
31
+ token = crypto.randomBytes(24).toString('base64url');
32
+ auth.token = token;
33
+ try {
34
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n', 'utf8');
35
+ console.log('Added gateway.auth.token to', configPath);
36
+ } catch (e) {
37
+ console.error('Could not write config:', e.message);
38
+ process.exit(1);
39
+ }
40
+ }
41
+
42
+ const baseUrl = (config.gateway.url || 'http://127.0.0.1:18789').replace(/\/$/, '');
43
+ const dashboardUrl = baseUrl + '/#token=' + encodeURIComponent(token);
44
+ console.log('');
45
+ console.log(' Open this URL in your browser for the web chat:');
46
+ console.log(' ' + dashboardUrl);
47
+ console.log('');
48
+ console.log(' (Restart the gateway if it was already running when the token was added.)');
49
+ console.log('');