File size: 12,074 Bytes
285f2c5
 
 
 
c23730c
285f2c5
 
 
 
 
 
 
 
0330296
 
cc19bd3
0330296
 
 
c23730c
0330296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c23730c
0330296
 
 
 
 
 
 
 
 
 
 
 
 
 
c23730c
 
0330296
 
 
 
 
 
 
 
 
c23730c
 
0330296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c23730c
0330296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c23730c
 
0330296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c23730c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0330296
 
 
 
 
 
c23730c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
---
pretty_name: GPT-GEAR Reference Demonstrations
language:
  - en
  - zh
tags:
  - robotics
  - robot-manipulation
  - demonstrations
  - video
  - text
---

<h1 align="center">🎬 GPT-GEAR Reference Demonstrations</h1>

<p align="center"><strong>🌐 English</strong> | 🌐 <a href="https://huggingface.co/datasets/uooon/reference_demo/blob/main/README.zh-CN.md">简体中文</a></p>

<p align="center">
  <strong>Explore robot learning from demonstrations with GPT-GEAR</strong><br>
  <sub>131 demonstrations · 4 simulation environments · Video, text, and action trajectories</sub>
</p>

<p align="center">
  🤖 <a href="https://github.com/6UOOON9/GPT-GEAR">GPT-GEAR</a> &nbsp;·&nbsp;
  🧭 <a href="#overview">Overview</a> &nbsp;·&nbsp;
  📦 <a href="#contents">Contents</a> &nbsp;·&nbsp;
  🚀 <a href="#quick-start">Quick Start</a> &nbsp;·&nbsp;
  🗺️ <a href="#task-mapping">Task Mapping</a> &nbsp;·&nbsp;
  💬 <a href="#community">Community</a>
</p>

---

<a id="overview"></a>

## 🧭 Welcome

Welcome to the **GPT-GEAR reference demonstration collection**! This package brings together multi-view videos, textual steps, and action trajectories for **RoboDojo, RoboTwin, LIBERO-GeoMotion, and LIBERO-Plus**, making it easier to explore how vision-language models use examples to guide robot actions.

In GPT-GEAR, demonstrations become part of the model's context: the model can inspect an example, relate it to the current scene, and choose its next action using live observations and feedback. This is **embodied in-context learning (ICL)**. The trajectories are references for the model to read, rather than commands automatically replayed on the robot.

Start by watching a demonstration or reading its steps, then try different input combinations in your own evaluations. We welcome reproduction notes, questions, and ideas from the community!

<a id="contents"></a>

## 📦 What's included

| Environment | Demonstrations | How they are used in GPT-GEAR |
|---|---:|---|
| [RoboDojo](RoboDojo/) | 35 | 34 same-name task references in the evaluation queue, plus `spell_RoboDojo` |
| [RoboTwin](RoboTwin/) | 50 | One per task, shared across `clean` / `random` configurations and evaluation seeds |
| [LIBERO-GeoMotion](LIBERO-GeoMotion/) | 6 | Shared within task families, covering 24 evaluation scenes |
| [LIBERO-Plus](LIBERO-Plus/) | 40 | One per base task: 10 each from Spatial, Object, Goal, and LIBERO-10 |
| **Total** | **131** | **Video, text, and trajectory files for every demonstration** |

Each task directory follows the same layout:

```text
reference_demo/
├── README.md
├── README.zh-CN.md
├── RoboDojo/<task>/
├── RoboTwin/<task>/
├── LIBERO-GeoMotion/task_<id>/
└── LIBERO-Plus/base_<id>/
    ├── steps.txt
    ├── trajectory.json
    ├── trajectory.jsonl
    └── videos/
        ├── videos.json
        └── *.mp4
```

| File | What it contains | GPT-GEAR reference field |
|---|---|---|
| `steps.txt` | Textual steps and demonstration notes | `reference.text` |
| `trajectory.json` | Trajectory format, metadata, and file references | `reference.trajectory` |
| `trajectory.jsonl` | Detailed trajectory records, read through the descriptor | Referenced by `trajectory.json` |
| `videos/` | Camera-view MP4 files and the `videos.json` camera mapping | `reference.video` |

Keep each task directory intact so the descriptor can resolve its trajectory and videos. Directory names and task IDs are case-sensitive.

RoboDojo, RoboTwin, and LIBERO-Plus use English numbered steps. LIBERO-GeoMotion retains the original Chinese Markdown expert notes, including recorded coordinates and replay results. Those notes also link to upstream CSV, HDF5, NPY, and combined videos that are not included in this package; the files distributed here are listed above.

<a id="quick-start"></a>

## 🚀 Quick start

### 1. Explore a demonstration

Try [RoboTwin: adjust a bottle](RoboTwin/adjust_bottle/steps.txt), [RoboDojo: fasten screws](RoboDojo/fasten_screws/steps.txt), or [LIBERO-GeoMotion: move a blue bar onto a green pad](LIBERO-GeoMotion/task_000/steps.txt). Open the corresponding `videos/` directory to view the camera recordings.

### 2. Check the reference files

Install the tools following the [GPT-GEAR installation guide](https://github.com/6UOOON9/GPT-GEAR/blob/main/docs/installation.md). With FFmpeg and FFprobe available, run this example from the GPT-GEAR repository root. Replace `/path/to/reference_demo` with the absolute path to this package:

```bash
gpt-gear reference prepare --benchmark robotwin \
  --reference-video /path/to/reference_demo/RoboTwin/adjust_bottle/videos \
  --reference-text /path/to/reference_demo/RoboTwin/adjust_bottle/steps.txt \
  --trajectory /path/to/reference_demo/RoboTwin/adjust_bottle/trajectory.json \
  --reference-mode sequence --reference-fps 1 \
  --output outputs/robotwin_reference_check/reference
```

Use a new output directory. This command validates the files and builds a reference cache without starting a simulator or calling a model.

### 3. Add demonstrations to evaluation

The GPT-GEAR queue files `configs/queues/robodojo.json`, `configs/queues/robotwin.json`, and `configs/queues/libero_geomotion.json` already contain the task mappings below. Replace their environment paths and `/path/to/reference_demo` placeholders with your local paths before running.

**For RoboDojo and LIBERO-GeoMotion with video, text, and full trajectories, increase the context window to `432000`.** Their queue files already set top-level `"codex_context_window": 432000`; retain it when copying a configuration. For a standalone `gpt-gear run`, add `--codex-context-window 432000` explicitly, using a model that supports this window. The default `272000` can trigger context compaction before the full reference is inspected. The offline check above does not need this option.

Check the actual context window reported by the Codex session as well as the requested value. A custom model catalog can cap the window below the CLI setting and cause early compaction.

#### Run one RoboDojo task

Try `fasten_screws` with video, text, and trajectory references. Prepare the RoboDojo environment and model authentication following the GPT-GEAR guide, then activate the tool environment in the **GPT-GEAR repository root**. Replace every `/path/to/...` placeholder with your local path:

```bash
gpt-gear run fasten_screws outputs/robodojo_reference \
  --benchmark robodojo \
  --env-root /path/to/RoboDojo \
  --sim-python /path/to/robodojo/bin/python \
  --seed 0 --layout-id 9 \
  --codex-context-window 432000 \
  --reference-video /path/to/reference_demo/RoboDojo/fasten_screws/videos \
  --trajectory /path/to/reference_demo/RoboDojo/fasten_screws/trajectory.json \
  --reference-text /path/to/reference_demo/RoboDojo/fasten_screws/steps.txt \
  --reference-mode sequence --reference-fps 1
```

This command starts the simulator and calls the model. Use a new output directory; do not create it beforehand. The example uses seed `0` and layout `9`, matching the RoboDojo evaluation queue. After the run, inspect the result with:

```bash
gpt-gear summarize outputs/robodojo_reference
```

#### Add references to a queue

For a custom queue, add a `reference` object to the matching episode. For example, the `adjust_bottle` episode uses:

```json
{
  "reference": {
    "video": "/path/to/reference_demo/RoboTwin/adjust_bottle/videos",
    "text": "/path/to/reference_demo/RoboTwin/adjust_bottle/steps.txt",
    "trajectory": "/path/to/reference_demo/RoboTwin/adjust_bottle/trajectory.json",
    "mode": "sequence",
    "fps": 1
  }
}
```

This is an episode fragment; see the [queue guide](https://github.com/6UOOON9/GPT-GEAR/blob/main/docs/queues.md) for complete configurations. Use the original files here, even if you have already prepared a cache. Absolute paths make configurations easier to move; relative paths resolve from the JSON configuration's directory.

You can supply text, video, or both, and optionally add trajectories alongside text or video. For input combinations and command-line examples, see the [embodied ICL guide](https://github.com/6UOOON9/GPT-GEAR/blob/main/docs/reference-protocol.md).

<a id="task-mapping"></a>

## 🗺️ Task mapping

### RoboDojo

Task IDs match `RoboDojo/<task>/` directory names. The GPT-GEAR queue contains 42 tasks and uses 34 same-name demonstrations. Its eight tasks without references are `align_blocks`, `classify_objects_by_language`, `general_pickup`, `pick_from_conveyor_by_image`, `pour_by_language`, `solve_equation`, `stack_blocks_by_language`, and `store_tools_in_toolbox`.

The additional [spell_RoboDojo demonstration](RoboDojo/spell_RoboDojo/) is included for exploration and is not part of that queue.

### RoboTwin

All 50 tasks in the GPT-GEAR queue have a same-name demonstration at `RoboTwin/<task>/`. Each task uses the same demonstration for both `clean` and `random` configurations and all five evaluation seeds (`0–4`).

### LIBERO-GeoMotion

One demonstration is shared across each listed task family. Scene IDs use the `libero_rp/` prefix, and ranges below are inclusive.

| Evaluation scenes | Task family | Demonstration directory |
|---|---|---|
| `libero_rp/0`–`libero_rp/3` | Blue bar onto green pad | [task_000](LIBERO-GeoMotion/task_000/) |
| `libero_rp/4`–`libero_rp/7` | Book upright in organizer | [task_004](LIBERO-GeoMotion/task_004/) |
| `libero_rp/8`–`libero_rp/11` | Bottle oriented in rack | [task_008](LIBERO-GeoMotion/task_008/) |
| `libero_rp/24`–`libero_rp/27` | Mango transfer around protected objects | [task_026](LIBERO-GeoMotion/task_026/) |
| `libero_rp/28`–`libero_rp/33` | Cream cheese into drawer, then close | [task_028](LIBERO-GeoMotion/task_028/) |
| `libero_rp/34`–`libero_rp/35` | Two mugs into cabinet, then close | [task_034](LIBERO-GeoMotion/task_034/) |

Scenes `libero_rp/12`–`libero_rp/23` have no demonstrations in this package; their queue entries omit reference inputs.

### LIBERO-Plus

The 40 demonstrations use `LIBERO-Plus/base_00/`–`base_39/`, with one demonstration per base task:

| Demonstration directories | Source suite | Count |
|---|---|---:|
| `base_00`–`base_09` | `libero_spatial` | 10 |
| `base_10`–`base_19` | `libero_object` | 10 |
| `base_20`–`base_29` | `libero_goal` | 10 |
| `base_30`–`base_39` | `libero_10` | 10 |

Each task directory follows the common layout above and includes `agentview` and `robot0_eye_in_hand` videos. Its `trajectory.json` uses the same field structure as LIBERO-GeoMotion: `format`, `frames`, `fps`, `pose`, `action`, `sampling`, and `files`. The `files` field records relative paths to the trajectory and videos.

The `base_XX` identifiers are demonstration IDs, not LIBERO-Plus runtime task indices. Match the base task name to a variant in your installed environment before choosing `suite/task_id`; for example, `base_38` describes putting both moka pots on the stove and does not imply `libero_10/8`. Use `--benchmark libero-plus` and the selected task directory's `videos/`, `steps.txt`, and `trajectory.json` as the three reference inputs. The existing GPT-GEAR `configs/queues/libero_plus.json` does not attach these references automatically; add the matching episode's `reference` object using the pattern above.

<a id="community"></a>

## 💬 Join the community

We welcome feedback on the demonstrations, documentation improvements, and experiments with different reference inputs. Share your findings through [GPT-GEAR Issues](https://github.com/6UOOON9/GPT-GEAR/issues). For data or mapping questions, include the environment, task ID, relevant file path, and what you observed so others can reproduce it.

For contributions to the framework, see the [contributing guide](https://github.com/6UOOON9/GPT-GEAR/blob/main/CONTRIBUTING.md). Thank you to the RoboDojo, RoboTwin, LIBERO-GeoMotion, and LIBERO-Plus communities for their simulation environments and work on robotic manipulation!