yxma commited on
Commit
180c67c
·
verified ·
1 Parent(s): 1712b10

Split README into lean front page + docs/{recording,schema,quality,figures,caveats}.md

Browse files
Files changed (6) hide show
  1. README.md +37 -254
  2. docs/caveats.md +19 -0
  3. docs/figures.md +57 -0
  4. docs/quality.md +98 -0
  5. docs/recording.md +42 -0
  6. docs/schema.md +42 -0
README.md CHANGED
@@ -26,11 +26,11 @@ configs:
26
 
27
  # React
28
 
29
- Multimodal manipulation recordings from a bimanual setup with vision-based tactile sensors and motion capture.
30
 
31
  ![Tactile intensity timeline](figures/contact_intensity_full.png)
32
 
33
- > **30 episodes · 138.4 min total · 87.9 min (66%) of confirmed bimanual tactile contact · 3× RGB-D cameras + 2× GelSight + 3-body OptiTrack.**
34
 
35
  ## At a glance
36
 
@@ -38,293 +38,76 @@ Multimodal manipulation recordings from a bimanual setup with vision-based tacti
38
  |---|---|
39
  | Tasks | `motherboard` (more coming) |
40
  | Episodes | 30 |
41
- | Total duration | **138.4 min** (median 4 min/episode, longest 19 min) |
42
- | Tactile contact | **87.9 min / 66% of frames** (4,136 contact events, median 0.73 s each) |
43
- | Cameras | 3× Intel RealSense D415 (color + depth, 480×640, 30 FPS) |
44
- | Tactile | 2× GelSight Mini (left / right, 480×640, ~25 FPS) |
45
  | Motion capture | OptiTrack VRPN, 3 rigid bodies, ~120 Hz |
46
  | License | CC-BY-4.0 |
47
 
48
- ![Comparison table](figures/dataset_figures/F7_comparison_table.png)
49
-
50
- ## Recording setup
51
-
52
- | Stream | Hardware | Native shape | Rate |
53
- |---|---|---|---|
54
- | 3× RealSense color | Intel D415 (serials `143322063538`, `104122062574`, `217222066989`) | 480×640×3 uint8 (BGR) | 30 FPS |
55
- | 3× RealSense depth | same | 480×640 uint16 (mm) | 30 FPS |
56
- | 2× GelSight tactile | GelSight Mini (left / right) | 480×640×3 uint8 | ~25 FPS, resampled to camera ticks |
57
- | 3× OptiTrack rigid bodies | `motherboard`, `sensor_left`, `sensor_right` | 7-vector (x, y, z, qx, qy, qz, qw) | ~120 Hz |
58
-
59
- All streams share a common monotonic timestamp axis recorded under `timestamps`. Per-tracker OptiTrack streams carry their own higher-rate timestamps under `optitrack/<body>/timestamps`.
60
-
61
- ## Tasks
62
-
63
- The dataset is organized **task-first** so new tasks can be added without renaming or recompute.
64
-
65
- | Task | Description | Dates | Episodes |
66
- |---|---|---|---|
67
- | `motherboard` | Bimanual manipulation of components on a computer motherboard | 2026-03-23, 2026-05-10, 2026-05-11 | 30 |
68
-
69
- `tasks.json` at the repo root is the source of truth for the task registry.
70
-
71
- ## Episode previews
72
-
73
- Each `figures/episode_previews/motherboard/<date>/episode_NNN.gif` shows the first 2 minutes of that episode at 15× speed (≈8 s loop, 3-panel layout: overhead camera | tactile left | tactile right). Browse them in the [`figures/episode_previews`](figures/episode_previews) folder of this repo.
74
-
75
- ## Statistics & analysis
76
-
77
- ### Episode length
78
-
79
- ![Episode length](figures/dataset_figures/F1_episode_length_histogram.png)
80
-
81
- Most episodes run 1–10 min; the median is **4 min** — roughly 8× longer than BridgeData V2's typical 30 s demo. The longest episode is 19 min.
82
-
83
- ### Contact event durations
84
-
85
- ![Contact event durations](figures/dataset_figures/F2_contact_event_duration_histogram.png)
86
-
87
- 4,136 contact events total. The typical contact event lasts ≈ **0.7 s** (median), with a long tail out to 33 s — useful for grasp/contact-classification downstream tasks.
88
-
89
- ### Where on the gel does contact land?
90
-
91
- ![Contact heatmap](figures/dataset_figures/F3_contact_heatmap.png)
92
-
93
- Both sensors show contact concentrated in the central ~50% of the gel surface, dropping off toward the edges. The left gel has discrete bright spots from repeated contacts with specific features.
94
-
95
- ### Tactile signal is real and varied (not flat noise)
96
-
97
- ![Tactile montage](figures/dataset_figures/F4_tactile_pattern_montage.png)
98
-
99
- 16 random contact frames sampled across the dataset — discrete pins, edges, smooth surfaces, multi-object contact.
100
-
101
- ### Bimanual workspace
102
-
103
- ![Pose trajectory](figures/dataset_figures/F5_pose_trajectory_3d.png)
104
-
105
- Multi-view projection of the longest episode (2026-05-11 / ep_017, 19 min). Left (blue) and right (orange) sensors operate over a ~30 × 40 × 30 cm workspace.
106
-
107
- ### Tactile is independent of motion
108
-
109
- ![Cross-modal correlation](figures/dataset_figures/F6_cross_modal_correlation.png)
110
-
111
- Sensor velocity vs tactile intensity is **essentially uncorrelated** (r ≈ +0.04 / −0.05). Tactile carries information that is **not** explained by pose+velocity — a direct argument for the value of including tactile in policy / world-model training.
112
-
113
- ### Per-episode summary
114
-
115
- ![Per-episode summary](figures/dataset_figures/F8_per_episode_summary.png)
116
-
117
- Detailed table also exported as CSV: [`figures/dataset_figures/F8_per_episode_summary.csv`](figures/dataset_figures/F8_per_episode_summary.csv).
118
-
119
- ## Repository layout
120
-
121
- ```
122
- tasks.json # registry
123
- processed/
124
- └─ mode1_v1/
125
- ���─ <task>/
126
- └─ <date>/
127
- ├─ episode_000.pt
128
- ├─ episode_000.contact.json
129
- └─ ...
130
- figures/
131
- ├─ contact_intensity_full.png # tactile intensity over full dataset (waveform view)
132
- ├─ contact_intensity_20min.png # 20-min zoom of the same
133
- ├─ episode_previews/<task>/<date>/episode_*.gif # per-episode GIF previews
134
- └─ dataset_figures/ # F1–F8 statistics and analysis figures
135
- ```
136
-
137
- The `processed/mode1_v1/` view is a **task-specific slice** of the underlying raw recordings, not the full sensor suite. It was produced by `twm/preprocess.py` + `twm/contact_index.py` from a private raw HDF5 mirror.
138
-
139
- ## `processed/mode1_v1/` schema
140
-
141
- Each `episode_*.pt` is a Python dict loadable with `torch.load(..., weights_only=False)`.
142
-
143
- | Key | Shape | dtype | Description |
144
- |---|---|---|---|
145
- | `view` | `(T, 3, 128, 128)` | uint8 | Overhead camera (`realsense/cam0/color`), center-cropped to square then bilinear-resized to 128×128 |
146
- | `tactile_left` | `(T, 3, 128, 128)` | uint8 | Left GelSight, same crop/resize |
147
- | `tactile_right` | `(T, 3, 128, 128)` | uint8 | Right GelSight, same crop/resize |
148
- | `timestamps` | `(T,)` | float64 | Camera timestamps (seconds, monotonic clock) |
149
- | `sensor_left_pose` | `(T, 7)` | float32 | Left GelSight rigid body OptiTrack pose, nearest-neighbor aligned to camera timestamps |
150
- | `sensor_right_pose` | `(T, 7)` | float32 | Right GelSight rigid body OptiTrack pose, same alignment |
151
- | `tactile_{left,right}_intensity` | `(T,)` | float32 | Per-frame mean per-pixel L2 distance from a contact-free reference frame |
152
- | `tactile_{left,right}_area` | `(T,)` | float32 | Per-frame fraction of pixels with L2 diff > `tau` |
153
- | `tactile_{left,right}_mixed` | `(T,)` | float32 | Mean of (diff × mask), captures intensity restricted to contact pixels |
154
- | `_contact_meta` | dict | — | Per-episode contact metadata: `tau`, drift between first/p01 reference frames, p01 reference indices, the chosen reference RGB frames, etc. |
155
-
156
- Each `.contact.json` is a small summary of the metric distributions plus drift diagnostics, intended for filtering / sanity checking without loading the full tensors.
157
-
158
- ### Contact metric definition
159
-
160
- For each tactile sensor independently:
161
-
162
- 1. Pick a contact-free **reference frame**: the ~0.1th-percentile-quietest frame by mean L2 distance to the temporal median (`reference_strategy = "p01"`).
163
- 2. For each frame `t`, compute per-pixel `diff[t, x, y] = || frame[t, :, x, y] − ref[:, x, y] ||_2` (RGB L2 over channels).
164
- 3. Then:
165
- - `intensity[t] = mean(diff[t])`
166
- - `area[t] = mean(diff[t] > tau)` (default `tau = 8.0` on the uint8 scale)
167
- - `mixed[t] = mean(diff[t] * (diff[t] > tau))`
168
-
169
- `_contact_meta["drift_warning"]` is `True` if either sensor's drift (L2 distance between the first frame and the p01-reference frame) exceeds `2·tau`; in this release no episode triggers it.
170
 
171
  ## Quick start
172
 
173
- Load one task via `datasets`:
174
 
175
  ```python
176
  from datasets import load_dataset
177
  ds = load_dataset("yxma/React", "motherboard", split="train")
178
- # Each row is one .pt file path; the actual tensors live inside.
179
  ```
180
 
181
- Or load a single episode directly:
182
 
183
  ```python
184
  import torch
185
  from huggingface_hub import hf_hub_download
186
 
187
  path = hf_hub_download(
188
- repo_id="yxma/React",
189
- repo_type="dataset",
190
  filename="processed/mode1_v1/motherboard/2026-05-11/episode_003.pt",
191
  )
192
  ep = torch.load(path, weights_only=False)
193
- print(ep["view"].shape, ep["tactile_left_intensity"].shape)
194
- # torch.Size([10032, 3, 128, 128]) torch.Size([10032])
195
- ```
196
-
197
- Load contact metadata only (much smaller — useful for filtering):
198
-
199
- ```python
200
- import json
201
- path = hf_hub_download(
202
- repo_id="yxma/React",
203
- repo_type="dataset",
204
- filename="processed/mode1_v1/motherboard/2026-05-11/episode_003.contact.json",
205
- )
206
- meta = json.load(open(path))
207
- print(meta["drift_left"], meta["drift_right"], meta["drift_warning"])
208
  ```
209
 
210
- ## Data quality and recommended sampling
211
-
212
- A small fraction of frames contain known sensor artifacts. The repo ships a
213
- `bad_frames.json` index so downstream code can avoid sampling on top of these
214
- intervals — useful since most training pipelines sample short windows that
215
- should not straddle a glitch.
216
-
217
- ### Failure modes (quantitative breakdown)
218
-
219
- | # | Mode | Frames affected | % of dataset | Episodes | Symptom | Example |
220
- |---|---|---:|---:|---:|---|---|
221
- | 1 | **GelSight LED flicker** | 66 | **0.028 %** | 5 / 30 | 1–2 frames of uniform pink/magenta wash across the gel surface; adjacent frames normal. 2026-05-11/{003, 007, 008, 011, 017}. | `figures/dataset_figures/intensity_spike_samples/intensity_spike_overview.png` |
222
- | 2 | **OptiTrack pose teleport (>5 m/s)** | 136 | **0.057 %** | 5 / 30 | Position jumps by >5 cm in 33 ms (physically impossible) — mocap lost lock and reacquired. 2026-03-23/{001, 002}, 2026-05-10/{001, 002}, 2026-05-11/015. | `figures/dataset_figures/pose_teleport_samples/` |
223
- | 3 | Sensor at rest (>30 s freeze) | 37,601 | **15.68 %** | 5 / 30 | Multi-minute periods with pose ≈ const and tactile ≈ const (sensor set down on the table). **Not corruption**, but degenerate training data. 2026-05-11/{012: 5.4 min, 017: 10.7 min}, 2026-05-11/005 (1.3 min), 2026-03-23/{001: 1.8 min, 002: 1.6 min}. | `figures/dataset_figures/data_quality_report.png` |
224
-
225
- **Modes 1+2 (real corruption) together: 202 / 239,759 frames = 0.084 % of the dataset.** Mode 3 is tracked separately because it's healthy data, just not informative for dynamics learning. `bad_frames.json` (below) covers modes 1 and 2 only; if you want to also skip rest periods, intersect with the velocity track from `sensor_*_pose`.
226
-
227
- ### Inspection figures (rendered inline)
228
-
229
- **Mode 1 — GelSight LED flicker** (overview across all 5 affected episodes):
230
-
231
- ![Intensity spike overview](figures/dataset_figures/intensity_spike_samples/intensity_spike_overview.png)
232
 
233
- Per-episode close-ups (reference frame, ±1 s neighbors, peak frame): `figures/dataset_figures/intensity_spike_samples/2026-05-11_episode_{003,007,008,011,017}_*.png`.
234
 
235
- **Mode 2 — OptiTrack pose teleport** (2 examples for the dates without raw camera streams; the other 4 affected episodes have GIFs in the same folder):
236
-
237
- ![Teleport 2026-03-23 ep001](figures/dataset_figures/pose_teleport_samples/2026-03-23/episode_001_teleport.png)
238
- ![Teleport 2026-03-23 ep002](figures/dataset_figures/pose_teleport_samples/2026-03-23/episode_002_teleport.png)
239
-
240
- GIFs (10 s playback at 2× speed) for the other 4: `figures/dataset_figures/pose_teleport_samples/2026-05-{10,11}/episode_*_teleport.gif`.
241
-
242
- **Modes 1+2+3 — top-6 worst-offenders chart** (tactile intensity + sensor velocity time-series):
243
-
244
- ![Data quality report](figures/dataset_figures/data_quality_report.png)
245
 
246
- ### `bad_frames.json` schema
247
 
248
- The file lives at the repo root. Frame indices are inclusive on both ends and
249
- pre-padded by `buffer_frames` (3) on each side so context windows don't bleed
250
- into the glitch:
251
 
252
- ```json
253
- {
254
- "tau_intensity": 30.0,
255
- "tau_velocity_mps": 5.0,
256
- "buffer_frames": 3,
257
- "summary": {
258
- "n_episodes": 30,
259
- "total_frames": 239759,
260
- "total_bad_frames": 202,
261
- "bad_fraction_overall": 0.000843,
262
- "n_episodes_with_bad_frames": 10
263
- },
264
- "episodes": {
265
- "2026-05-11/episode_003": {
266
- "n_frames": 10032,
267
- "duration_s": 338.2,
268
- "intensity_spikes": [[260, 268], [...]],
269
- "pose_teleports_L": [],
270
- "pose_teleports_R": [],
271
- "total_bad_frames": 19,
272
- "bad_fraction": 0.0019
273
- }
274
- }
275
- }
276
  ```
277
-
278
- ### Recommended use in a dataloader
279
-
280
- ```python
281
- import json
282
-
283
- with open("bad_frames.json") as f:
284
- bad = json.load(f)["episodes"]
285
-
286
- def is_clean_window(ep_name, t_start, t_end):
287
- """Return True if [t_start, t_end] does not overlap any flagged interval."""
288
- intervals = (bad[ep_name]["intensity_spikes"]
289
- + bad[ep_name]["pose_teleports_L"]
290
- + bad[ep_name]["pose_teleports_R"])
291
- for s, e in intervals:
292
- if s <= t_end and e >= t_start:
293
- return False
294
- return True
295
-
296
- # In your sampler: if not is_clean_window(...), resample.
297
  ```
298
 
299
- ### Inspection figures
300
-
301
- Detailed per-episode evidence is published alongside the data:
302
-
303
- - **Intensity spikes**: `figures/dataset_figures/intensity_spike_samples/` — one PNG per affected episode showing the spike frame and ±1 s of neighbors next to the reference frame.
304
- - **Pose teleports**: `figures/dataset_figures/pose_teleport_samples/`
305
- - 4 focused GIFs (10 s playback, 2× speed) around the worst velocity event for episodes where the raw camera streams were available.
306
- - 2 static PNGs (with velocity time-series, top-down + side trajectories, and tactile/view thumbnails) for the 2026-03-23 episodes where only the processed `.pt` is on the publishing machine.
307
- - **Full report**: `figures/dataset_figures/data_quality_report.{png,csv}` — top-6 worst offenders and a per-episode CSV with all 30 episodes' tactile / pose stats.
308
-
309
- ## Known caveats
310
 
311
- - **Missing / dropped episodes** on `motherboard/2026-05-11`:
312
- - `episode_000` and `episode_002` — short test recordings (8.8 s and 10.4 s) with no tactile contact on either sensor; intentionally excluded.
313
- - `episode_001` — lost at recording time (HDF5 superblock never finalized when the writer was killed mid-write); intentionally absent.
314
- - The remaining episode IDs are non-contiguous as a result. Don't infer ordering from filename gaps.
315
- - **Lossy resize**: the 128×128 `view` and tactile fields are downsampled from native 480×640. Native resolution is **not** preserved in this release.
316
- - **Single camera**: only `realsense/cam0/color` is included. The other two RealSense views and all depth streams are not in `processed/mode1_v1/`.
317
- - **OptiTrack alignment**: the per-step poses are nearest-neighbor matched to camera ticks. The full ~120 Hz pose streams are not preserved here.
318
- - **Mode is opinionated**: contact metrics depend on the chosen `tau` and the p01 reference strategy. If you want a different `tau`, re-deriving from raw is necessary.
319
 
320
- ## Roadmap
321
 
322
- - **More tasks** registry in `tasks.json` will grow.
323
- - **LeRobot-format full-fidelity** variant (`lerobot/v1.0/`) is planned. It will include all three RealSense color and depth streams, GelSight at native resolution (FFV1 lossless), full-rate OptiTrack pose tracks for all three rigid bodies, and HF-native browser previews. The current `processed/mode1_v1/` slice will remain as a stable training-task view.
324
 
325
  ## Citation
326
 
327
  If you use this dataset, please cite (TODO: add bibtex).
328
-
329
-
330
-
 
26
 
27
  # React
28
 
29
+ Bimanual manipulation recordings with vision-based tactile sensors and motion capture.
30
 
31
  ![Tactile intensity timeline](figures/contact_intensity_full.png)
32
 
33
+ > **30 episodes · 138.4 min · 87.9 min (66 %) bimanual tactile contact · 3 × RGB-D + 2 × GelSight + 3-body OptiTrack**
34
 
35
  ## At a glance
36
 
 
38
  |---|---|
39
  | Tasks | `motherboard` (more coming) |
40
  | Episodes | 30 |
41
+ | Total duration | 138.4 min (median 4 min, longest 19 min) |
42
+ | Tactile contact | 87.9 min 66 % of frames; 4,136 contact events, median 0.73 s |
43
+ | Cameras | 3× Intel RealSense D415 (color + depth), 480×640, 30 FPS |
44
+ | Tactile | 2× GelSight Mini (left, right) |
45
  | Motion capture | OptiTrack VRPN, 3 rigid bodies, ~120 Hz |
46
  | License | CC-BY-4.0 |
47
 
48
+ ![Comparison with other manipulation datasets](figures/dataset_figures/F7_comparison_table.png)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  ## Quick start
51
 
52
+ Load by task with `datasets`:
53
 
54
  ```python
55
  from datasets import load_dataset
56
  ds = load_dataset("yxma/React", "motherboard", split="train")
 
57
  ```
58
 
59
+ Or grab a single episode:
60
 
61
  ```python
62
  import torch
63
  from huggingface_hub import hf_hub_download
64
 
65
  path = hf_hub_download(
66
+ repo_id="yxma/React", repo_type="dataset",
 
67
  filename="processed/mode1_v1/motherboard/2026-05-11/episode_003.pt",
68
  )
69
  ep = torch.load(path, weights_only=False)
70
+ # ep["view"] (T, 3, 128, 128) uint8 — overhead cam
71
+ # ep["tactile_left"], ep["tactile_right"] (T, 3, 128, 128) uint8
72
+ # ep["sensor_left_pose"], ep["sensor_right_pose"]
73
+ # (T, 7) float32 — xyz + quaternion
74
+ # ep["timestamps"] (T,) float64
75
+ # Plus per-frame contact metrics: tactile_{side}_{intensity, area, mixed}
 
 
 
 
 
 
 
 
 
76
  ```
77
 
78
+ **Skip the 0.085 %** of frames flagged in [`bad_frames.json`](bad_frames.json) — see [`docs/quality.md`](docs/quality.md) for a one-line dataloader snippet.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
+ See [`tasks.json`](tasks.json) for the task registry.
81
 
82
+ ## Episode previews
 
 
 
 
 
 
 
 
 
83
 
84
+ Per-episode GIF previews live under [`figures/episode_previews/`](figures/episode_previews) — first 2 minutes at 10× speed, showing all 3 RealSense cameras with projected GelSight axes plus both tactile pads.
85
 
86
+ ## Repository layout
 
 
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  ```
89
+ README.md # this file
90
+ tasks.json # task registry
91
+ bad_frames.json # data-quality skip-list
92
+ processed/mode1_v1/<task>/<date>/episode_*.pt # per-episode tensors
93
+ figures/ # previews + analysis figures
94
+ docs/ # extended documentation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  ```
96
 
97
+ ## More documentation
 
 
 
 
 
 
 
 
 
 
98
 
99
+ | File | Contents |
100
+ |---|---|
101
+ | [`docs/recording.md`](docs/recording.md) | Hardware setup, camera serials, sensor + mocap layout |
102
+ | [`docs/schema.md`](docs/schema.md) | Full `.pt` field reference and contact-metric definitions |
103
+ | [`docs/quality.md`](docs/quality.md) | Data-quality breakdown (per-mode), `bad_frames.json` schema, dataloader recipe, inspection figures |
104
+ | [`docs/figures.md`](docs/figures.md) | Dataset statistics + analysis gallery (F1–F8) |
105
+ | [`docs/caveats.md`](docs/caveats.md) | Known caveats and roadmap |
 
106
 
107
+ ## License
108
 
109
+ Released under [Creative Commons Attribution 4.0](https://creativecommons.org/licenses/by/4.0/) (CC-BY-4.0).
 
110
 
111
  ## Citation
112
 
113
  If you use this dataset, please cite (TODO: add bibtex).
 
 
 
docs/caveats.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Known caveats and roadmap
2
+
3
+ For known sensor-level anomalies and the `bad_frames.json` skip-list, see [`quality.md`](quality.md).
4
+
5
+ ## Caveats
6
+
7
+ - **Missing / dropped episodes** on `motherboard/2026-05-11`:
8
+ - `episode_000` and `episode_002` — short test recordings (8.8 s and 10.4 s) with no tactile contact on either sensor; intentionally excluded.
9
+ - `episode_001` — lost at recording time (HDF5 superblock never finalized when the writer was killed mid-write); intentionally absent.
10
+ - The remaining episode IDs are non-contiguous as a result. **Don't infer ordering from filename gaps.**
11
+ - **Lossy resize**: the 128×128 `view` and tactile fields are downsampled from native 480×640. Native resolution is **not** preserved in this release.
12
+ - **Single camera**: only `realsense/cam0/color` is included. The other two RealSense views and all depth streams are not in `processed/mode1_v1/`.
13
+ - **OptiTrack alignment**: the per-step poses are nearest-neighbor matched to camera ticks. The full ~120 Hz pose streams are not preserved here.
14
+ - **Mode is opinionated**: contact metrics depend on the chosen `tau` and the p01 reference strategy. If you want a different `tau`, re-deriving from raw is necessary.
15
+
16
+ ## Roadmap
17
+
18
+ - **More tasks** — the registry in [`../tasks.json`](../tasks.json) will grow.
19
+ - **LeRobot-format full-fidelity** variant (`lerobot/v1.0/`) is planned. It will include all three RealSense color and depth streams, GelSight at native resolution (FFV1 lossless), full-rate OptiTrack pose tracks for all three rigid bodies, and HF-native browser previews. The current `processed/mode1_v1/` slice will remain as a stable training-task view.
docs/figures.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Statistics and analysis
2
+
3
+ A gallery of dataset-level figures. All sources live under [`figures/dataset_figures/`](../figures/dataset_figures/).
4
+
5
+ ## F1 — Episode length distribution
6
+
7
+ ![Episode length](../figures/dataset_figures/F1_episode_length_histogram.png)
8
+
9
+ Most episodes run 1–10 minutes (median 4 min, longest 19 min) — about **8× longer than BridgeData V2's typical 30 s demo**.
10
+
11
+ ## F2 — Contact event durations
12
+
13
+ ![Contact event durations](../figures/dataset_figures/F2_contact_event_duration_histogram.png)
14
+
15
+ 4,136 contact events total. The typical event lasts ≈ **0.7 s** (median), tail out to 33 s.
16
+
17
+ ## F3 — Where on the gel does contact land?
18
+
19
+ ![Contact heatmap](../figures/dataset_figures/F3_contact_heatmap.png)
20
+
21
+ Both sensors show contact concentrated in the central ~50 % of the gel surface, dropping toward the edges. The left gel has discrete bright spots from repeated contacts with specific features.
22
+
23
+ ## F4 — Tactile signal is real and varied
24
+
25
+ ![Tactile montage](../figures/dataset_figures/F4_tactile_pattern_montage.png)
26
+
27
+ 16 random contact frames sampled across the dataset — discrete pins, edges, smooth surfaces, multi-object contact.
28
+
29
+ ## F5 — Bimanual workspace
30
+
31
+ ![Pose trajectory](../figures/dataset_figures/F5_pose_trajectory_3d.png)
32
+
33
+ Multi-view projection of the longest episode (`2026-05-11/episode_017`, 19 min). Left (blue) and right (orange) sensors operate over a ~30 × 40 × 30 cm workspace.
34
+
35
+ ## F6 — Tactile is independent of motion
36
+
37
+ ![Cross-modal correlation](../figures/dataset_figures/F6_cross_modal_correlation.png)
38
+
39
+ Sensor velocity vs tactile intensity is **essentially uncorrelated** (r ≈ +0.04 / −0.05). Tactile carries information that is **not** explained by pose+velocity — a direct argument for the value of including tactile in policy / world-model training.
40
+
41
+ ## F7 — Comparison with other manipulation datasets
42
+
43
+ ![Comparison table](../figures/dataset_figures/F7_comparison_table.png)
44
+
45
+ React is the only entry combining tactile + RGB-D + motion capture + bimanual.
46
+
47
+ ## F8 — Per-episode summary
48
+
49
+ ![Per-episode summary](../figures/dataset_figures/F8_per_episode_summary.png)
50
+
51
+ Full table for all 30 episodes. CSV: [`figures/dataset_figures/F8_per_episode_summary.csv`](../figures/dataset_figures/F8_per_episode_summary.csv).
52
+
53
+ ## Tactile-intensity timelines
54
+
55
+ ![Full dataset intensity timeline](../figures/contact_intensity_full.png)
56
+
57
+ 138-minute audio-waveform-style view across the entire dataset; left intensity rendered above the x-axis (orange), right intensity mirrored below (blue). A 20-minute zoom is in [`figures/contact_intensity_20min.png`](../figures/contact_intensity_20min.png).
docs/quality.md ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Data quality
2
+
3
+ A small fraction of frames contain known sensor artifacts. The repo ships a [`../bad_frames.json`](../bad_frames.json) index so downstream code can avoid sampling on top of these intervals — useful since most training pipelines sample short windows that should not straddle a glitch.
4
+
5
+ ## Headline numbers
6
+
7
+ | | |
8
+ |---|---:|
9
+ | Total frames | 239,759 |
10
+ | Episodes | 30 |
11
+ | Frames flagged in `bad_frames.json` | **202 (0.084 %)** |
12
+ | Episodes with ≥1 flagged frame | 10 |
13
+
14
+ ## Failure modes — quantitative breakdown
15
+
16
+ | # | Mode | Frames | % of dataset | Episodes | Symptom | Example |
17
+ |---|---|---:|---:|---:|---|---|
18
+ | 1 | **GelSight LED flicker** | 66 | **0.028 %** | 5 / 30 | 1–2 frames of uniform pink/magenta wash across the gel surface; adjacent frames normal. 2026-05-11 / {003, 007, 008, 011, 017}. | [`intensity_spike_overview.png`](../figures/dataset_figures/intensity_spike_samples/intensity_spike_overview.png) |
19
+ | 2 | **OptiTrack pose teleport (>5 m/s)** | 136 | **0.057 %** | 5 / 30 | Position jumps by >5 cm in 33 ms — mocap lost lock and reacquired. 2026-03-23/{001, 002}, 2026-05-10/{001, 002}, 2026-05-11/015. | [`pose_teleport_samples/`](../figures/dataset_figures/pose_teleport_samples/) |
20
+ | 3 | Sensor at rest (>30 s freeze) | 37,601 | **15.68 %** | 5 / 30 | Multi-minute periods with pose ≈ const and tactile ≈ const (sensor set down on the table). **Not corruption**, but degenerate for dynamics learning. 2026-05-11/{012: 5.4 min, 017: 10.7 min, 005: 1.3 min}, 2026-03-23/{001: 1.8 min, 002: 1.6 min}. | [`data_quality_report.png`](../figures/dataset_figures/data_quality_report.png) |
21
+
22
+ **Modes 1+2 (real corruption) together: 202 / 239,759 = 0.084 % of the dataset.** Mode 3 is tracked separately because it is healthy data, just non-informative. `bad_frames.json` covers modes 1 and 2 only; if you also want to skip rest periods, intersect with the velocity track from `sensor_*_pose`.
23
+
24
+ ## Inspection figures
25
+
26
+ **Mode 1 — GelSight LED flicker** (overview across all 5 affected episodes):
27
+
28
+ ![Intensity spike overview](../figures/dataset_figures/intensity_spike_samples/intensity_spike_overview.png)
29
+
30
+ Per-episode close-ups (reference frame, ±1 s neighbors, peak frame): [`figures/dataset_figures/intensity_spike_samples/`](../figures/dataset_figures/intensity_spike_samples/).
31
+
32
+ **Mode 2 — OptiTrack pose teleport** (2 examples for the dates without raw camera streams; the other 4 episodes have GIFs in the same folder):
33
+
34
+ ![Teleport 2026-03-23 ep001](../figures/dataset_figures/pose_teleport_samples/2026-03-23/episode_001_teleport.png)
35
+ ![Teleport 2026-03-23 ep002](../figures/dataset_figures/pose_teleport_samples/2026-03-23/episode_002_teleport.png)
36
+
37
+ GIFs (10 s playback at 2× speed) for the other 4: [`pose_teleport_samples/2026-05-{10,11}/`](../figures/dataset_figures/pose_teleport_samples/).
38
+
39
+ **Modes 1+2+3 — top-6 worst-offenders chart** (tactile intensity + sensor velocity time-series):
40
+
41
+ ![Data quality report](../figures/dataset_figures/data_quality_report.png)
42
+
43
+ ## `bad_frames.json` schema
44
+
45
+ Frame indices are inclusive on both ends and pre-padded by `buffer_frames` (3) on each side so context windows don't bleed into the glitch:
46
+
47
+ ```json
48
+ {
49
+ "tau_intensity": 30.0,
50
+ "tau_velocity_mps": 5.0,
51
+ "buffer_frames": 3,
52
+ "summary": {
53
+ "n_episodes": 30,
54
+ "total_frames": 239759,
55
+ "total_bad_frames": 202,
56
+ "bad_fraction_overall": 0.000843,
57
+ "n_episodes_with_bad_frames": 10
58
+ },
59
+ "episodes": {
60
+ "2026-05-11/episode_003": {
61
+ "n_frames": 10032,
62
+ "duration_s": 338.2,
63
+ "intensity_spikes": [[260, 268], "..."],
64
+ "pose_teleports_L": [],
65
+ "pose_teleports_R": [],
66
+ "total_bad_frames": 19,
67
+ "bad_fraction": 0.0019
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ A per-mode aggregate is also available: [`figures/dataset_figures/data_quality_breakdown.json`](../figures/dataset_figures/data_quality_breakdown.json).
74
+
75
+ ## Use in a dataloader
76
+
77
+ ```python
78
+ import json
79
+
80
+ with open("bad_frames.json") as f:
81
+ bad = json.load(f)["episodes"]
82
+
83
+ def is_clean_window(ep_name, t_start, t_end):
84
+ """Return True if [t_start, t_end] does not overlap any flagged interval."""
85
+ intervals = (bad[ep_name]["intensity_spikes"]
86
+ + bad[ep_name]["pose_teleports_L"]
87
+ + bad[ep_name]["pose_teleports_R"])
88
+ for s, e in intervals:
89
+ if s <= t_end and e >= t_start:
90
+ return False
91
+ return True
92
+
93
+ # In your sampler: if not is_clean_window(...), resample.
94
+ ```
95
+
96
+ ## Full report (per-episode CSV)
97
+
98
+ Every episode's individual stats (frames, duration, contact %, max intensity left/right, drift, max pose velocity, etc.) are in [`figures/dataset_figures/data_quality_report.csv`](../figures/dataset_figures/data_quality_report.csv).
docs/recording.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Recording setup
2
+
3
+ This document describes the hardware and sensor configuration used to record the React dataset. Schema for the resulting `.pt` files is in [`schema.md`](schema.md).
4
+
5
+ ## Sensors
6
+
7
+ | Stream | Hardware | Native shape | Rate |
8
+ |---|---|---|---|
9
+ | 3 × RealSense color | Intel D415 (serials `143322063538`, `104122062574`, `217222066989`) | 480×640×3 uint8 (BGR) | 30 FPS |
10
+ | 3 × RealSense depth | same | 480×640 uint16 (mm) | 30 FPS |
11
+ | 2 × GelSight tactile | GelSight Mini (left / right) | 480×640×3 uint8 | ~25 FPS, resampled to camera ticks |
12
+ | 3 × OptiTrack rigid bodies | `motherboard`, `sensor_left`, `sensor_right` | 7-vector (x, y, z, qx, qy, qz, qw) | ~120 Hz |
13
+
14
+ Each RealSense camera's calibration is stored in the source repo under `twm/calibration/result/T_mocap_to_cam_{middle,left,right}.json`. The serial→position mapping:
15
+
16
+ | Camera | Serial | Calibration file | Role |
17
+ |---|---|---|---|
18
+ | `cam0` | `143322063538` | `T_mocap_to_cam_right.json` | right-side view |
19
+ | `cam1` | `104122062574` | `T_mocap_to_cam_left.json` | left-side view |
20
+ | `cam2` | `217222066989` | `T_mocap_to_cam_middle.json`| overhead / center view |
21
+
22
+ The OptiTrack-to-GelSight rigid transforms are stored alongside in `T_gel_to_rigid_{left,right}.json`. These let you project the GelSight contact center into any of the three camera views; see the per-episode GIFs under `figures/episode_previews/` for examples.
23
+
24
+ ## Timing
25
+
26
+ All streams share a common monotonic timestamp axis, recorded in the `timestamps` dataset (camera tick rate, 30 Hz). Per-tracker OptiTrack streams keep their own higher-rate timestamps under `optitrack/<body>/timestamps` in the raw HDF5 (not preserved in the processed `.pt` slice).
27
+
28
+ The processed dataset (`processed/mode1_v1/...`) nearest-neighbor-aligns the OptiTrack pose stream to camera ticks. The full ~120 Hz pose track is only in the raw HDF5 mirror.
29
+
30
+ ## Coordinate frames
31
+
32
+ - OptiTrack reports positions in meters relative to the mocap room origin.
33
+ - Quaternions follow `(qx, qy, qz, qw)` ordering (scalar last).
34
+ - The `T_mocap_to_cam_*` extrinsics map mocap-frame coordinates into camera-frame coordinates (right-handed, +Z forward).
35
+
36
+ ## Tasks recorded
37
+
38
+ | Task | Description |
39
+ |---|---|
40
+ | `motherboard` | Bimanual manipulation of components on a computer motherboard (CPU placement, lever seat, screw tightening). |
41
+
42
+ More tasks will be added as collection continues; see [`../tasks.json`](../tasks.json) for the machine-readable registry.
docs/schema.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Schema
2
+
3
+ Layout of each per-episode `.pt` file in the published `processed/mode1_v1/` slice. Hardware/recording details are in [`recording.md`](recording.md).
4
+
5
+ ## `.pt` fields
6
+
7
+ Each `episode_*.pt` is a Python dict loadable with `torch.load(..., weights_only=False)`.
8
+
9
+ | Key | Shape | dtype | Description |
10
+ |---|---|---|---|
11
+ | `view` | `(T, 3, 128, 128)` | uint8 | Overhead camera (`realsense/cam0/color`), center-cropped to square then bilinear-resized to 128×128 |
12
+ | `tactile_left` | `(T, 3, 128, 128)` | uint8 | Left GelSight, same crop/resize |
13
+ | `tactile_right` | `(T, 3, 128, 128)` | uint8 | Right GelSight, same crop/resize |
14
+ | `timestamps` | `(T,)` | float64 | Camera timestamps (seconds, monotonic clock) |
15
+ | `sensor_left_pose` | `(T, 7)` | float32 | Left GelSight rigid body OptiTrack pose, nearest-neighbor aligned to camera timestamps |
16
+ | `sensor_right_pose` | `(T, 7)` | float32 | Right GelSight rigid body OptiTrack pose, same alignment |
17
+ | `tactile_{left,right}_intensity` | `(T,)` | float32 | Per-frame mean per-pixel L2 distance from a contact-free reference frame |
18
+ | `tactile_{left,right}_area` | `(T,)` | float32 | Per-frame fraction of pixels with L2 diff > `tau` |
19
+ | `tactile_{left,right}_mixed` | `(T,)` | float32 | Mean of (diff × mask) — intensity restricted to contact pixels |
20
+ | `_contact_meta` | dict | — | Per-episode contact metadata: `tau`, drift, p01 reference indices, the chosen reference RGB frames |
21
+
22
+ Each `.contact.json` next to the `.pt` is a small summary of the metric distributions plus drift diagnostics — useful for filtering / sanity checking without loading the full tensors.
23
+
24
+ ## Contact metric definition
25
+
26
+ For each tactile sensor independently:
27
+
28
+ 1. Pick a **contact-free reference frame** — the ~0.1th-percentile-quietest frame by mean L2 distance to the temporal median (`reference_strategy = "p01"`).
29
+ 2. For each frame `t`, compute the per-pixel `diff[t, x, y] = || frame[t, :, x, y] − ref[:, x, y] ||_2` (RGB L2 over channels).
30
+ 3. Then:
31
+
32
+ - `intensity[t] = mean(diff[t])`
33
+ - `area[t] = mean(diff[t] > tau)` (default `tau = 8.0` on the uint8 scale)
34
+ - `mixed[t] = mean(diff[t] · (diff[t] > tau))`
35
+
36
+ `_contact_meta["drift_warning"]` is `True` when either sensor's drift (L2 distance between the first frame and the p01 reference) exceeds `2 · tau`; in this release no episode triggers it.
37
+
38
+ ## Pose conventions
39
+
40
+ - Position is in **meters** in OptiTrack room coordinates.
41
+ - Quaternion follows `(qx, qy, qz, qw)` ordering (scalar last).
42
+ - To project sensor positions into a camera image, compose `sensor_pose → T_mocap_to_cam → camera intrinsics`. The recording-side calibration files (`T_mocap_to_cam_*.json` and `T_gel_to_rigid_*.json`) are referenced in [`recording.md`](recording.md).