File size: 5,468 Bytes
ff4cc42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
task_categories:
  - robotics
tags:
  - tsfile
  - timeseries
  - tabular
modality:
  - timeseries
  - tabular
pretty_name: G1 Dex3 Block Stacking TsFile
size_categories:
  - 100K<n<1M
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/unitreerobotics_g1_dex3_blockstacking.tsfile
---

# G1 Dex3 Block Stacking TsFile

This repository is an Apache TsFile conversion of
[`unitreerobotics/G1_Dex3_BlockStacking_Dataset`](https://huggingface.co/datasets/unitreerobotics/G1_Dex3_BlockStacking_Dataset),
a LeRobot manipulation dataset for stacking three cubic blocks on a desktop in
red, yellow, and blue order.

## Source dataset

- Original dataset: https://huggingface.co/datasets/unitreerobotics/G1_Dex3_BlockStacking_Dataset
- Author / repository owner: Unitree Robotics (`unitreerobotics`)
- Source-tree contributors shown by Hugging Face: `Henry-Ellis`, `lv-1`
- License: Apache-2.0
- Robot: Unitree G1, 7-DOF dual-arm, with three-finger Dex3 hands
- Recording frequency: 30 Hz
- Cameras: two head-mounted streams (`cam_left_high`, `cam_right_high`) and two wrist-mounted streams (`cam_left_wrist`, `cam_right_wrist`)
- Resolution: 640x480 RGB; source video codec is AV1
- Split: `train` (`0:301` episodes)
- Episodes / rows / tasks: 301 / 281,196 / 1
- Source data shards: 1 chunk / 1 Parquet file; source card reports 1,204 video files
- Source frame file: `data/chunk-{chunk_index:03d}/file-{file_index:03d}.parquet`

The task description in the original card is to stack three 5 cm cubic blocks on
black tape on the desktop from bottom to top in red, yellow, and blue order.

## Converted files

- TsFile: `data/unitreerobotics_g1_dex3_blockstacking.tsfile`
- Table: `unitreerobotics_g1_dex3_blockstacking`
- Rows: 281,196
- Episodes: 301
- Episode files: 1 merged table-model TsFile
- Time precision: milliseconds
- Source metadata: `meta/tasks.parquet`, `meta/episodes/...`, and `meta/stats.json` are retained; `meta/info.json` documents the conversion.

## Schema

| Role | Columns |
| --- | --- |
| TIME | `Time` (`INT64` timestamp, milliseconds) |
| TAG / device metadata | `episode_index`, `task_index` (original source names) |
| FIELD | `frame_index`, `sample_index` (renamed from source `index`) |
| FIELD FLOAT | `observation_state_0` ... `observation_state_27` |
| FIELD FLOAT | `action_0` ... `action_27` |

`Time = round(timestamp * 1000)`. The source timestamp is in seconds and
restarts at zero for each episode, so `Time` is monotonic within each
(`episode_index`, `task_index`) device. The source `timestamp` column is dropped
after synthesis because it is redundant with `Time / 1000`.

Vector columns are flattened row-major while preserving source prefixes:

- `observation.state[28]` -> `observation_state_0` ... `observation_state_27`
- `action[28]` -> `action_0` ... `action_27`

The source `index` is renamed to `sample_index`; `frame_index`,
`episode_index`, and `task_index` are preserved. No numeric state/action rows
are dropped. Image/video feature columns are not written into TsFile because
the local source Parquet contains numeric references only.

## Encoding and compression

The compact TsFile profile is used to avoid producing a file larger than the
source Parquet:

- FLOAT/DOUBLE: `GORILLA` + `LZ4`
- INT32/INT64: `TS_2DIFF` + `LZ4`
- Time: `TS_2DIFF` + `LZ4`
- BOOLEAN: `RLE` + `LZ4` (no BOOLEAN fields are present in this dataset)
- TAG columns: TsFile table/device TAG mechanism

The staged Parquet and local validation report are kept outside the upload set
under `.conversion_work/`.

## Videos and attribution

Videos are not included in this TsFile repository. They remain in the original
Hugging Face dataset at:

- [`videos/observation.images.cam_left_high`](https://huggingface.co/datasets/unitreerobotics/G1_Dex3_BlockStacking_Dataset/tree/main/videos/observation.images.cam_left_high)
- [`videos/observation.images.cam_left_wrist`](https://huggingface.co/datasets/unitreerobotics/G1_Dex3_BlockStacking_Dataset/tree/main/videos/observation.images.cam_left_wrist)
- [`videos/observation.images.cam_right_high`](https://huggingface.co/datasets/unitreerobotics/G1_Dex3_BlockStacking_Dataset/tree/main/videos/observation.images.cam_right_high)
- [`videos/observation.images.cam_right_wrist`](https://huggingface.co/datasets/unitreerobotics/G1_Dex3_BlockStacking_Dataset/tree/main/videos/observation.images.cam_right_wrist)

The source metadata video pattern is
`videos/{video_key}/chunk-{chunk_index:03d}/file-{file_index:03d}.mp4`.
`episode_index` and `frame_index` remain unchanged in the TsFile so consumers
can align a time-series row with its original video frame.

## Read example

```python
import sys
sys.path.insert(0, r"D:\\code\\.deps")
from tsfile import TsFileReader

path = r"D:\\code\\py\\unitreerobotics_G1_Dex3_BlockStacking_Dataset\\data\\unitreerobotics_g1_dex3_blockstacking.tsfile"
reader = TsFileReader(path)
table = reader.get_all_table_schemas()["unitreerobotics_g1_dex3_blockstacking"]
columns = [c.get_column_name() for c in table.get_columns() if c.get_column_name() != "Time"]
with reader.query_table("unitreerobotics_g1_dex3_blockstacking", columns, batch_size=65536) as result:
    batch = result.read_arrow_batch()
```

## Citation

Please cite the original Unitree Robotics dataset repository and the LeRobot
project when using this conversion. No separate paper or BibTeX entry was
provided in the source dataset card.