Skip to content

sim: fix eval bugs, add pioneer-portable RTC driver for flow-matching policies - #286

Merged
wilsonchenghy merged 1 commit into
mainfrom
claude/rtc-inference-research
Sep 19, 2026
Merged

wilsonchenghy merged 1 commit into
mainfrom
claude/rtc-inference-research

Conversation

@wilsonchenghy

Copy link
Copy Markdown
Collaborator

Summary

Deliverables from an SO-101 ACT/SmolVLA manipulation research session (full log: docs/research/so101_manipulation_learning.md):

  • Two real bugs fixed in lerobot_interface.py:
    • LocalLeRobotPolicy.reset() was a no-op — policy action-queue/temporal-ensembler state leaked across episode boundaries in every multi-episode eval run.
    • RTC's guidance step needs a live backward pass (torch.autograd.grad inside torch.enable_grad()); running it under torch.inference_mode() permanently blocks that even with a nested enable_grad(). Fixed the RTC driving path to use torch.no_grad() instead.
  • New: src/il/humanoid_il/rtc_driver.py — a generic, embodiment-agnostic RTCDrivenPolicy that drives flow-matching policies (pi0/pi0.5/SmolVLA) via proper prefix-guided chunk replanning (predict_action_chunk() + hand-rolled ActionQueue), instead of lerobot's select_action(), which asserts against RTC entirely. This is the piece needed to port RTC to pioneer — it knows nothing about SO101/cameras/joints, only LeRobot-schema obs frames and action tensors.
  • scripts/lerobot_eval_rtc.py — SO-101 eval script exercising the new driver via a thin SO101RTCPolicy adapter (the only robot-specific code left in the RTC path).
  • scripts/lerobot_eval_video.py — video-capturing eval variant, useful for demoing/debugging policy behavior.
  • Env-var-gated research knobs in lerobot_interface.py (ACT_N_ACTION_STEPS_OVERRIDE, ACT_TEMPORAL_ENSEMBLE_COEFF, RTC_EXECUTION_HORIZON, RTC_MAX_GUIDANCE_WEIGHT) for quick architecture experiments without retraining.

Test plan

  • SO-101 sim eval with the reset() fix: multi-episode runs no longer show stale-state artifacts across episode boundaries.
  • RTC driving path (RTCDrivenPolicy) validated against SO-101 across 4 regression trials post-refactor: success rate stayed in the same 30-45% band as pre-refactor runs (noise consistent with known Isaac Lab GPU non-determinism), confirming the generic driver is behaviorally equivalent to the original SO-101-specific RTC implementation.
  • Guidance-weight sweep found max_guidance_weight=1.0 as a genuine (non-monotonic) improvement over lerobot's default of 10.0 for this task.

Full context, dataset composition, and what-worked/what-didn't findings are in docs/research/so101_manipulation_learning.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_012R6u6wWkwgvVuC3KgKse49

…w-matching policies

Two real bugs found while researching SO-101 ACT/SmolVLA success rate:
LocalLeRobotPolicy.reset() was a no-op (leaked policy state across eval
episodes), and RTC's guidance step needs a live backward pass that
torch.inference_mode() permanently blocks. Also adds env-var research
knobs (n_action_steps override, temporal ensembling, RTC config) and a
new embodiment-agnostic RTCDrivenPolicy (src/il/humanoid_il/rtc_driver.py)
that drives flow-matching policies (pi0/pi0.5/SmolVLA) via proper
prefix-guided chunk replanning instead of lerobot's naive
truncate-and-replace select_action() path. Regression-tested against
SO-101 (SO101RTCPolicy adapter in lerobot_eval_rtc.py) with no behavior
change. Research log in docs/research/so101_manipulation_learning.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012R6u6wWkwgvVuC3KgKse49
@wilsonchenghy
wilsonchenghy marked this pull request as ready for review September 19, 2026 04:19
@wilsonchenghy
wilsonchenghy merged commit 71a0e6a into main Sep 19, 2026
8 checks passed
@wilsonchenghy
wilsonchenghy deleted the claude/rtc-inference-research branch September 19, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant