RoboQuest-Tool-Call / README.md
liu-hanghang's picture
puzzle_box: trajectories.jsonl (one full conversation per episode, all images); make_rows.py; card
ab10f3f verified
|
Raw History Blame Contribute Delete
7.79 kB
metadata
license: mit
pretty_name: RoboQuest Tool-Call
task_categories:
  - robotics
  - image-text-to-text
tags:
  - robotics
  - tool-calling
  - agents
  - vlm
  - mobile-manipulation
  - robocasa
configs:
  - config_name: puzzle_box
    data_files:
      - split: train
        path: puzzle_box/episodes.jsonl

RoboQuest Tool-Call

Tool-call training data for vision-language agents on RoboQuest, built from the released demonstrations in declare-lab/RoboQuest.

Each episode is an expert trajectory in the format of a tool-calling agent: a multi-turn conversation in which the user turns are observations (three camera images and the robot's proprioception as JSON), and each assistant turn is one tool call (arm, base, wait). It comes in two forms: trajectories.jsonl, one full conversation per episode, and rows.jsonl, one row per decision holding exactly the chat request the RoboQuest API evaluation harness sends to a model at that step and the tool call it should return. A model trained on it can be evaluated directly in the RoboQuest harness.

Tasks

Task Episodes Rows (decisions) Images Status
puzzle_box 500 32,669 98,007 released

(Rows = assistant turns: one per decision.)

More tasks will be added as separate folders with the same layout.

Layout (per task)

make_rows.py             trajectories -> per-step rows with any image horizon (standard library only)
<task>/
├── trajectories.jsonl   one full expert conversation per episode, images on every observation
├── rows.jsonl           one row per decision, as the eval harness sends it (two-image horizon)
├── episodes.jsonl       one line per episode (metadata for filtering; join on instance_id)
├── images/              256x256 PNG camera frames, referenced by relative path
└── stats.json

There is no train/validation split; split by instance_id.

A trajectory (trajectories.jsonl)

One line per episode: the whole multi-turn conversation of the expert solving the task.

  • id, task, instance_id, n_decisions.
  • tools: the four tool schemas.
  • messages: system prompt (with the goal), then per decision: the observation (user turn: proprio JSON + three camera images, all images kept), the expert's tool call (assistant turn) and the tool result (tool turn). It ends with the last assistant tool call.
  • turns: one entry per assistant turn, in order: k, tier, subtask, subtask_kind (as in the rows below).

Train on it directly (loss on every assistant turn), or turn it into per-step rows with any image horizon:

python make_rows.py --trajectories puzzle_box/trajectories.jsonl --out rows_h4.jsonl --image-horizon 4
python make_rows.py --trajectories puzzle_box/trajectories.jsonl --out rows_all.jsonl --image-horizon all

--image-horizon 2 reproduces rows.jsonl byte for byte. Note that the RoboQuest evaluation harness sends the images of the two newest observations only; a model trained with more images sees fewer at test time unless the harness's image window is raised to match.

A row (rows.jsonl)

  • id, task, instance_id, k: decision number within the episode (1-based).
  • messages: the chat request at this decision, in OpenAI chat format. The system prompt (with the goal), then for each earlier decision the observation (proprio JSON + three camera images: left, right, wrist), the assistant tool call and the tool result ({"command_accepted": true, "step": N, "error": null}). As in the harness, only the two newest observations keep their images. Image parts are {"type": "image", "image": "images/<ab>/<sha256>.png"}, relative to the task folder.
  • tools: the four tool schemas (arm, base, wait, stop).
  • target: the assistant message to learn: one tool call, no text.
  • tier: simulator check of this call (see below): "A", "B", or null (failed a limit).
  • subtask: the demonstration's step caption covering this decision, e.g. "try the second red slider from the left on the front side". Caption text only; the outcome of a try is never included.
  • subtask_kind: task-specific step kind. For puzzle_box: slide (a part whose lock is visibly free), probe (a part whose lock is hidden: it may come out, stay held or spring back), open (the lid), pick, place, submit.

An episode (episodes.jsonl)

instance_id, task, factors (for puzzle_box: cover none / partial / full, chain_length 4 / 5 / 6, kitchen_layout, kitchen_style), n_decisions, tiers (A / B / failed counts), step_kinds (steps of each kind), demo_ticks, api_ticks, final_submit, goal.

How the labels were made

The released demonstrations are 20 Hz action streams from scripted oracles. They were converted to tool calls as follows:

  • Each tool call is the demonstrator's intended move (waypoint), re-timed to the published tool limits (arm up to 15 mm per tick, base inputs within ±0.5).
  • Every call was executed by the unmodified RoboQuest executor from the demonstration's exact simulator state at that decision, and compared with the demonstration state where the next decision's frame was taken (teacher-forced).
  • tier A: hand within 10 mm / 0.05 rad and moved objects within 10 mm of the demonstration; B: within 25 mm / 0.10 rad; null: a limit was missed, most often the base was nudged more than 5 mm during an arm move. Mask or drop null rows if you want only verified targets.
  • Images are the original demonstration frames (256x256); step in the tool results follows the re-timed ticks.
  • Base calls are full-speed inputs whose tick count sets the distance (the simulated base barely moves below an input of about 0.27), so base ticks are exact integers, not rounded.

The puzzle_box demonstrator is observation-only for the puzzle: it never reads the secret release order, the decoys or the hidden-lock holders, and finds the order by probing parts. It does read geometry and joint states from the simulator instead of from images.

Numbers (puzzle_box)

  • 500 episodes; decisions per episode: mean 65.3, median 65, range 48–88.
  • Tiers: A 31,519 (96.5%), B 736 (2.3%), failed 414 (1.3%).
  • Covers: none 173, partial 164, full 163 episodes; every covered episode contains probing.
  • Rows by subtask kind: slide 12,210, probe 10,034, open 3,654, place 2,782, submit 2,017, pick 1,972.

Caveats

  • Teacher-forced: a call's real end state differs from the next frame by a few millimetres (median 2.9 mm for arm calls).
  • The final Submit succeeds in every episode when run from the demonstration state; the full call sequence has not been replayed open-loop from reset.
  • Calls follow the demonstrator's move granularity (many short, precise moves), not a particular API model's style.

Usage

import json
from huggingface_hub import snapshot_download

root = snapshot_download("declare-lab/RoboQuest-Tool-Call", repo_type="dataset", allow_patterns=["puzzle_box/*"])

# one full expert conversation per episode
with open(f"{root}/puzzle_box/trajectories.jsonl") as f:
    traj = json.loads(next(f))
print(len(traj["messages"]), "messages,", traj["n_decisions"], "tool calls")

# or one training row per decision
with open(f"{root}/puzzle_box/rows.jsonl") as f:
    row = json.loads(next(f))
print(row["target"])               # the tool call to learn
for m in row["messages"]:
    if isinstance(m.get("content"), list):
        for part in m["content"]:
            if part.get("type") == "image":
                path = f"{root}/puzzle_box/{part['image']}"   # PNG frame

License

MIT, like the RoboQuest release.