cube_in_cup_raw / README.md
Bigenlight's picture
Add cube_in_cup raw teleop logs: 24 takes, HDF5 + dual MP4, docs and stats
e0a6957 verified
|
Raw
History Blame Contribute Delete
15.2 kB
---
license: apache-2.0
task_categories:
- robotics
tags:
- lerobot
- imitation-learning
- ur7e
- manipulation
- pick-and-place
- hdf5
- teleoperation
size_categories:
- 1K<n<10K
---
# cube_in_cup_raw — raw HDF5 + MP4 teleop logs (UR7e, "put the cube in the cup")
The **raw, unprocessed** recordings behind
[`cube_in_cup_lerobot_v3`](https://huggingface.co/datasets/Bigenlight/cube_in_cup_lerobot_v3): one
folder per take, each with a **native multi-rate HDF5** of every logged signal (UR joints with
velocities and efforts, joint commands, TCP pose, 6-axis force/torque wrench, gripper, and the
**GELLO leader** streams) plus the two **raw camera MP4s**. Use this if you want to resample
differently, add features, or study the leader/follower relationship — otherwise start from the
ready-to-train LeRobot dataset.
- **24 takes · 6,226 cam1 frames (6,231 cam2) · 207.6 s (~3.5 min) · 30 fps cameras · ~219 MB**
- Per take: `vectors.h5` + `cam1.mp4` + `cam2.mp4`
- **Nothing resampled** — each stream keeps its own `t_rel_s` clock and native rate.
- Recorded in a single session on **2026-07-20** (20:52–21:04 local), one operator.
Every number on this page was measured directly from the 24 HDF5 files and the MP4s; the
machine-readable version is [`dataset_stats.json`](dataset_stats.json) in this repo.
## Setup
Collected on a **Universal Robots UR7e** — 6-DOF collaborative arm, joints in **radians**
driven by a **GELLO** low-cost 3D-printed **leader arm** for kinesthetic teleoperation. The
operator moves the GELLO leader; its joint positions map to UR7e joint commands. The end
effector is a **Robotiq 2F-85** two-finger parallel gripper.
Two Intel RealSense cameras record **RGB video only**:
- **Camera 1 — Intel RealSense D435**
- **Camera 2 — Intel RealSense D435if** (a D435 variant)
The two physical viewpoints are **different in kind**: one RealSense is mounted on the **robot
wrist**, just above the gripper (close-up / eye-in-hand view), and the other sits on a tall
**tripod** beside the table (scene / third-person view). *This card deliberately does not assert
which of the two is `cam1` and which is `cam2`* — that mapping was not verified for this release.
What matters downstream is that the **`cam1` ↔ `cam2` order is preserved at deploy time**, exactly
as recorded.
Both stream **1280×720 (720p) @ 30 fps**, `yuv420p`; raw files are `cam1.mp4` / `cam2.mp4`
(**MPEG-4 encoded**, verified identical format across all 48 videos). **No depth or IR was
recorded** — despite the RealSense depth capability, only the RGB color stream was saved (no point
cloud, no depth map). The derived LeRobot copy re-encodes to AV1; RAW keeps MPEG-4.
An **ArUco/AprilTag fiducial** is present in the cell, mounted on the **robot's base plate** — not
on the work surface. A UR teach pendant with E-stop and a plain white lab wall complete the
background.
![setup](assets/setup_01.jpg)
![setup](assets/setup_02.jpg)
## Task
**"put the cube in the cup."** The work surface holds exactly **two objects**: a **purple/lavender
wooden cube** (roughly 5 cm on a side) and a **sage-green plastic cup** (a tapered, planter-style
tumbler), both on a light wood-grain tabletop. The operator grasps the cube and drops it into the
cup. **Success = the cube ends up in the cup.**
![objects](assets/objects.jpg)
Unlike the sibling [`banana_in_pot_raw`](https://huggingface.co/datasets/Bigenlight/banana_in_pot_raw)
dataset, there are **no distractor objects** — the scene is a clean two-object pick-and-place. (A
bowl of plastic fruit is visible in the setup photos, but it sits on a side cart *off* the work
table and is not part of the scene.)
23 of the 24 takes are successful demonstrations; `take_23` is a recording misfire that is
retained here because this is the raw release — see [Known quirks](#known-quirks).
## HDF5 schema (`vectors.h5`)
Each group has its own `t_rel_s` (seconds, relative to take start) sampled at that stream's native
rate. All datasets are **1-D `float64`** in a columnar layout (channel `foo` is dataset
`group/foo`, not a 2-D table). Row counts vary with take length; totals below are over all 24 takes.
| group | native rate | rows (all takes) | fields | units / meaning |
|---|---|--:|---|---|
| `cam1_frames` | 30.0 Hz | 6,226 | `frame_idx`, `t_rel_s` | index/time of each cam1 MP4 frame |
| `cam2_frames` | 30.0 Hz | 6,231 | `frame_idx`, `t_rel_s` | index/time of each cam2 MP4 frame |
| `command` | **~98 Hz** | 20,371 | `cmd1..cmd6`, `t_rel_s` | commanded **absolute** UR joint targets (rad) |
| `ur_joint_states` | **~97 Hz** | 19,968 | `q1..q6`, `qd1..qd6`, `eff1..eff6`, `t_rel_s` | UR7e **follower** joint positions (rad), velocities (rad/s), efforts |
| `tcp_pose` | **~97 Hz** | 19,964 | `x,y,z`, `qw,qx,qy,qz`, `t_rel_s` | TCP pose in robot **base frame**: position (m) + quaternion |
| `wrench` | **~97 Hz** | 19,965 | `fx,fy,fz`, `tx,ty,tz`, `t_rel_s` | 6-axis end-effector force (N) + torque (N·m) |
| `gripper` | **~36.5 Hz** | 7,575 | `grip_pos`, `grip_cmd`, `gello_grip`, `t_rel_s` | measured opening, commanded, leader trigger |
| `gello_joint_states` | 30.0 Hz | 6,240 | `q1..q6`, `qd1..qd6`, `t_rel_s` | **GELLO leader** joints (rad) + velocities (rad/s) |
| `synchronized` | — | **0** | (56 declared keys, all length 0) | **EMPTY in every take** — a scaffold group; ignore |
> **Faster than the banana session.** The robot-side streams here run at **~97–98 Hz**, notably
> faster than the ~56–60 Hz of `banana_in_pot_raw`. Anyone comparing the two datasets will see
> roughly **3.2 robot samples per camera frame** here versus ~2 there. Never assume a fixed dt —
> always resample against `t_rel_s`.
> **Sampling is bursty, not uniform.** For the robot streams the inter-sample interval is
> *bimodal*: about 5 % of intervals are ~2.9 ms and the median is ~13.3 ms. That is why the
> **mean** rate (98 Hz) is higher than the rate implied by the **median** interval (~76 Hz). Both
> figures are correct; they describe different things. `dataset_stats.json` reports both.
**Cameras:** `cam1.mp4` / `cam2.mp4`, 1280×720 RGB, 30 fps, MPEG-4. Use `cam*_frames`
`frame_idx` / `t_rel_s` to align frames to the vector streams.
> See **[`DATA_DICTIONARY.md`](DATA_DICTIONARY.md)** in this repo for the exhaustive per-field
> listing (every dataset key, dtype, unit, and measured value range) and the per-take table.
Notes:
- `command` (cmd1..6) are the joint targets sent to the UR7e; `ur_joint_states.q*` are the
measured follower joints. `gello_joint_states.q*` are the **leader** joints — provided for
completeness but **not a valid inference input** (the deployed robot cannot see the leader).
- The physical robot is a **UR7e** and the derived LeRobot dataset labels it correctly as
`robot_type: "ur7e_gello"`. Note this differs from the older
[`banana_in_pot_lerobot_v3`](https://huggingface.co/datasets/Bigenlight/banana_in_pot_lerobot_v3),
which carries a legacy `"ur5e_gello"` label for the same physical arm.
## Measured value ranges
Pooled over all 24 takes — the actual envelope this data covers.
| signal | min | max | mean |
|---|--:|--:|--:|
| `ur_q1` (rad) | 2.6016 | 3.2402 | 2.8606 |
| `ur_q2` (rad) | −1.7067 | −1.1299 | −1.4411 |
| `ur_q3` (rad) | 1.4553 | 2.3131 | 1.9832 |
| `ur_q4` (rad) | −2.6559 | −1.5613 | −2.2401 |
| `ur_q5` (rad) | −1.7499 | −1.3693 | −1.5022 |
| `ur_q6` (rad) | −3.7516 | −3.0714 | −3.4827 |
| joint velocity `qd*` (rad/s) | −0.648 | 0.663 | ≈0 |
| joint effort `eff*` | −7.084 | 5.802 | — |
| TCP `x` (m) | 0.4199 | 0.5975 | 0.5090 |
| TCP `y` (m) | −0.1456 | 0.1888 | −0.0019 |
| TCP `z` (m) | 0.1785 | 0.4873 | 0.2971 |
| force `fx,fy,fz` (N) | −143.19 | 63.42 | — |
| torque `tx,ty,tz` (N·m) | −6.882 | 3.509 | — |
| `grip_pos` (normalized) | 0.0118 | 0.6314 | 0.2183 |
| `grip_cmd` (normalized) | 0.0000 | 0.9998 | 0.3788 |
| `gello_grip` (normalized) | 0.0000 | 1.0000 | 0.3787 |
The commanded joints `cmd1..cmd6` track the measured joints closely (e.g. `cmd1` spans
2.6016–3.2395 against `ur_q1`'s 2.6016–3.2402). The whole session lives in a **compact workspace**:
~18 cm of TCP travel in x, ~33 cm in y, ~31 cm in z. All takes stay inside the joint safety
envelope. Per-channel min/max/mean/std for **every** channel is in `dataset_stats.json` and
`DATA_DICTIONARY.md`.
## How the derived dataset is built from this
| dataset | contents |
|---|---|
| **raw (this repo)** | full multi-rate HDF5 + 2 MP4s — every signal above, native rates, **24** takes |
| [LeRobot joint](https://huggingface.co/datasets/Bigenlight/cube_in_cup_lerobot_v3) | `observation.state`(7)=`ur_q1..6`+`grip_pos`; `action`(7)=`cmd1..6`+`grip_cmd`; 2 AV1 videos, **23** episodes |
The LeRobot dataset is built with the same `convert_to_lerobot.py` recipe as the banana family: it
**resamples every stream onto the 30 fps cam1 timestamp grid** (nearest timestamp), drops the
`gello_*` leader streams, and re-encodes the videos to AV1. It has **23 episodes, not 24**
`take_23` is excluded there (see below). This raw release keeps everything at native rate so you
can resample or add features yourself.
## Usage
Read a take with `h5py`:
```python
import h5py, cv2, numpy as np
take = "take_03_20260720_205457"
with h5py.File(f"{take}/vectors.h5", "r") as f:
ur_q = np.stack([f["ur_joint_states"][f"q{k+1}"][:] for k in range(6)], axis=1) # (N97, 6) rad
cmd = np.stack([f["command"][f"cmd{k+1}"][:] for k in range(6)], axis=1) # (N98, 6) rad
tcp = np.stack([f["tcp_pose"][k][:] for k in "x y z qw qx qy qz".split()], 1) # (N97, 7)
wrench = np.stack([f["wrench"][k][:] for k in "fx fy fz tx ty tz".split()], 1) # (N97, 6)
grip = f["gripper"]["grip_pos"][:] # (N36,)
cam1_t = f["cam1_frames"]["t_rel_s"][:] # (Ncam,) 30 Hz
# each stream has its own f[group]["t_rel_s"] — align by nearest timestamp
cap = cv2.VideoCapture(f"{take}/cam1.mp4") # 1280x720 RGB @ 30 fps
```
To go straight to training, use the ready LeRobot dataset instead
(`LeRobotDataset("Bigenlight/cube_in_cup_lerobot_v3")`).
> ⚠️ **`columns` attribute quirk.** Every group carries an attribute named `columns` that is a
> **single scalar JSON string**, not a list — verified `str` in all 24 files. Always
> `json.loads(grp.attrs["columns"])`; `list(...)` on it iterates character-by-character and yields
> garbage.
## Known quirks
- **`take_23_20260720_210316` is a misfire — the one real defect in this release.** It is 1.64 s
long (49 cam1 frames), the UR barely moves (per-joint range < 0.013 rad, i.e. essentially
motionless), and the **gripper is never actuated** (`grip_pos` flat at 0.0118, `grip_cmd` flat at
0.0). It contains no demonstration of the task. It is **included here** because this is the raw,
as-recorded release, and **excluded from** `cube_in_cup_lerobot_v3`. Drop it in any training
pipeline built from this repo.
- **Take-number gaps `{4, 6}` are by design.** Folders run `take_01` … `take_26` but takes 04 and
06 were aborted/discarded during recording, giving exactly **24** folders. Do not treat the gaps
as missing data.
- **Duration outliers, not defects:** `take_01` (16.82 s) and `take_02` (16.41 s) are about **2×
the median take length** (8.24 s) — early, slower demonstrations. Their data is clean.
- **`cam1` / `cam2` frame-count mismatch:** in **16 of 24** takes the two cameras differ, by **±1
frame** (±2 in `take_21`; totals 6,226 cam1 vs 6,231 cam2). The two cameras are on independent
clocks — map between them by nearest timestamp; **never assume `cam1[k]` and `cam2[k]` are
simultaneous.** Exact per-take deltas are in `DATA_DICTIONARY.md` and `dataset_stats.json`.
- **`synchronized/` group is empty** (0 rows) in all 24 takes, despite declaring 56 channels.
Fusion happens downstream at conversion time, not here.
- **`gello_q6` is wrapped +2π relative to `ur_q6`.** Leader joints 1–5 track the follower to within
±0.011 rad, but joint 6 differs by **+6.2797 rad ≈ +2π** (`gello_q6` ∈ [2.53, 3.26] vs `ur_q6`
[−3.75, −3.07]) — the same physical wrist angle in a different revolution. Subtract 2π before
comparing leader to follower, or it looks like a massive tracking failure.
- `grip_pos` is normalized and never reaches 1.0 — the observed open extreme is **0.6314** (in
`take_09`), typical open is ~0.50, closed is 0.0118. This is the physical range the fingers
actually swept, not a clipping artifact.
## Data quality
Audited over all 24 takes:
- **Zero NaN and zero Inf** in any channel of any group of any take.
- **Video frame counts match `cam*_frames` row counts exactly** for all 24 takes, **both** cameras
(48/48 videos) — verified with `ffprobe -count_frames`.
- **All takes stay within the joint safety envelope** (see measured ranges above).
- Timing is well behaved: the largest single gap in any robot stream is **44 ms**, and the largest
in any camera stream is **65 ms** (~2 frame periods). Ratio of max to median interval is 1.2–3.2×
per take.
- Schema is **identical across all 24 files** — same 9 groups, same channel names, all `float64`.
- Cleanliness: no stray files, no hidden files, no sub-directories inside the take folders, and no
`/home/` absolute-path strings inside any of the 24 H5 files.
No success/failure labels, no human quality ratings, and no policy-performance numbers are claimed
for this dataset.
## Limitations & intended use
- **Small.** 24 takes / ~3.5 minutes is a *pilot-scale* dataset. It is not enough on its own for a
robust policy; treat it as a seed set or a schema reference.
- Single task, single scene layout, single operator, single session, fixed object placement.
- **No trained policy exists for this task yet.**
- Streams are **asynchronous** (each has its own clock); you must resample/align them yourself —
the `synchronized/` group is empty.
- Sampling is bursty (see the rate note above), so nearest-timestamp alignment is required rather
than index arithmetic.
- Intended for research in imitation learning, teleoperation analysis, and custom dataset
construction.
## Related repositories (this family)
| repo | contents |
|---|---|
| [**Bigenlight/cube_in_cup_raw**](https://huggingface.co/datasets/Bigenlight/cube_in_cup_raw) | **this** — raw HDF5 + MP4, 24 takes |
| [Bigenlight/cube_in_cup_lerobot_v3](https://huggingface.co/datasets/Bigenlight/cube_in_cup_lerobot_v3) | LeRobot joint-space dataset, 23 episodes |
| [Bigenlight/banana_in_pot_raw](https://huggingface.co/datasets/Bigenlight/banana_in_pot_raw) | sibling raw dataset, same rig, different scene |
## Citation
```bibtex
@misc{theo2026cubeincupraw,
title = {cube_in_cup_raw: raw UR7e + GELLO teleoperation logs (HDF5 + MP4) for
"put the cube in the cup"},
author = {Theo and {Bigenlight}},
year = {2026},
howpublished = {\url{https://huggingface.co/datasets/Bigenlight/cube_in_cup_raw}},
note = {24 takes, native multi-rate HDF5 + dual RGB MP4}
}
```
License: **Apache-2.0**.