File size: 4,262 Bytes
1c4ef86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Quickstart

## Try the starter ZIP

Download [reframe_handheld_starter_17.zip](../downloads/reframe_handheld_starter_17.zip) and extract it. The resulting `reframe_handheld_starter/` directory contains 17 complete recordings, their calibration and the reading tools. You can open the MP4 files without installing Python or ROS.

For Python access, use Python 3.10 or later with a compatible environment:

```bash
python -m pip install -r reframe_handheld_starter/tools/requirements_reader.txt
```

Run this example from the directory containing `reframe_handheld_starter`:

```python
import json
import sys
from pathlib import Path
import pyarrow.parquet as pq

root = Path("reframe_handheld_starter")
sys.path.insert(0, str(root / "tools"))
from read_episode import load_episode, frame_records, read_video_frame

with (root / "metadata/episodes.jsonl").open() as catalog:
    entry = json.loads(next(catalog))

folder, info = load_episode(root, entry["episode_path"])
image_rgb = read_video_frame(folder, "main_rgb", video_frame_index=0)
timestamps = frame_records(folder, "main_rgb")
poses = pq.read_table(folder / "slam_pose.parquet")
gripper = pq.read_table(folder / "gripper.parquet")

print(entry["episode_id"], image_rgb.shape)
print(info["calibration_id"])
print(timestamps[0]["header_timestamp_ns"], timestamps[0]["bag_timestamp_ns"])
print(poses.num_rows, gripper.num_rows)
```

The image is an RGB array. `video_frame_index` is decoded video order; `source_message_index` identifies the source message. Missing auxiliary streams are indicated by `present=false` in `info["cameras"]`, not by a blank video or frame index zero.

## Download only what you need

The repository is Ziegelll/reframe-handheld. Version v0.1 will be available after the initial upload and verification finish. Private access requires an authenticated HF account with access to the repository. The script is available in the starter ZIP and in the repository's tools directory.

Download the cup-hanging task:

```bash
python reframe_handheld_starter/tools/download_dataset.py \
  --repo-id Ziegelll/reframe-handheld --revision v0.1 \
  --task hang_cup --output reframe_handheld
```

Download one episode:

```bash
python reframe_handheld_starter/tools/download_dataset.py \
  --repo-id Ziegelll/reframe-handheld --revision v0.1 \
  --episode-id 0727_pick__pick_0727_20260727_072812 --output reframe_handheld
```

Download all operation recordings:

```bash
python reframe_handheld_starter/tools/download_dataset.py \
  --repo-id Ziegelll/reframe-handheld --revision v0.1 \
  --all --output reframe_handheld
```

Task IDs are `pick_carrot`, `press_button`, `open_drawer` and `hang_cup`. All episode data is published in TAR shards. The tool downloads each required complete shard (typically up to 1.5 GiB, never over 2 GiB), verifies its SHA256, extracts only the selected episodes, verifies their payload hashes and includes shared calibration. Selecting one episode still downloads its complete containing shard. Downloaded TARs are retained under data/ for reuse. See metadata/shards.jsonl for sizes and metadata/episodes.jsonl for episode-to-shard mappings.

Selective downloads use the official [Hugging Face download API](https://huggingface.co/docs/huggingface_hub/guides/download). The local selection logic and reading examples have been checked; remote HF download validation is pending completion of the initial upload.

## Timestamps and optional matching

Original header timestamps and recorder timestamps are retained. JSON nanoseconds are decimal integer strings. Keep them as integers when doing time arithmetic. Record-time matching is optional and does not establish exposure synchronization.

```python
from read_episode import nearest_by_record_time

main = next(r for r in timestamps if r["video_frame_index"] == 0)
left = nearest_by_record_time(folder, "left_fisheye", int(main["record_time_ns"]))
print(left)  # May be None: absent stream, outside coverage or beyond the time limit.
```

The returned time difference is between record timestamps. It is not a physical synchronization error. See [TIME_ALIGNMENT.md](TIME_ALIGNMENT.md), [FORMAT.md](FORMAT.md), [CALIBRATION.md](CALIBRATION.md) and [QUALITY.md](QUALITY.md) for the complete definitions.