roboreel / README.md
LogosRoboticsLab's picture
Update README for train/eval layout
37fe7cd verified
|
Raw History Blame Contribute Delete
4.33 kB
---
license: mit
---
# RoboReel
Human demonstration videos and simulated robot trajectories for 10 manipulation tasks.
## Layout
```
human_demos/
train/{no_distraction,with_distraction,pose_defined}/<task>/<episode>/
eval/{no_distraction,with_distraction}/<task>/<episode>/
excluded_human_demos_with_distraction/<task>/<episode>/
depths.h5
egocentric.mp4 front.mp4 left.mp4 right.mp4
robot_trajectories/
{with_distraction,no_distraction}/<task>/<episode>/
<timestamp>.h5
<timestamp>.json
0.mp4 base_camera.mp4 hand_camera.mp4 left_camera.mp4 overhead_camera.mp4 right_camera.mp4
```
## Episode counts
Human demos, per task:
| Task | `train/no_distraction` | `train/with_distraction` | `train/pose_defined` | `eval/no_distraction` | `eval/with_distraction` |
|---|---|---|---|---|---|
| `bowl_in_plate` | 80 | 80 | 100 | 20 | 20 |
| `close_drawer` | 80 | 80 | 50 | 20 | 20 |
| `empty_basket` | 80 | 80 | 100 | 20 | 20 |
| `open_lid` | 80 | 80 | 100 | 20 | 20 |
| `pick_cube` | 80 | 80 | 110 | 20 | 20 |
| `press_toaster` | 80 | 80 | 100 | 20 | 20 |
| `push_cube` | 80 | 80 | 100 | 20 | 20 |
| `stack_cups` | 80 | 80 | 100 | 20 | 20 |
| `toys_in_basket` | 80 | 80 | 100 | 20 | 20 |
| `toys_in_drawer` | 80 | 80 | 100 (as `toy_drawer_close`) | 20 | 20 |
Robot trajectories: 100 episodes per task in each of `no_distraction` and `with_distraction`.
## Train and evaluation split
In `no_distraction` and `with_distraction`, episodes `0000`-`0079` are in `train` and episodes
`0080`-`0099` are in `eval`. All `pose_defined` demos are used for training only.
`human_demos/train/pose_defined/push_cube` contains the same recordings as `no_distraction/push_cube`,
including the episodes in `eval/no_distraction/push_cube`.
`human_demos/excluded_human_demos_with_distraction` holds 20 further with-distraction episodes
per task (200 in total), numbered `0100`-`0119`. They are not part of `train` or `eval`.
## Human demonstrations
RGB video is stored only in the mp4 files (1280x720, 30 fps, H.264). `depths.h5` holds the
depth video and calibration. It contains one group per camera (`egocentric`, `front`, `left`,
`right`):
| Path | Contents |
|---|---|
| `<cam>/depth/frames` | `uint16` depth, shape `(T, H, W)`: 720x1280 for `egocentric`, 768x1024 for the others |
| `<cam>/depth/depth_scale` | Metres per depth unit |
| `<cam>/depth/intrinsics`, `<cam>/rgb/intrinsics` | Camera intrinsics |
| `<cam>/depth/distortion`, `<cam>/rgb/distortion` | Distortion coefficients; the `model` attribute names the model |
| `<cam>/extrinsics/depth_to_rgb_R`, `depth_to_rgb_t` | Depth-to-RGB rotation and translation |
| `<cam>/timestamps` | Per-frame capture time, seconds since the epoch |
Files also carry `task_name` and `demo_id` attributes. These are recording metadata, so they
may differ from the folder names and episode numbers. Use the folder paths as the task and
episode labels.
### Reading depth
Depth is compressed with Bitshuffle and zstd, so `hdf5plugin` must be imported before reading:
```python
import hdf5plugin # registers the compression filter
import h5py
with h5py.File("human_demos/train/no_distraction/push_cube/0000/depths.h5", "r") as f:
cam = f["front"]
depth_m = cam["depth/frames"][0] * cam["depth/depth_scale"][()]
timestamps = cam["timestamps"][()]
```
### Synchronisation and alignment
- Cameras are not frame-aligned, and frame counts differ between cameras in the same episode.
Use `timestamps` to synchronise them.
- Depth is not registered to RGB. Their intrinsics differ, and so does the resolution on
`front`, `left` and `right`. Use the calibration above to align them.
## Robot trajectories
Generated by motion planning in simulation with a Panda arm (`panda_wristcam_hd`) using
`pd_joint_pos` control. Each `.json` file records the environment ID and settings for its
episode; `with_distraction` episodes have `distract: true`.
Each `.h5` file has one group, `traj_0`, including:
| Path | Contents |
|---|---|
| `traj_0/actions` | Actions, shape `(T, 8)` |
| `traj_0/obs` | State observations, length `T + 1` |
| `traj_0/env_states/actors/<name>` | Per-object state, length `T + 1` |
| `traj_0/env_states/articulations/panda_wristcam_hd` | Robot state, length `T + 1` |
| `traj_0/rewards` | Per-step rewards, length `T` |