Skip to content

policy_client: stationary examples (openpi + lerobot)#255

Open
shantanuparab-tr wants to merge 4 commits into
06-15-policy-client-06-producer-integrationfrom
06-15-policy-client-07-examples
Open

policy_client: stationary examples (openpi + lerobot)#255
shantanuparab-tr wants to merge 4 commits into
06-15-policy-client-06-producer-integrationfrom
06-15-policy-client-07-examples

Conversation

@shantanuparab-tr

@shantanuparab-tr shantanuparab-tr commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two runnable bimanual examples that exercise the whole stack end-to-end against a live policy server — one per transport family — sharing the same 2-follower + 4-camera setup.

Stack: top of the PolicyClient stack, based on #248. Review bottom-up (#254 → here).

Changes

  • In examples/trossen_stationary_ai_policy/{trossen_stationary_ai_policy.cpp,config.json,README.md,POLICY_INTEGRATION_NOTES.md}: openpi example (transport openpi_ws, WebSocket) — config, runnable app, and integration notes (server setup, tuning knobs, drain-threshold guidance).
  • In examples/trossen_stationary_ai_lerobot/{trossen_stationary_ai_lerobot.cpp,config.json,README.md}: the LeRobot sibling (transport lerobot_grpc, async_inference) — same bimanual setup driven by a LeRobot server, with a pi05-ready config.
  • In examples/CMakeLists.txt: build both example binaries behind TROSSEN_SDK_ENABLE_POLICY_CLIENT.
  • Example configs use slew_time_s (matching control: per-episode hardware lifecycle driven by SessionManager #248's arm-config rename).

Test Plan

  • Builds cleanly with -DTROSSEN_SDK_ENABLE_POLICY_CLIENT=ON
  • Lint passes (pre-commit run --all-files)
  • Hardware — validated against the live pi05 server: bimanual setup driven by the remote policy, chunk playback smooth across boundaries (working pi05 config for the live integration)

Breaking Changes

None. New examples, gated behind TROSSEN_SDK_ENABLE_POLICY_CLIENT (default OFF).

Related

Based on #248 (example configs depend on its slew_time_s arm key). Top of the stack over #249#254.

shantanuparab-tr commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-06-producer-integration branch from dfb2770 to b1d4a71 Compare June 15, 2026 16:56
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-07-examples branch 2 times, most recently from eb888d7 to 97abf35 Compare June 15, 2026 18:45
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-06-producer-integration branch from b1d4a71 to 6b1f894 Compare June 15, 2026 18:45
@shantanuparab-tr shantanuparab-tr added the enhancement New feature or request label Jun 15, 2026 — with Graphite App
@shantanuparab-tr shantanuparab-tr self-assigned this Jun 15, 2026
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-07-examples branch from 97abf35 to 88646c1 Compare June 16, 2026 21:51
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-06-producer-integration branch 2 times, most recently from 06c5043 to cf403e3 Compare June 16, 2026 22:00
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-07-examples branch from 88646c1 to f35f73c Compare June 16, 2026 22:00
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-06-producer-integration branch from cf403e3 to 8df0b25 Compare July 16, 2026 15:12
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-07-examples branch from f35f73c to 4a93ee7 Compare July 16, 2026 15:12
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-06-producer-integration branch from 8df0b25 to 5a6e544 Compare July 16, 2026 15:41
shantanuparab-tr added a commit that referenced this pull request Jul 16, 2026
Replace the non-ASCII theta symbol and en-dash range separators with ASCII in
the stationary example docs, matching the rest of the stack (Copilot
portability comment).
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-07-examples branch from 4a93ee7 to 4deef59 Compare July 16, 2026 15:41
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-06-producer-integration branch from 5a6e544 to d54a50d Compare July 16, 2026 17:13
shantanuparab-tr added a commit that referenced this pull request Jul 16, 2026
Replace the non-ASCII theta symbol and en-dash range separators with ASCII in
the stationary example docs, matching the rest of the stack (Copilot
portability comment).
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-07-examples branch from 4deef59 to 90c3559 Compare July 16, 2026 17:13
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-06-producer-integration branch from d54a50d to 4ff0d26 Compare July 16, 2026 17:27
shantanuparab-tr added a commit that referenced this pull request Jul 16, 2026
Replace the non-ASCII theta symbol and en-dash range separators with ASCII in
the stationary example docs, matching the rest of the stack (Copilot
portability comment).
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-07-examples branch from 90c3559 to 40318b7 Compare July 16, 2026 17:27
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-06-producer-integration branch from 4ff0d26 to 8574895 Compare July 17, 2026 00:22
shantanuparab-tr added a commit that referenced this pull request Jul 17, 2026
Replace the non-ASCII theta symbol and en-dash range separators with ASCII in
the stationary example docs, matching the rest of the stack (Copilot
portability comment).
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-07-examples branch from 3330d81 to 8bf9024 Compare July 17, 2026 00:22
Two runnable bimanual examples sharing the same 2-follower + 4-camera setup:
trossen_stationary_ai_policy (openpi WebSocket, transport openpi_ws) and
trossen_stationary_ai_lerobot (LeRobot async_inference, transport lerobot_grpc),
with configs, READMEs, and integration notes.
…rate

- The first-chunk wait ignored g_stop_requested (arms energized,
  unresponsive to Ctrl+C for up to 30s) and then started mirroring
  unconditionally even when no chunk arrived, driving followers off the
  staged pose via hold-last zeros - the exact jerk the wait was meant to
  prevent. Honor the stop flag in the wait and only mirror once a real
  chunk lands; otherwise log and hold the staged pose (PR255-F3).
- Delete the dead 3500ms pre-loop sleep and its false comment; staging is
  a blocking on_pre_episode/stage() move during start_episode (PR255-F2).
- Fix the openpi README defaults to match the shipped config
  (60s / 1 episode / 0.6Hz) (PR255-F1).
- Mark the /tmp analysis scripts in the integration notes as ad-hoc and
  not shipped (PR255-F5).
Replace the non-ASCII theta symbol and en-dash range separators with ASCII in
the stationary example docs, matching the rest of the stack (Copilot
portability comment).
… readiness

Build one shared source into trossen_stationary_ai_openpi and
trossen_stationary_ai_lerobot, each defaulting to its own transport config under
configs/. Discard and stop the run when no policy client produces an action
chunk within the readiness timeout, so a non-responsive policy never records an
episode of the followers held at the staged pose. Exit after mgr.shutdown()
completes SDK-owned teardown.
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-06-producer-integration branch from 8574895 to 09f8db9 Compare July 17, 2026 14:17
@shantanuparab-tr
shantanuparab-tr force-pushed the 06-15-policy-client-07-examples branch from 8bf9024 to edd4e38 Compare July 17, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant