StvLi/dsh-ros2--packages-dsh-ros2-state ↗★ 22

dsh-ros2-state

提供长连接读取机器人状态的客户端 适合需要毫秒级读取最新机器人状态的ROS2控制面开发任务。

包名
dsh-ros2-state
兼容性
待验证
Harness 依赖范围
0.1.0-rc.6
Cordis 依赖范围
^4.0.1
版本
0.1.0
许可证
MIT
最近更新
2026年10月1日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:StvLi/dsh-ros2#1c9ea44df6ee8602a3f075d81ab28e66a1740991&path:packages/dsh-ros2-state

dsh-ros2-state

Control-plane state client for the dsh-ros2-sidecar data plane (逻辑直连 · 物理分离): a long-lived Unix Domain Socket connection (newline-JSON), letting the Agent read reduced, fresh robot state in milliseconds — no ROS2 subprocess per read, because the sidecar continuously reduces high-frequency topics into a semantic cache.

  • src/state-client.ts — StateClient (get / snapshot / subscribe / close), UdsStateClient impl (request_id concurrency, heartbeat, STALE/DOWN/TIMEOUT)
  • src/tools.ts — state_get / state_snapshot (read-only), via the deps.state seam
  • src/config.ts — state { socketPath, timeoutMs, tcp }

The sidecar (data plane) is dsh-ros2-sidecar; this package is the control plane that connects to it. See docs/sidecar-design.md.

Config (state.socketPath): path to the sidecar UDS socket. fail-closed: safety-relevant reads surface STALE/DOWN as structured errors — treat them as unsafe.