Skip to content

Real domino: open-loop robot execution at test time (Phase 3 + bridge client)#62

Merged
amburger66 merged 2 commits into
masterfrom
real-phase3
Jul 13, 2026
Merged

Real domino: open-loop robot execution at test time (Phase 3 + bridge client)#62
amburger66 merged 2 commits into
masterfrom
real-phase3

Conversation

@amburger66

@amburger66 amburger66 commented Jul 10, 2026

Copy link
Copy Markdown

Builds on #54 (the pybullet_domino_real env). Adds open-loop execution on the real Franka at test time — the predicators (robot-ml) half of the bridge. The robot-side server lives in the babyrobot repo (branch real-phase5, PR BasisResearch/BabyRobotPredicator#42), not here. (Phases refer to the plan at REAL_PLAN.md.)

What

  • Env test-mode execution (pybullet_domino_real.py): TEST-mode reset/step wrap the rollout with a real-executor hook. The internal sim rolls each option out (predicators' own BiRRT-planned skill policy is the trajectory generator); the env buffers the joint actions per option and, at the option boundary, ships the buffered trajectory to the robot. Gated by domino_real_execute_real (default False = dry-run == pure sim). TRAIN mode is untouched.
  • Homing: on reset (test + execute_real) the env reads the env-home joint config and go_homes the arm there first, so each option's streamed trajectory starts where the robot actually is (else the robot-side drift guard trips).
  • Bridge client (envs/pybullet_domino/real_bridge_client.py): length-prefixed JSON-over-TCP (stdlib only, connects per RPC); execute_actions splits the buffered 9-vec joint-target Actions into move/gripper segments (the shape RobotInterface.execute_segments consumes) and ships them; go_home RPC. Imports no babyrobot / droid / pyzed.
  • scripts/domino_debug/replay_plan.py: run an exact solved option plan deterministically (no LLM) through the env — dry-run, or --execute to drive the robot.

Open-loop: no option-boundary re-perception — the env state stays the sim's prediction. Closed-loop perception is a deliberate follow-up.

Verification (robot-ml, dry-run — no hardware)

Start the bridge in one terminal, then in another terminal run:

PYTHONHASHSEED=0 PYTHONPATH=. python scripts/domino_debug/replay_plan.py --plan /home/amberli/babyrobot/predicators/logs/agent_po_sim_predicate_invention/domino_real-agent_po_predicate_invention_al/seed0/run_20260710_133232/plan.txt --execute

@amburger66 amburger66 self-assigned this Jul 13, 2026
@amburger66 amburger66 marked this pull request as ready for review July 13, 2026 16:12
@amburger66 amburger66 requested a review from yichao-liang July 13, 2026 16:31
Comment thread predicators/pybullet_helpers/real_robot_bridge.py
Adds a robot-side bridge client and wires the real-bench env to drive the
Franka in TEST mode. The env rolls the WHOLE episode out in sim, then flushes
the buffered joint trajectory to the robot in one call
(env.flush_real_execution), where it is split into move / gripper segments.

The split must see the whole episode in ONE call: it emits a gripper segment
on a finger transition, tracked from the start of the call. Splitting per
option restarts that tracking, so a Place -- which begins already holding the
domino from the Pick -- re-emits a leading 'close', i.e. a second force-grasp
on the already-clamped domino. That leaves the Franka Hand stuck and the later
release is silently dropped. Shipping whole-episode makes the gripper commands
alternate cleanly (one grasp per pick, one release per place).

Execution is gated behind domino_real_execute_real (default False = dry-run,
pure sim). Re-perception at option boundaries is deferred; this is open-loop.
…o LLM)

Grounds a solved plan's Pick/Place/Push/Wait options with their exact
parameters and rolls them through the real-bench env. Dry-run by default
(pure sim, optional MP4); --execute drives the Franka via the bridge.
Comment thread predicators/pybullet_helpers/real_robot_bridge.py
@amburger66 amburger66 enabled auto-merge (squash) July 13, 2026 18:29
@amburger66 amburger66 merged commit e92222e into master Jul 13, 2026
14 checks passed
@amburger66 amburger66 deleted the real-phase3 branch July 13, 2026 18:35
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