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,420 @@
1
+ /**
2
+ * Depth-only follow-me loop (no neural net).
3
+ *
4
+ * Subscribes only to a depth image topic (sensor_msgs/Image, 16UC1 mm or 32FC1 m),
5
+ * picks the closest "person-like" blob in front of the robot, and drives toward
6
+ * it using the same FollowerController as the YOLO loop.
7
+ *
8
+ * Why this exists: the YOLO-based local loop needs a yolov8n.onnx file and
9
+ * onnxruntime-node, both of which can be unavailable on a freshly-flashed robot
10
+ * (no ONNX hosted publicly anymore, no working torch on some Jetson images).
11
+ * Depth-only follow needs only the depth stream — perfect for unblocking the
12
+ * skill when the camera publishes depth but no person detector is wired up.
13
+ *
14
+ * Accuracy note: this picks the closest contiguous depth region in front of the
15
+ * camera. It works well in uncluttered indoor space with a single person, and
16
+ * deliberately ignores anything outside the [minPersonDepth, maxPersonDepth] band
17
+ * so floor/ceiling/back wall don't capture the controller. It does *not*
18
+ * recognise people semantically — if you walk behind a chair, it may follow the
19
+ * chair. Use mode='local' (YOLO) once yolov8n.onnx is available for real
20
+ * person re-identification.
21
+ */
22
+
23
+ import type { AgenticROSConfig, RosTransport, Subscription } from "@agenticros/core";
24
+ import { resolveCameraSubscribeTopic, toNamespacedTopic } from "@agenticros/core";
25
+ import {
26
+ ROS_MSG_IMAGE,
27
+ coerceRosImageDataToBuffer,
28
+ normalizeDepthImageEncoding,
29
+ rosBoolField,
30
+ rosNumericField,
31
+ rosStringField,
32
+ } from "@agenticros/ros-camera";
33
+ import { FollowerController, type Twist } from "./controller.js";
34
+
35
+ const DEFAULT_DEPTH_TOPIC = "/camera/camera/depth/image_rect_raw";
36
+ /** RealSense D435/D455 depth HFOV ≈ 87°. Used to convert image-x to lateral metres. */
37
+ const DEFAULT_DEPTH_HORIZONTAL_FOV_RAD = 1.5184;
38
+ const TICK_HZ = 8;
39
+
40
+ /** Depth band considered a person (avoids floor/ceiling/back-wall lock-on). */
41
+ const MIN_PERSON_DEPTH_M = 0.5;
42
+ const MAX_PERSON_DEPTH_M = 4.0;
43
+ /** Crop to a central band of the image so the floor and ceiling don't dominate. */
44
+ const ROI_X_LO = 0.15;
45
+ const ROI_X_HI = 0.85;
46
+ const ROI_Y_LO = 0.30;
47
+ const ROI_Y_HI = 0.95;
48
+ /** Coarse grid for blob picking (W_CELLS × H_CELLS). Cheap, fast, robust. */
49
+ const W_CELLS = 16;
50
+ const H_CELLS = 12;
51
+ /** Minimum fraction of valid in-band pixels in a cell for it to count. */
52
+ const MIN_CELL_FILL = 0.20;
53
+
54
+ export interface FollowMeDepthStatus {
55
+ enabled: boolean;
56
+ tracking: boolean;
57
+ targetDistance: number;
58
+ /** Recorded but not used (depth mode has no semantic recognition). */
59
+ targetDescription: string | null;
60
+ lastTarget: { x: number; z: number; cellsInBlob: number } | null;
61
+ lastTwist: Twist;
62
+ lastError: string | null;
63
+ framesProcessed: number;
64
+ detectionsSinceStart: number;
65
+ }
66
+
67
+ export interface StartOptions {
68
+ targetDescription?: string;
69
+ }
70
+
71
+ interface LatestDepth {
72
+ width: number;
73
+ height: number;
74
+ step: number;
75
+ encoding: string;
76
+ isBigEndian: boolean;
77
+ data: Uint8Array;
78
+ receivedAt: number;
79
+ }
80
+
81
+ export class FollowMeDepth {
82
+ private readonly controller = new FollowerController();
83
+ private enabled = false;
84
+ private running = false;
85
+ private targetDescription: string | null = null;
86
+ private depthSub: Subscription | null = null;
87
+ private latestDepth: LatestDepth | null = null;
88
+ private tickHandle: NodeJS.Timeout | null = null;
89
+ private lastError: string | null = null;
90
+ private framesProcessed = 0;
91
+ private detectionsSinceStart = 0;
92
+ private lastTarget: { x: number; z: number; cellsInBlob: number } | null = null;
93
+ private tracking = false;
94
+
95
+ constructor(
96
+ private readonly config: AgenticROSConfig,
97
+ private readonly transport: RosTransport,
98
+ ) {}
99
+
100
+ async start(opts: StartOptions = {}): Promise<void> {
101
+ if (this.enabled) return;
102
+ this.lastError = null;
103
+ this.framesProcessed = 0;
104
+ this.detectionsSinceStart = 0;
105
+ this.targetDescription = opts.targetDescription?.trim() || null;
106
+ this.controller.reset();
107
+ this.subscribeDepth();
108
+ this.enabled = true;
109
+ this.tickHandle = setInterval(() => this.tickSafe(), 1000 / TICK_HZ);
110
+ }
111
+
112
+ async stop(): Promise<void> {
113
+ this.enabled = false;
114
+ if (this.tickHandle) {
115
+ clearInterval(this.tickHandle);
116
+ this.tickHandle = null;
117
+ }
118
+ this.unsubscribeDepth();
119
+ this.controller.reset();
120
+ this.tracking = false;
121
+ this.lastTarget = null;
122
+ await this.publishStop();
123
+ }
124
+
125
+ setTargetDistance(d: number): void {
126
+ this.controller.setTargetDistance(d);
127
+ }
128
+
129
+ setTargetDescription(description: string): void {
130
+ this.targetDescription = description.trim() || null;
131
+ }
132
+
133
+ status(): FollowMeDepthStatus {
134
+ return {
135
+ enabled: this.enabled,
136
+ tracking: this.tracking,
137
+ targetDistance: this.controller.config.targetDistance,
138
+ targetDescription: this.targetDescription,
139
+ lastTarget: this.lastTarget,
140
+ lastTwist: this.controller.getLastTwist(),
141
+ lastError: this.lastError,
142
+ framesProcessed: this.framesProcessed,
143
+ detectionsSinceStart: this.detectionsSinceStart,
144
+ };
145
+ }
146
+
147
+ private subscribeDepth(): void {
148
+ const depthTopic = resolveCameraSubscribeTopic(this.config, DEFAULT_DEPTH_TOPIC);
149
+ this.depthSub = this.transport.subscribe(
150
+ { topic: depthTopic, type: ROS_MSG_IMAGE },
151
+ (msg) => {
152
+ try {
153
+ const encoding = normalizeDepthImageEncoding(rosStringField(msg.encoding, "16UC1"));
154
+ const width = rosNumericField(msg.width, "width");
155
+ const height = rosNumericField(msg.height, "height");
156
+ const bpp = encoding === "32FC1" ? 4 : 2;
157
+ const step =
158
+ msg.step != null && msg.step !== "" ? rosNumericField(msg.step, "step") : width * bpp;
159
+ const isBigEndian = rosBoolField(msg.is_bigendian);
160
+ const data = new Uint8Array(coerceRosImageDataToBuffer(msg.data));
161
+ this.latestDepth = {
162
+ width,
163
+ height,
164
+ step,
165
+ encoding,
166
+ isBigEndian,
167
+ data,
168
+ receivedAt: Date.now(),
169
+ };
170
+ } catch (err) {
171
+ this.lastError = `depth decode: ${err instanceof Error ? err.message : String(err)}`;
172
+ }
173
+ },
174
+ );
175
+ }
176
+
177
+ private unsubscribeDepth(): void {
178
+ this.depthSub?.unsubscribe();
179
+ this.depthSub = null;
180
+ this.latestDepth = null;
181
+ }
182
+
183
+ private async tickSafe(): Promise<void> {
184
+ if (this.running || !this.enabled) return;
185
+ this.running = true;
186
+ try {
187
+ await this.tick();
188
+ } catch (err) {
189
+ this.lastError = err instanceof Error ? err.message : String(err);
190
+ } finally {
191
+ this.running = false;
192
+ }
193
+ }
194
+
195
+ private async tick(): Promise<void> {
196
+ const depth = this.latestDepth;
197
+ if (!depth) return; // wait for first frame
198
+
199
+ this.framesProcessed += 1;
200
+
201
+ if (Date.now() - depth.receivedAt > 2000) {
202
+ // Stale depth → null target → controller watchdog zeroes velocity.
203
+ this.tracking = false;
204
+ this.lastTarget = null;
205
+ const twist = this.controller.update(null);
206
+ await this.publishTwist(twist);
207
+ return;
208
+ }
209
+
210
+ const blob = findClosestPersonBlob(depth);
211
+ if (!blob) {
212
+ this.tracking = false;
213
+ this.lastTarget = null;
214
+ const twist = this.controller.update(null);
215
+ await this.publishTwist(twist);
216
+ return;
217
+ }
218
+
219
+ // Convert centroid column to lateral metres using depth HFOV.
220
+ const normX = blob.cx / depth.width - 0.5;
221
+ const x = blob.z * Math.tan(normX * DEFAULT_DEPTH_HORIZONTAL_FOV_RAD);
222
+
223
+ this.tracking = true;
224
+ this.detectionsSinceStart += 1;
225
+ this.lastTarget = { x, z: blob.z, cellsInBlob: blob.cellsInBlob };
226
+ const twist = this.controller.update({ x, z: blob.z, confidence: 1.0 });
227
+ await this.publishTwist(twist);
228
+ }
229
+
230
+ private async publishTwist(twist: Twist): Promise<void> {
231
+ const topic = resolveCmdVelTopic(this.config);
232
+ const message = {
233
+ linear: { x: twist.linearX, y: 0, z: 0 },
234
+ angular: { x: 0, y: 0, z: twist.angularZ },
235
+ };
236
+ try {
237
+ await this.transport.publish({ topic, type: "geometry_msgs/msg/Twist", msg: message });
238
+ } catch (err) {
239
+ this.lastError = `cmd_vel publish: ${err instanceof Error ? err.message : String(err)}`;
240
+ }
241
+ }
242
+
243
+ private async publishStop(): Promise<void> {
244
+ await this.publishTwist({ linearX: 0, angularZ: 0 });
245
+ }
246
+ }
247
+
248
+ /**
249
+ * Coarse grid blob finder.
250
+ *
251
+ * Splits the central ROI of the depth image into a small grid, computes a
252
+ * median depth per cell from pixels in the person-band [MIN_PERSON_DEPTH_M,
253
+ * MAX_PERSON_DEPTH_M], then chooses the connected component (4-neighbour) with
254
+ * the closest median that meets a minimum size threshold. Returns the centroid
255
+ * in pixel space and the blob's median depth in metres.
256
+ *
257
+ * Trade-offs:
258
+ * - Cheap O(W·H) median per cell with a fixed-size sampling sort.
259
+ * - Coarse grid (16×12 ≈ 192 cells) ⇒ very robust to noise; sub-cell
260
+ * precision is not needed for a P-controller that drives at ≤0.5 m/s.
261
+ * - 4-connectivity gives natural "find one person blob" behaviour without a
262
+ * full image-level flood fill.
263
+ */
264
+ export function findClosestPersonBlob(
265
+ d: LatestDepth,
266
+ ): { cx: number; cy: number; z: number; cellsInBlob: number } | null {
267
+ const W = d.width;
268
+ const H = d.height;
269
+ const xLo = Math.floor(W * ROI_X_LO);
270
+ const xHi = Math.floor(W * ROI_X_HI);
271
+ const yLo = Math.floor(H * ROI_Y_LO);
272
+ const yHi = Math.floor(H * ROI_Y_HI);
273
+ if (xHi <= xLo || yHi <= yLo) return null;
274
+
275
+ const cellW = (xHi - xLo) / W_CELLS;
276
+ const cellH = (yHi - yLo) / H_CELLS;
277
+ if (cellW < 2 || cellH < 2) return null;
278
+
279
+ // depth[i] = median metres for cell i (-1 = "no valid pixels", Infinity = "below fill threshold")
280
+ const cellMedian = new Float32Array(W_CELLS * H_CELLS).fill(-1);
281
+
282
+ // Pre-allocated sample buffer reused per cell.
283
+ const maxSamplesPerCell = Math.max(8, Math.floor(cellW * cellH));
284
+ const sampleBuf = new Float32Array(maxSamplesPerCell);
285
+
286
+ for (let cy = 0; cy < H_CELLS; cy++) {
287
+ const y0 = yLo + Math.floor(cy * cellH);
288
+ const y1 = yLo + Math.floor((cy + 1) * cellH);
289
+ for (let cx = 0; cx < W_CELLS; cx++) {
290
+ const x0 = xLo + Math.floor(cx * cellW);
291
+ const x1 = xLo + Math.floor((cx + 1) * cellW);
292
+ const inBandCount = sampleCellBand(d, x0, y0, x1, y1, sampleBuf);
293
+ const totalCellPx = (x1 - x0) * (y1 - y0);
294
+ if (inBandCount >= totalCellPx * MIN_CELL_FILL && inBandCount >= 4) {
295
+ // Median via in-place partial sort (n is small enough that JS sort is fine).
296
+ const subset = sampleBuf.subarray(0, inBandCount).slice().sort();
297
+ cellMedian[cy * W_CELLS + cx] = subset[subset.length >> 1]!;
298
+ }
299
+ }
300
+ }
301
+
302
+ // Connected components on cells that have a valid median. Choose component with
303
+ // smallest min-depth (a heavier component beats a singleton even if slightly farther).
304
+ const visited = new Uint8Array(W_CELLS * H_CELLS);
305
+ let bestZ = Infinity;
306
+ let bestCx = -1;
307
+ let bestCy = -1;
308
+ let bestSize = 0;
309
+ const stack: number[] = [];
310
+ for (let i = 0; i < cellMedian.length; i++) {
311
+ if (visited[i] || cellMedian[i]! < 0) continue;
312
+ let sumX = 0;
313
+ let sumY = 0;
314
+ let sumWeight = 0;
315
+ let minZInComp = Infinity;
316
+ let compSize = 0;
317
+ stack.length = 0;
318
+ stack.push(i);
319
+ while (stack.length) {
320
+ const idx = stack.pop()!;
321
+ if (visited[idx]) continue;
322
+ visited[idx] = 1;
323
+ const z = cellMedian[idx]!;
324
+ if (z < 0) continue;
325
+ const ix = idx % W_CELLS;
326
+ const iy = (idx - ix) / W_CELLS;
327
+ const px = xLo + (ix + 0.5) * cellW;
328
+ const py = yLo + (iy + 0.5) * cellH;
329
+ // Weight nearer cells more heavily so a few outlier cells far back don't drag the centroid.
330
+ const w = 1 / Math.max(z, 0.2);
331
+ sumX += px * w;
332
+ sumY += py * w;
333
+ sumWeight += w;
334
+ if (z < minZInComp) minZInComp = z;
335
+ compSize += 1;
336
+ // 4-neighbour expansion, gated by depth continuity (≤0.5m step) so a person
337
+ // blob doesn't fuse with a wall behind them.
338
+ const neighbours = [idx - 1, idx + 1, idx - W_CELLS, idx + W_CELLS];
339
+ // Don't wrap on left/right edges.
340
+ if (ix === 0) neighbours[0] = -1;
341
+ if (ix === W_CELLS - 1) neighbours[1] = -1;
342
+ for (const n of neighbours) {
343
+ if (n < 0 || n >= cellMedian.length) continue;
344
+ if (visited[n]) continue;
345
+ const nz = cellMedian[n]!;
346
+ if (nz < 0) continue;
347
+ if (Math.abs(nz - z) <= 0.5) stack.push(n);
348
+ }
349
+ }
350
+ if (compSize >= 2 && minZInComp < bestZ) {
351
+ bestZ = minZInComp;
352
+ bestCx = sumX / sumWeight;
353
+ bestCy = sumY / sumWeight;
354
+ bestSize = compSize;
355
+ }
356
+ }
357
+
358
+ if (!Number.isFinite(bestZ) || bestCx < 0) return null;
359
+ return { cx: bestCx, cy: bestCy, z: bestZ, cellsInBlob: bestSize };
360
+ }
361
+
362
+ /**
363
+ * Read pixels from rectangle [x0,y0)–[x1,y1), filter to person-depth band, fill
364
+ * `out` with valid samples in metres. Returns the count written.
365
+ */
366
+ function sampleCellBand(
367
+ d: LatestDepth,
368
+ x0: number,
369
+ y0: number,
370
+ x1: number,
371
+ y1: number,
372
+ out: Float32Array,
373
+ ): number {
374
+ let n = 0;
375
+ const cap = out.length;
376
+ if (d.encoding === "16UC1") {
377
+ for (let y = y0; y < y1 && n < cap; y++) {
378
+ for (let x = x0; x < x1 && n < cap; x++) {
379
+ const off = y * d.step + x * 2;
380
+ if (off + 2 > d.data.length) continue;
381
+ const lo = d.data[off]!;
382
+ const hi = d.data[off + 1]!;
383
+ const v = d.isBigEndian ? (lo << 8) | hi : (hi << 8) | lo;
384
+ if (v <= 0) continue;
385
+ const m = v / 1000;
386
+ if (m >= MIN_PERSON_DEPTH_M && m <= MAX_PERSON_DEPTH_M) out[n++] = m;
387
+ }
388
+ }
389
+ } else if (d.encoding === "32FC1") {
390
+ const view = new DataView(d.data.buffer, d.data.byteOffset, d.data.byteLength);
391
+ for (let y = y0; y < y1 && n < cap; y++) {
392
+ for (let x = x0; x < x1 && n < cap; x++) {
393
+ const off = y * d.step + x * 4;
394
+ if (off + 4 > d.data.length) continue;
395
+ const m = view.getFloat32(off, !d.isBigEndian);
396
+ if (!Number.isFinite(m) || m <= 0) continue;
397
+ if (m >= MIN_PERSON_DEPTH_M && m <= MAX_PERSON_DEPTH_M) out[n++] = m;
398
+ }
399
+ }
400
+ }
401
+ return n;
402
+ }
403
+
404
+ function resolveCmdVelTopic(config: AgenticROSConfig): string {
405
+ const raw = (config.teleop?.cmdVelTopic ?? "").trim() || "/cmd_vel";
406
+ const namespaced = toNamespacedTopic(config, raw);
407
+ const match = namespaced.match(/^\/([^/]+)\/cmd_vel$/i);
408
+ const segment = match?.[1] ?? "";
409
+ if (match && !segment.toLowerCase().startsWith("robot")) {
410
+ return `/robot${segment.replace(/-/g, "")}/cmd_vel`;
411
+ }
412
+ return namespaced;
413
+ }
414
+
415
+ let singleton: FollowMeDepth | null = null;
416
+
417
+ export function getFollowMeDepth(config: AgenticROSConfig, transport: RosTransport): FollowMeDepth {
418
+ if (!singleton) singleton = new FollowMeDepth(config, transport);
419
+ return singleton;
420
+ }