Robotwin

From nssmd/RoboRSI · View interactive version

Robotwin is an AI agent skill from the GitHub repository nssmd/RoboRSI. Declare and revise an execution plan. Rollout §III-B 4-phase pattern: RECEIVE_INSTRUCTION → DESCRIBE_SCENE → STEPS_PLANNING → EXECUTE. Each substep has progress %, success_evidence, fallback. The plan is RECORDED, not enforced — re-emit plan() any time during execution to revise based on what was le

How to use this skill

Skill file

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)

  1. RECEIVE_INSTRUCTION — paraphrase the goal in your own words. Surface

ambiguities by stating what you assume.

  1. DESCRIBE_SCENE — call look() first; in scene_summary describe the

visible objects, their approximate positions, and any constraints

(other arm holding something, occlusion, etc).

  1. STEPS_PLANNING — emit plan(...) with substeps that, if all complete,

guarantee the goal is met. Cumulative progress_pct should reach 100.

  1. EXECUTE — issue tool calls for substep[0] in your next turn.

Replanning

The plan is mutable. Whenever you discover the existing plan is wrong:

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"
    },
  ]
)
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.