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,52 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import type { OpenClawPluginApi } from "../plugin-api.js";
3
+ import type { AgenticROSConfig } from "@agenticros/core";
4
+ import { toNamespacedTopic, applyCmdVelTwistSignConvention } from "@agenticros/core";
5
+ import { getTransport } from "../service.js";
6
+
7
+ /**
8
+ * Register the ros2_publish tool with the AI agent.
9
+ * Allows publishing messages to any ROS2 topic.
10
+ */
11
+ export function registerPublishTool(api: OpenClawPluginApi, config: AgenticROSConfig): void {
12
+ api.registerTool({
13
+ name: "ros2_publish",
14
+ label: "ROS2 Publish",
15
+ description:
16
+ "Publish a message to a ROS2 topic. Use this to send commands to the robot " +
17
+ "(e.g., velocity commands to /cmd_vel, navigation goals, etc.).",
18
+ parameters: Type.Object({
19
+ topic: Type.String({ description: "The ROS2 topic name (e.g., '/cmd_vel')" }),
20
+ type: Type.String({ description: "The ROS2 message type (e.g., 'geometry_msgs/msg/Twist')" }),
21
+ message: Type.Record(Type.String(), Type.Unknown(), {
22
+ description: "The message payload matching the ROS2 message type schema",
23
+ }),
24
+ }),
25
+
26
+ async execute(_toolCallId, params) {
27
+ const rawTopic = params["topic"] as string;
28
+ const topic = toNamespacedTopic(config, rawTopic);
29
+ const type = params["type"] as string;
30
+ let message = params["message"] as Record<string, unknown>;
31
+ message = applyCmdVelTwistSignConvention(topic, type, message);
32
+
33
+ const transport = getTransport();
34
+ transport.publish({ topic, type, msg: message });
35
+
36
+ const ns = (config.robot?.namespace ?? "").trim();
37
+ const namespaceApplied = ns && topic.startsWith(`/${ns}/`);
38
+ let summary = namespaceApplied
39
+ ? `Published to ${topic} (robot.namespace="${ns}" applied).`
40
+ : `Published to ${topic}.`;
41
+ if (!ns && (rawTopic === "/cmd_vel" || rawTopic.trim().replace(/^\/+/, "") === "cmd_vel")) {
42
+ summary += " If the robot did not move, set robot.namespace in plugin config to the robot's cmd_vel prefix (e.g. robot3946b404c33e4aa39a8d16deb1c5c593), then restart the gateway.";
43
+ }
44
+
45
+ const result = { success: true, topic, type, summary };
46
+ return {
47
+ content: [{ type: "text", text: summary + "\n" + JSON.stringify({ success: true, topic, type }) }],
48
+ details: result,
49
+ };
50
+ },
51
+ });
52
+ }
@@ -0,0 +1,46 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import type { OpenClawPluginApi } from "../plugin-api.js";
3
+ import type { AgenticROSConfig } from "@agenticros/core";
4
+ import { toNamespacedTopic } from "@agenticros/core";
5
+ import { getTransport } from "../service.js";
6
+
7
+ /**
8
+ * Register the ros2_service_call tool with the AI agent.
9
+ * Allows calling any ROS2 service.
10
+ */
11
+ export function registerServiceTool(api: OpenClawPluginApi, config: AgenticROSConfig): void {
12
+ api.registerTool({
13
+ name: "ros2_service_call",
14
+ label: "ROS2 Service Call",
15
+ description:
16
+ "Call a ROS2 service and return the response. Use this for request/response operations " +
17
+ "like setting parameters, triggering behaviors, or querying node state.",
18
+ parameters: Type.Object({
19
+ service: Type.String({ description: "The ROS2 service name (e.g., '/spawn_entity')" }),
20
+ type: Type.Optional(Type.String({ description: "The ROS2 service type (e.g., 'gazebo_msgs/srv/SpawnEntity')" })),
21
+ args: Type.Optional(Type.Record(Type.String(), Type.Unknown(), {
22
+ description: "The service request arguments",
23
+ })),
24
+ }),
25
+
26
+ async execute(_toolCallId, params) {
27
+ const rawService = params["service"] as string;
28
+ const service = toNamespacedTopic(config, rawService);
29
+ const type = params["type"] as string | undefined;
30
+ const args = params["args"] as Record<string, unknown> | undefined;
31
+
32
+ const transport = getTransport();
33
+ const response = await transport.callService({ service, type, args });
34
+
35
+ const result = {
36
+ success: response.result,
37
+ service,
38
+ response: response.values,
39
+ };
40
+ return {
41
+ content: [{ type: "text", text: JSON.stringify(result) }],
42
+ details: result,
43
+ };
44
+ },
45
+ });
46
+ }
@@ -0,0 +1,71 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import type { OpenClawPluginApi } from "../plugin-api.js";
3
+ import type { AgenticROSConfig } from "@agenticros/core";
4
+ import { toNamespacedTopic } from "@agenticros/core";
5
+ import { getTransport } from "../service.js";
6
+
7
+ /**
8
+ * Register the ros2_subscribe_once tool with the AI agent.
9
+ * Subscribes to a topic and returns the next message received.
10
+ */
11
+ export function registerSubscribeTool(api: OpenClawPluginApi, config: AgenticROSConfig): void {
12
+ api.registerTool({
13
+ name: "ros2_subscribe_once",
14
+ label: "ROS2 Subscribe Once",
15
+ description:
16
+ "Subscribe to a ROS2 topic and return the next message. Use this to read sensor data, " +
17
+ "check robot state, or get the current value of a topic.",
18
+ parameters: Type.Object({
19
+ topic: Type.String({ description: "The ROS2 topic name (e.g., '/battery_state')" }),
20
+ type: Type.Optional(Type.String({ description: "The ROS2 message type (e.g., 'sensor_msgs/msg/BatteryState')" })),
21
+ timeout: Type.Optional(Type.Number({ description: "Timeout in milliseconds (default: 5000)" })),
22
+ }),
23
+
24
+ async execute(_toolCallId, params) {
25
+ const rawTopic = params["topic"] as string;
26
+ const topic = toNamespacedTopic(config, rawTopic);
27
+ let msgType = params["type"] as string | undefined;
28
+ const timeout = (params["timeout"] as number | undefined) ?? 5000;
29
+
30
+ if (!msgType && /\/?(camera|image|color|depth)/i.test(rawTopic)) {
31
+ msgType = rawTopic.includes("compressed") ? "sensor_msgs/msg/CompressedImage" : "sensor_msgs/msg/Image";
32
+ }
33
+
34
+ const transport = getTransport();
35
+
36
+ const result = await new Promise<Record<string, unknown>>((resolve, reject) => {
37
+ const subscription = transport.subscribe(
38
+ { topic, type: msgType },
39
+ (msg: Record<string, unknown>) => {
40
+ clearTimeout(timer);
41
+ subscription.unsubscribe();
42
+ resolve({ success: true, topic, message: msg });
43
+ },
44
+ );
45
+ const timer = setTimeout(() => {
46
+ subscription.unsubscribe();
47
+ reject(new Error(`Timeout waiting for message on ${topic}`));
48
+ }, timeout);
49
+ });
50
+
51
+ // Avoid sending huge payloads (e.g. image/point cloud) as text — burns tokens and triggers rate limits
52
+ const MAX_TEXT_CHARS = 8000;
53
+ let text = JSON.stringify(result);
54
+ if (text.length > MAX_TEXT_CHARS) {
55
+ text =
56
+ JSON.stringify({
57
+ success: true,
58
+ topic,
59
+ message: "[truncated: message too large for model context]",
60
+ originalSize: text.length,
61
+ }) +
62
+ "\n(Use ros2_camera_snapshot for image topics.)";
63
+ }
64
+
65
+ return {
66
+ content: [{ type: "text", text }],
67
+ details: result,
68
+ };
69
+ },
70
+ });
71
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "rootDir": "./src"
6
+ },
7
+ "include": ["src/**/*"],
8
+ "exclude": ["node_modules", "dist"]
9
+ }
@@ -0,0 +1,260 @@
1
+ # AgenticROS Claude Code adapter
2
+
3
+ MCP (Model Context Protocol) server that exposes AgenticROS ROS2 tools to **Claude Code CLI** and to the **Claude desktop app** on macOS (including **Claude Dispatch** on iPhone when paired to Claude on your Mac). Use natural language to control and query your ROS2 robot (e.g. "what do you see?", "move 1m forward").
4
+
5
+ This adapter does **not** provide the config or teleop web UI; use the [OpenClaw plugin](../../packages/agenticros) for that, or run the gateway for the browser-based teleop page.
6
+
7
+ ## Prerequisites
8
+
9
+ - Node.js 20+
10
+ - ROS2 transport available (Zenoh router, rosbridge, or local DDS)
11
+ - **Claude Code CLI** and/or **Claude desktop app** (MCP-enabled)
12
+
13
+ ## Config
14
+
15
+ The server reads AgenticROS config from (in order):
16
+
17
+ 1. **`AGENTICROS_CONFIG_PATH`** — path to a JSON file
18
+ 2. **`~/.agenticros/config.json`**
19
+ 3. **OpenClaw config** — if the above are missing, it tries `OPENCLAW_CONFIG` or `~/.openclaw/openclaw.json` and uses `plugins.entries.agenticros.config`
20
+
21
+ Config shape is the same as the OpenClaw plugin (transport mode, Zenoh endpoint, robot namespace, camera topic, etc.). Example:
22
+
23
+ ```json
24
+ {
25
+ "transport": { "mode": "zenoh" },
26
+ "zenoh": { "routerEndpoint": "ws://localhost:10000" },
27
+ "robot": {
28
+ "name": "MyRobot",
29
+ "namespace": "",
30
+ "cameraTopic": "/camera/camera/color/image_raw/compressed"
31
+ }
32
+ }
33
+ ```
34
+
35
+ **Where to put `robot.namespace`:** Put `robot.namespace`, `zenoh.routerEndpoint`, etc. in **`~/.agenticros/config.json`**, or set **`AGENTICROS_CONFIG_PATH`** to the path of your JSON file. To override namespace only for a given MCP launch (e.g. desktop app vs another project), set env **`AGENTICROS_ROBOT_NAMESPACE`** on the MCP server entry — it overrides `robot.namespace` after the JSON is loaded. The value must match the robot’s ROS namespace exactly (many robots use **no hyphens** in the UUID part of `/robot<uuid>/cmd_vel`).
36
+
37
+ The MCP server does **not** read arbitrary keys from `.mcp.json` except **`env`** passed to the process; AgenticROS settings still come from `~/.agenticros/config.json` (or `AGENTICROS_CONFIG_PATH` / OpenClaw fallback) plus optional **`AGENTICROS_ROBOT_NAMESPACE`** in `env`.
38
+
39
+ **Zenoh:** The MCP server connects to the URL in `zenoh.routerEndpoint` (e.g. `ws://localhost:10000`). That must be the machine where **this** process runs: either start a Zenoh router on your Mac (`zenohd --listen tcp/0.0.0.0:7447 --listen ws/0.0.0.0:10000`) or, if the router runs on another host (e.g. the robot), set `routerEndpoint` to that host (e.g. `ws://192.168.1.5:10000`). If nothing is listening on that host:port, you will see "Remote api request timeout".
40
+
41
+ ## Build
42
+
43
+ From the repo root:
44
+
45
+ ```bash
46
+ pnpm install
47
+ pnpm build
48
+ ```
49
+
50
+ Or build only core and this package: `pnpm --filter @agenticros/core build && pnpm --filter @agenticros/claude-code build`.
51
+
52
+ ## Register with Claude Code
53
+
54
+ Add the MCP server so Claude Code can use the tools.
55
+
56
+ **Option A — Project `.mcp.json` (recommended when working in the repo)**
57
+ From the repo root, create or edit `.mcp.json`:
58
+
59
+ ```json
60
+ {
61
+ "mcpServers": {
62
+ "agenticros": {
63
+ "type": "stdio",
64
+ "command": "sh",
65
+ "args": ["-c", "node packages/agenticros-claude-code/dist/index.js 2>>/tmp/agenticros-mcp.log"],
66
+ "env": {}
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ Then run `claude` from the **repo root** so the path `packages/agenticros-claude-code/dist/index.js` resolves. To capture logs: `tail -f /tmp/agenticros-mcp.log` or `grep AgenticROS /tmp/agenticros-mcp.log`.
73
+
74
+ **Option B — `claude mcp add`**
75
+ From the repo root after building:
76
+
77
+ ```bash
78
+ claude mcp add --transport stdio --scope project agenticros -- node packages/agenticros-claude-code/dist/index.js
79
+ ```
80
+
81
+ Or user scope (stored in `~/.claude.json`):
82
+
83
+ ```bash
84
+ claude mcp add --transport stdio --scope user agenticros -- node "$(pwd)/packages/agenticros-claude-code/dist/index.js"
85
+ ```
86
+
87
+ **Stale MCP processes**
88
+ Claude Code may start a new MCP process per session without stopping old ones. If tool behavior is outdated after a rebuild, kill existing servers then start Claude again:
89
+
90
+ ```bash
91
+ pnpm mcp:kill
92
+ claude
93
+ ```
94
+
95
+ Scope options: `--scope user` (default), `--scope project` (shared via `.mcp.json`).
96
+
97
+ ## Claude desktop app + Claude Dispatch (iOS)
98
+
99
+ The Claude **desktop** app uses a different MCP config file than Claude Code:
100
+
101
+ | Platform | MCP config file |
102
+ |----------|-----------------|
103
+ | macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
104
+ | Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
105
+
106
+ 1. Add an **`agenticros`** entry under **`mcpServers`** with the same shape as in `.mcp.json`, but use an **absolute path** to the built server:
107
+
108
+ ```json
109
+ {
110
+ "mcpServers": {
111
+ "agenticros": {
112
+ "command": "sh",
113
+ "args": [
114
+ "-c",
115
+ "node /ABSOLUTE/PATH/TO/agenticros/packages/agenticros-claude-code/dist/index.js 2>>/tmp/agenticros-mcp.log"
116
+ ],
117
+ "env": {
118
+ "AGENTICROS_ROBOT_NAMESPACE": "robot3946b404c33e4aa39a8d16deb1c5c593"
119
+ }
120
+ }
121
+ }
122
+ }
123
+ ```
124
+
125
+ Replace the `node` path with your clone’s path. Relative paths like `packages/agenticros-claude-code/dist/index.js` usually **fail** from the desktop app because its working directory is not the repo root.
126
+
127
+ 2. **Fully quit** Claude (Cmd+Q on macOS) and restart — not just closing the window.
128
+
129
+ 3. **Claude Dispatch** on iPhone: when paired to Claude on your Mac, the same MCP tools available in the desktop app (including **agenticros**) can be used from Dispatch, subject to Claude app permissions and tool approval.
130
+
131
+ ## Tools
132
+
133
+ The server exposes the same ROS2 tools as the OpenClaw plugin:
134
+
135
+ | Tool | Description |
136
+ |------|-------------|
137
+ | `ros2_list_topics` | List topics and types |
138
+ | `ros2_publish` | Publish to a topic (e.g. cmd_vel) |
139
+ | `ros2_subscribe_once` | Get next message from a topic |
140
+ | `ros2_service_call` | Call a ROS2 service |
141
+ | `ros2_action_goal` | Send goal to an action server |
142
+ | `ros2_param_get` / `ros2_param_set` | Get/set node parameters |
143
+ | `ros2_camera_snapshot` | "What do you see" — one frame from camera topic |
144
+ | `ros2_depth_distance` | Distance in meters from depth camera |
145
+ | `memory_remember` *(when enabled)* | Store a durable fact for the robot — shared with OpenClaw, Claude Desktop, Gemini |
146
+ | `memory_recall` *(when enabled)* | Semantic search across long-term memory |
147
+ | `memory_forget` *(when enabled)* | Delete by id, query, or whole namespace |
148
+ | `memory_status` *(when enabled)* | Health check + record count + embedder info |
149
+
150
+ Safety limits (max linear/angular velocity) from config are applied before `ros2_publish`.
151
+
152
+ ### Optional: shared memory across agents
153
+
154
+ The four `memory_*` tools only show up in `tools/list` when memory is **enabled** in `~/.agenticros/config.json`. Once enabled, anything you remember from Claude Code (or Claude Desktop) is immediately recall-able from OpenClaw chat and the Gemini CLI for the same robot — the underlying store lives at `~/.mem0/vector_store.db` and is shared across processes. Memory tools work even when zenohd is not running (they never touch the ROS transport). See [`docs/memory.md`](../../docs/memory.md) at the repo root for setup recipes and troubleshooting.
155
+
156
+ ### “You’re denying the tool call” / robot doesn’t move
157
+
158
+ Claude Code asks for **approval** before running tools that can change state (e.g. `ros2_publish`). When it says “I’ll publish to …”, you must choose **Allow** or **Approve** (not Deny). If you deny, the command never runs and the robot won’t move.
159
+
160
+ To **auto-allow** AgenticROS tools so you aren’t prompted every time, add a permission rule. In **project** settings (e.g. `.claude/settings.json` in the repo) or **user** settings (`~/.claude/settings.json`):
161
+
162
+ ```json
163
+ {
164
+ "permissions": {
165
+ "allow": ["mcp__agenticros"]
166
+ }
167
+ }
168
+ ```
169
+
170
+ That allows all tools from the `agenticros` MCP server. To allow only `ros2_publish`: `"allow": ["mcp__agenticros__ros2_publish"]`. Use `/permissions` in Claude Code to view and edit rules.
171
+
172
+ ### WebSocket error / "disconnected from remote-api-plugin: 1006" in log
173
+
174
+ The MCP server talks to Zenoh over **WebSocket** (e.g. `ws://localhost:10000`). If you see `WebSocket error` and `WebSocket has been disconnected from remote-api-plugin: 1006` in `/tmp/agenticros-mcp.log`, the connection to zenohd is failing or dropping. The transport never stays connected, so no messages are sent.
175
+
176
+ **Do this:**
177
+
178
+ 1. **Start zenohd with the remote-api plugin** (so it listens on port 10000):
179
+ ```bash
180
+ cd /path/to/agenticros
181
+ zenohd -c scripts/zenohd-agenticros.json5
182
+ ```
183
+ Leave it running in the foreground so you can see any errors when the MCP server connects.
184
+
185
+ 2. **Check that port 10000 is in use:**
186
+ `lsof -i :10000`
187
+ You should see `zenohd` (or the process that runs the plugin). If nothing is listening, the plugin did not load — install `zenoh-plugin-remote-api` (e.g. `brew install zenoh-plugin-remote-api` with the eclipse-zenoh tap) and ensure the config’s `plugins_loading.search_dirs` includes the directory that has `libzenoh_plugin_remote_api.*`.
188
+
189
+ 3. **Version match:**
190
+ zenoh-ts (npm) and zenoh-plugin-remote-api (zenohd) should be compatible. Check `zenohd --version` and `@eclipse-zenoh/zenoh-ts` version in `packages/core/package.json`; if one is much newer, try aligning versions (see [docs/zenoh-agenticros.md](../../docs/zenoh-agenticros.md)).
191
+
192
+ 4. **Restart order:**
193
+ Start zenohd first, confirm port 10000, then start (or restart) Claude Code so the MCP server connects to an already-running router.
194
+
195
+ ### No messages reaching the robot (publish seems to do nothing)
196
+
197
+ 1. **Await publish** — The tool now waits for the Zenoh put to complete before returning. If the put fails, you’ll see an error in the tool result (e.g. "Zenoh put failed: …"). Rebuild and restart Claude Code after pulling this change.
198
+ 2. **Check MCP server logs** — Server logs go to stderr. To capture: in `.mcp.json` use `"command": "sh", "args": ["-c", "node packages/agenticros-claude-code/dist/index.js 2>>/tmp/agenticros-mcp.log"]`. Then `cat /tmp/agenticros-mcp.log` after a move to see publish lines and errors.
199
+ When you trigger a move, the first terminal should show `[AgenticROS] Zenoh publish: key=...` for each publish. If you see that but the robot still doesn’t move, the issue is downstream (bridge allow list, robot topic, or network).
200
+ 3. **Confirm key/topic** — The server publishes to the Zenoh key derived from the topic (e.g. `3946b404-c33e-4aa3-9a8d-16deb1c5c593/cmd_vel` for topic `/3946b404-c33e-4aa3-9a8d-16deb1c5c593/cmd_vel`). Your zenoh-bridge-ros2dds `subscribers` allow list must match that key (e.g. `.+/cmd_vel` or the exact key).
201
+
202
+ **z_sub shows "invalid utf-8"?** We publish binary CDR; z_sub is trying to display it as text. The payload is correct. If z_sub shows `Received PUT (.../cmd_vel: ...)`, the MCP server and zenohd are fine; if the robot still does not move, the issue is the **bridge or the ROS2 topic on the robot** — see [docs/robot-not-receiving-cmd-vel.md](../../docs/robot-not-receiving-cmd-vel.md).
203
+
204
+ ### Robot not moving (cmd_vel not received)
205
+
206
+ If `ros2_publish` runs but the robot doesn’t move:
207
+
208
+ 1. **Topic the base subscribes to**
209
+ On the robot run: `ros2 topic list` and `ros2 topic info /cmd_vel`. If the base subscribes to **`/cmd_vel`** (no prefix), set **`robot.namespace`** to `""` in `~/.agenticros/config.json` so we publish to `/cmd_vel`. If it subscribes to **`/<uuid>/cmd_vel`**, set `robot.namespace` to that `<uuid>` (e.g. `3946b404-c33e-4aa3-9a8d-16deb1c5c593`).
210
+
211
+ 2. **Bridge allow list**
212
+ zenoh-bridge-ros2dds on the robot must **subscribe** to the Zenoh key we publish. For ros2dds the key is the topic without the leading slash (e.g. `cmd_vel` or `3946b404-c33e-4aa3-9a8d-16deb1c5c593/cmd_vel`). In the bridge config `plugins.ros2dds.allow.subscribers`, include a pattern that matches that key (e.g. `cmd_vel`, `*\/cmd_vel`, or `.+/cmd_vel` depending on the bridge’s syntax). Restart the bridge after changing the config.
213
+
214
+ 3. **Confirm on the Mac**
215
+ Subscribe to cmd_vel on the Zenoh router. If you have the Zenoh repo built (e.g. `~/Projects/zenoh`):
216
+ `cargo run -p zenoh-examples --example z_sub -- -e tcp/127.0.0.1:7447 --no-multicast-scouting -k '**/cmd_vel'`
217
+ Or if `z_sub` is in your PATH (e.g. from a Zenoh tools package):
218
+ `z_sub -e tcp/127.0.0.1:7447 --no-multicast-scouting -k '**/cmd_vel'`
219
+ Then in Claude Code ask to move the robot. If you see Twist messages in the subscriber, the MCP server and zenohd are fine and the issue is the bridge or the robot’s ROS2 topic.
220
+
221
+ ## Testing the plugin
222
+
223
+ 1. **Build** (from repo root):
224
+ ```bash
225
+ pnpm install && pnpm --filter @agenticros/core build && pnpm --filter @agenticros/claude-code build
226
+ ```
227
+
228
+ 2. **Config** (so the MCP server can connect to ROS2): create `~/.agenticros/config.json` or set `AGENTICROS_CONFIG_PATH`. You can copy from this package:
229
+ ```bash
230
+ mkdir -p ~/.agenticros
231
+ cp packages/agenticros-claude-code/config.example.json ~/.agenticros/config.json
232
+ ```
233
+ Edit the file if needed (e.g. `zenoh.routerEndpoint`, `robot.cameraTopic`, or `transport.mode` to `rosbridge` / `local`).
234
+
235
+ 3. **Register the MCP server** with Claude Code (use project scope so it’s stored in `.mcp.json`):
236
+ ```bash
237
+ cd /path/to/agenticros
238
+ claude mcp add --transport stdio --scope project agenticros -- node packages/agenticros-claude-code/dist/index.js
239
+ ```
240
+ Or user scope (stored in `~/.claude.json`):
241
+ ```bash
242
+ claude mcp add --transport stdio --scope user agenticros -- node "$(pwd)/packages/agenticros-claude-code/dist/index.js"
243
+ ```
244
+
245
+ 4. **Verify**:
246
+ ```bash
247
+ claude mcp list
248
+ claude mcp get agenticros
249
+ ```
250
+
251
+ 5. **Use Claude Code**: run `claude` and ask it to use the tools, e.g.:
252
+ - “List ROS2 topics using the agenticros tools.”
253
+ - “What do I see from the robot’s camera?” (if `robot.cameraTopic` is set and a camera is publishing).
254
+ - “Publish a stop to cmd_vel.” (if you have a robot with `cmd_vel`).
255
+
256
+ In the chat you can type `/mcp` to see MCP server status. If the transport isn’t running (e.g. no Zenoh router), tool calls will fail with connection errors until the ROS2 side is up.
257
+
258
+ ## "Follow me" and skills
259
+
260
+ The OpenClaw plugin can load skills (e.g. **follow me** via `agenticros-skill-followme`). This MCP adapter does not load skills in v1; only the core tools above are available. For "follow me", use the OpenClaw plugin or a future version of this adapter that adds skill loading or a dedicated `follow_robot` tool.
@@ -0,0 +1,9 @@
1
+ {
2
+ "transport": { "mode": "zenoh" },
3
+ "zenoh": { "routerEndpoint": "ws://localhost:10000" },
4
+ "robot": {
5
+ "name": "MyRobot",
6
+ "namespace": "",
7
+ "cameraTopic": "/camera/camera/color/image_raw/compressed"
8
+ }
9
+ }
@@ -0,0 +1,8 @@
1
+ import type { AgenticROSConfig } from "@agenticros/core";
2
+ /**
3
+ * Load and parse AgenticROS config.
4
+ * 1) AGENTICROS_CONFIG_PATH or ~/.agenticros/config.json (full JSON object = config).
5
+ * 2) If that file does not exist, try OpenClaw config and read plugins.entries.agenticros.config.
6
+ */
7
+ export declare function loadConfig(): AgenticROSConfig;
8
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AA4DzD;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,gBAAgB,CA2B7C"}
@@ -0,0 +1,93 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import os from "node:os";
4
+ import { parseConfig } from "@agenticros/core";
5
+ /**
6
+ * Optional MCP / process env override: set `robot.namespace` without editing JSON.
7
+ * Useful in `claude_desktop_config.json` or `.mcp.json` under `env`.
8
+ * Must match the robot’s ROS namespace exactly (often no dashes in the UUID segment).
9
+ */
10
+ function applyMcpEnvOverrides(config) {
11
+ const ns = process.env.AGENTICROS_ROBOT_NAMESPACE?.trim();
12
+ if (!ns)
13
+ return config;
14
+ return {
15
+ ...config,
16
+ robot: {
17
+ ...config.robot,
18
+ namespace: ns,
19
+ },
20
+ };
21
+ }
22
+ /**
23
+ * Resolve path to AgenticROS config file.
24
+ * Prefer AGENTICROS_CONFIG_PATH; else ~/.agenticros/config.json.
25
+ * Optional: fallback to OpenClaw config and read plugins.entries.agenticros.config.
26
+ */
27
+ function getConfigPath() {
28
+ const env = process.env.AGENTICROS_CONFIG_PATH;
29
+ if (env && env.trim().length > 0) {
30
+ return path.resolve(env);
31
+ }
32
+ return path.join(os.homedir(), ".agenticros", "config.json");
33
+ }
34
+ /**
35
+ * Try to read config from OpenClaw file (plugins.entries.agenticros.config).
36
+ */
37
+ function tryOpenClawConfig() {
38
+ const openclawEnv = process.env.OPENCLAW_CONFIG;
39
+ const openclawPath = openclawEnv && openclawEnv.trim().length > 0
40
+ ? path.resolve(openclawEnv)
41
+ : path.join(os.homedir(), ".openclaw", "openclaw.json");
42
+ try {
43
+ const raw = fs.readFileSync(openclawPath, "utf8");
44
+ const parsed = JSON.parse(raw);
45
+ const entries = parsed?.plugins && typeof parsed.plugins.entries === "object"
46
+ ? parsed.plugins.entries
47
+ : null;
48
+ const agenticros = entries?.agenticros && typeof entries.agenticros === "object"
49
+ ? entries.agenticros
50
+ : null;
51
+ const config = agenticros?.config;
52
+ if (config !== null && typeof config === "object") {
53
+ return config;
54
+ }
55
+ }
56
+ catch {
57
+ // ignore
58
+ }
59
+ return null;
60
+ }
61
+ /**
62
+ * Load and parse AgenticROS config.
63
+ * 1) AGENTICROS_CONFIG_PATH or ~/.agenticros/config.json (full JSON object = config).
64
+ * 2) If that file does not exist, try OpenClaw config and read plugins.entries.agenticros.config.
65
+ */
66
+ export function loadConfig() {
67
+ const primaryPath = getConfigPath();
68
+ try {
69
+ const raw = fs.readFileSync(primaryPath, "utf8");
70
+ const parsed = JSON.parse(raw);
71
+ if (parsed !== null && typeof parsed === "object") {
72
+ const cfg = parseConfig(parsed);
73
+ if (process.stderr && typeof process.stderr.write === "function") {
74
+ process.stderr.write(`[AgenticROS] Config from ${primaryPath}\n`);
75
+ }
76
+ return applyMcpEnvOverrides(cfg);
77
+ }
78
+ }
79
+ catch (err) {
80
+ const nodeErr = err;
81
+ if (nodeErr.code === "ENOENT") {
82
+ const openclawConfig = tryOpenClawConfig();
83
+ if (openclawConfig) {
84
+ return applyMcpEnvOverrides(parseConfig(openclawConfig));
85
+ }
86
+ throw new Error(`AgenticROS config not found at ${primaryPath}. Create it or set AGENTICROS_CONFIG_PATH. ` +
87
+ "See README for an example config.");
88
+ }
89
+ throw err;
90
+ }
91
+ return applyMcpEnvOverrides(parseConfig({}));
92
+ }
93
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Sample distance (meters) from a ROS2 depth image topic.
3
+ * Copied from OpenClaw adapter so we don't depend on the full plugin.
4
+ */
5
+ import type { RosTransport } from "@agenticros/core";
6
+ export declare function sampleDepthMeters(width: number, height: number, step: number, encoding: string, data: Uint8Array, centerFraction?: number, isBigEndian?: boolean): number[];
7
+ export interface DepthSampleResult {
8
+ distance_m: number;
9
+ median_m: number;
10
+ valid: boolean;
11
+ topic: string;
12
+ encoding: string;
13
+ width: number;
14
+ height: number;
15
+ sample_count: number;
16
+ min_m: number;
17
+ max_m: number;
18
+ }
19
+ export declare function getDepthDistance(transport: RosTransport, topic: string, timeoutMs?: number): Promise<DepthSampleResult>;
20
+ //# sourceMappingURL=depth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../src/depth.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA2CrD,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,UAAU,EAChB,cAAc,SAAM,EACpB,WAAW,UAAQ,GAClB,MAAM,EAAE,CAsCV;AASD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,YAAY,EACvB,KAAK,EAAE,MAAM,EACb,SAAS,SAAO,GACf,OAAO,CAAC,iBAAiB,CAAC,CAoD5B"}