plan · RoboTwin
Why we have it
Without an explicit plan, VLMs grab the first tool that comes to mind from
training (often the wrong baseline). Forcing a plan FIRST makes the agent
think about strategy + fallback BEFORE training priors take over.
4-Phase pattern (Rollout Fig 3)
- RECEIVE_INSTRUCTION — paraphrase the goal in your own words. Surface
ambiguities by stating what you assume.
- DESCRIBE_SCENE — call
look()first; inscene_summarydescribe the
visible objects, their approximate positions, and any constraints
(other arm holding something, occlusion, etc).
- STEPS_PLANNING — emit
plan(...)with substeps that, if all complete,
guarantee the goal is met. Cumulative progress_pct should reach 100.
- EXECUTE — issue tool calls for substep[0] in your next turn.
Replanning
The plan is mutable. Whenever you discover the existing plan is wrong:
- substep ordering needs swap
- a substep was missing
- the goal decomposition itself was incorrect
simply emit plan(...) again with reason_for_revision="...". The new plan
replaces the old; previous progress is reset for substeps that changed.
Substep example (beat_block_hammer)
plan(
goal="Tap hammer head onto top of red block.",
scene_summary="Toy hammer at table center; red block 15cm to the right; "
"both arms free; head_camera shows clear top-down view.",
substeps=[
{
"name": "locate_block",
"primary": "localize_object_top_center: 5x5 grid + sub-VLM pick",
"progress_pct": 15,
"preconditions": [],
"success_evidence": "stdout shows xyz=[x,y,z] with x in [-0.25,0.25] etc",
"fallback": "find_pixel('coloured block') + unproject_pixel"
},
{
"name": "choose_arm",
"primary": "is_reachable both arms; pick reachable side",
"progress_pct": 25,
"preconditions": ["block xyz known"],
"success_evidence": "exactly one arm has reachable=True",
"fallback": "if neither: done(success=False) immediately"
},
{
"name": "grasp_hammer",
"primary": "grasp_then_lift_graspgen with multi-query SAM",
"progress_pct": 60,
"preconditions": ["arm chosen"],
"success_evidence": "actor_z rose ≥3cm AND val<0.6",
"fallback": "grasp_then_lift baseline with manual top-down"
},
{
"name": "tap_on_block",
"primary": "tap_held_on_target with tool_query='hammer'",
"progress_pct": 90,
"preconditions": ["hammer held"],
"success_evidence": "tap returns ok=True with err_xy<2cm",
"fallback": "lower hover_m, retry"
},
{
"name": "verify_done",
"primary": "list_contacts + check hammer-block pair",
"progress_pct": 100,
"preconditions": ["tap completed"],
"success_evidence": "stdout shows ('hammer','box') in contacts",
"fallback": "done(success=False) with reason"
},
]
)