Skip to content

Add Run pi0.5 Policy objective wiring ExecutePolicyPi05Torch#786

Draft
griswaldbrooks wants to merge 1 commit into
mainfrom
pair/pi05-libtorch-lab-sim
Draft

Add Run pi0.5 Policy objective wiring ExecutePolicyPi05Torch#786
griswaldbrooks wants to merge 1 commit into
mainfrom
pair/pi05-libtorch-lab-sim

Conversation

@griswaldbrooks

Copy link
Copy Markdown

[written by AI]

needs: moveit_pro/#20521

Adds a lab_sim Objective, Run pi0.5 Policy (src/lab_sim/objectives/run_pi05_policy.xml), wiring the new ExecutePolicyPi05Torch behavior from moveit_pro PR #20521 (in-process libtorch pi0.5 VLA policy inference).

What it wires

  • Moves to the Look at Table waypoint, then runs ExecutePolicyPi05Torch arm-only (manipulator joint group; gripper ports left unset) against lab_sim's two cameras (/scene_camera/color, /wrist_camera/color, the latter doubled to fill the checkpoint's third expected camera slot).
  • Model artifact ports (prefix_pt_path, expert_pt_path, stats_path) point at placeholder paths under /models/pi05/ — no such checkpoint ships in this repo or in CI.

Known limitation: wiring demo, not runnable as-is

The pi0.5 base checkpoint's exported metadata declares state_dim: 32 (the base checkpoint has no fine-tune dataset, so the exporter falls back to PI05Config.max_state_dim's default). ExecutePolicyPi05Torch requires an exact match between the real robot state size and metadata.state_dim; lab_sim's manipulator has far fewer than 32 joints, so this objective will fail its first observation with the base checkpoint.

This is not a padding bug to fix: reading LeRobot's actual pi0.5 pipeline (lerobot/policies/pi05/processor_pi05.py's Pi05PrepareStateTokenizerProcessorStep and the shared NormalizerProcessorStep), state is discretized and embedded as text tokens in the prompt at its real (unpadded) length — max_state_dim is stored on that processor step but never read in its __call__. Only the flow-matching action expert has a hard-sized Linear projection that requires numeric padding to max_action_dim, and ExecutePolicyPi05Torch already implements that (unpadding the response chunk, per the moveit_pro PR). A properly fine-tuned checkpoint for lab_sim would report its own real joint count as state_dim in its exported metadata, and this objective would run against it unmodified — no code change needed on either side.

Runnable end-to-end once a matching-dims checkpoint is exported and its artifact paths are substituted in. Added to skip_objectives in objectives_integration_test.py so the "run all objectives" CI sweep doesn't try to execute it without real checkpoint files.

…5Torch

Wires the new ExecutePolicyPi05Torch behavior (moveit_pro PR pending) into a
lab_sim Objective. Wiring demo only: the pi0.5 base checkpoint's declared
state_dim (32) does not match lab_sim's real joint count, so this needs a
matching-dims fine-tuned checkpoint export before it can run end-to-end.
Added to skip_objectives in the integration test since no such checkpoint
ships in CI.
@griswaldbrooks griswaldbrooks self-assigned this Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a239464c-f0a6-484b-98b6-545c5c21be1c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

  • lab_sim
    • jazzy: no report produced — see run logs
  • hangar_sim
    • jazzy: no report produced — see run logs

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.

2 participants