File size: 10,837 Bytes
4f372e2 | 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 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | # TacRich-Manip LeRobot v3 — complete schema
This document is the normative field reference for TacRich-Manip LeRobot task
repositories. `meta/info.json` remains the machine-readable source of shapes,
dtypes, FPS, and path templates. The dataset card summarizes the same fields;
this file expands every key, coordinate frame, unit, order, and storage detail.
## Shape and runtime conventions
- Logical image shapes in `meta/info.json` use `[height,width,channel]`.
- LeRobot commonly returns decoded RGB as PyTorch `[channel,height,width]`
float32 in `[0,1]`; this runtime layout is not a change to the stored schema.
- Scalar features are declared with shape `[1]` but are serialized as scalar
Parquet values and may be returned as zero-dimensional tensors.
- `float32` vectors have expected quantization at approximately 1e-7 relative
precision. Source timestamps are stored as Parquet `float64`.
- Quaternion order is always `[qx,qy,qz,qw]`; positions are `[x,y,z]`.
## Complete per-frame feature dictionary
### Visual and tactile observations
| Key | `info.json` dtype | Logical shape | Storage and value definition |
| --- | --- | ---: | --- |
| `observation.images.cam_front` | `video` | `[480,640,3]` | Front RGB at time `t`; MP4 AV1, 40 Hz nominal, HWC RGB/uint8-equivalent before loader conversion |
| `observation.images.cam_side` | `video` | `[480,640,3]` | Side RGB at time `t`; same format |
| `observation.images.cam_fisheye` | `video` | `[480,640,3]` | Gripper fisheye RGB at time `t`; same format |
| `observation.depth.cam_front` | `image` | `[480,640,1]` | Front depth at time `t`; lossless 16-bit PNG, uint16, millimetres, stored in the data Parquet image struct |
| `observation.tactile` | `float32` | `[2,32,58]` | PA-STE response indexed `[finger,row,column]`; finger 0 = left/NPZ key `0`, finger 1 = right/NPZ key `1` |
RGB video keys are not columns in `data/**/*.parquet`; LeRobot resolves them
through the video ranges in `meta/episodes/**/*.parquet`. This is normal v3
layout, not missing conversion. Depth is deliberately a Parquet image field so
the 16-bit PNG bytes remain lossless. Tactile response is dimensionless after
sensor calibration and must not be interpreted as newtons without a separate
force calibration.
### Robot observations and actions
| Key | Storage dtype | Shape | Definition |
| --- | --- | ---: | --- |
| `observation.joint_position` | float32 | `[7]` | Current robot joints `[arm_j1,...,arm_j7]`, degrees; all zeros for UMI when joints are unavailable |
| `observation.ee_pose` | float32 | `[7]` | Current flange/TCP pose `[x,y,z,qx,qy,qz,qw]`; position metres, orientation unit quaternion |
| `observation.gripper_distance` | float32 scalar | `[1]` | Current opening distance, millimetres |
| `observation.state` | float32 | `[15]` | Current joint + flange/TCP + gripper state; exact index table below |
| `observation.state_gripper` | float32 | `[10]` | Current gripper-tip/TCP pose in rotation-6D form plus opening; exact index table below |
| `action` | float32 | `[8]` | Absolute flange/TCP target plus gripper target; exact index table below |
| `action_gripper` | float32 | `[10]` | Absolute gripper-tip/TCP target in rotation-6D form plus target opening |
#### `observation.state` indices
| Index | Name | Unit | Frame / meaning |
| ---: | --- | --- | --- |
| 0–6 | `arm_j1` … `arm_j7` | degree | Current robot joints; UMI zero-fill only |
| 7 | `flange_x_m` | m | Current flange/TCP X |
| 8 | `flange_y_m` | m | Current flange/TCP Y |
| 9 | `flange_z_m` | m | Current flange/TCP Z |
| 10 | `flange_qx` | 1 | Quaternion X, XYZW order |
| 11 | `flange_qy` | 1 | Quaternion Y |
| 12 | `flange_qz` | 1 | Quaternion Z |
| 13 | `flange_qw` | 1 | Quaternion W |
| 14 | `gripper_distance_mm` | mm | Current opening distance |
#### `action` indices
| Index | Name | Unit | Frame / meaning |
| ---: | --- | --- | --- |
| 0 | `target_flange_x_m` | m | Absolute target X |
| 1 | `target_flange_y_m` | m | Absolute target Y |
| 2 | `target_flange_z_m` | m | Absolute target Z |
| 3 | `target_flange_qx` | 1 | Target quaternion X, XYZW order |
| 4 | `target_flange_qy` | 1 | Target quaternion Y |
| 5 | `target_flange_qz` | 1 | Target quaternion Z |
| 6 | `target_flange_qw` | 1 | Target quaternion W |
| 7 | `target_gripper_distance_mm` | mm | Target opening distance |
#### `observation.state_gripper` and `action_gripper` indices
| Index | State name | Action name | Unit | Definition |
| ---: | --- | --- | --- | --- |
| 0 | `tip_x_m` | `target_tip_x_m` | m | Gripper-tip/TCP X |
| 1 | `tip_y_m` | `target_tip_y_m` | m | Gripper-tip/TCP Y |
| 2 | `tip_z_m` | `target_tip_z_m` | m | Gripper-tip/TCP Z |
| 3 | `R00` | `target_R00` | 1 | First rotation-matrix column, row 0 |
| 4 | `R10` | `target_R10` | 1 | First column, row 1 |
| 5 | `R20` | `target_R20` | 1 | First column, row 2 |
| 6 | `R01` | `target_R01` | 1 | Second column, row 0 |
| 7 | `R11` | `target_R11` | 1 | Second column, row 1 |
| 8 | `R21` | `target_R21` | 1 | Second column, row 2 |
| 9 | `gripper_distance_mm` | `target_gripper_distance_mm` | mm | Opening distance |
Rotation-6D is therefore `concat(R[:,0], R[:,1]) =
[R00,R10,R20,R01,R11,R21]`. A consumer may reconstruct an orthonormal matrix
by Gram–Schmidt normalization of the two stored columns.
### Time, episode, and indexing keys
| Key | Parquet dtype | Shape | Definition |
| --- | --- | ---: | --- |
| `observation.timestamp` | float64 | `[1]` | Aligned raw CSV timestamp, Unix seconds |
| `observation.source_timestamp_tactile` | float64 | `[1]` | Tactile source timestamp; explicit CSV value, otherwise filename timestamp, otherwise aligned timestamp |
| `observation.source_timestamp_proprio` | float64 | `[1]` | Proprioception source timestamp; explicit CSV value, otherwise aligned timestamp |
| `observation.source_timestamp_vision` | float64 | `[1]` | Front RGB source timestamp; explicit CSV value, otherwise filename timestamp, otherwise aligned timestamp |
| `timestamp` | float32 | `[1]` | LeRobot relative time in seconds: `frame_index / fps` |
| `frame_index` | int64 | `[1]` | Zero-based frame number within one episode |
| `episode_index` | int64 | `[1]` | Zero-based episode ID across the dataset |
| `index` | int64 | `[1]` | Zero-based global row ID across all episodes |
| `task_index` | int64 | `[1]` | Index into `meta/tasks.parquet` |
Do not use `timestamp` as wall-clock time. Conversely, do not subtract large
Unix timestamps after a loader has cast them to float32: epoch-scale float32
has coarse resolution. Read the Parquet float64 values or subtract in float64
first when precise sensor synchronization is required.
## Coordinate frames and fixed flange-to-tip transform
Let `B` be the robot base, `F` the flange frame, and `G` the published
gripper-tip/TCP frame. Homogeneous transforms use the convention `T_A_B` = pose
of frame B expressed in frame A. `T_F_G` is the same transform elsewhere named
`T_flange_gripper`. Teleoperation uses
```text
T_B_G = T_B_F @ T_F_G
```
with the exact configured values
```text
translation_F_G_m = [0.0, 0.0, 0.2]
yaw_F_G_deg = +40.0
cos(40 deg) = 0.7660444431
sin(40 deg) = 0.6427876097
T_F_G =
[[ 0.7660444431, -0.6427876097, 0.0, 0.0 ],
[ 0.6427876097, 0.7660444431, 0.0, 0.0 ],
[ 0.0, 0.0, 1.0, 0.2 ],
[ 0.0, 0.0, 0.0, 1.0 ]]
T_G_F = inverse(T_F_G) =
[[ 0.7660444431, 0.6427876097, 0.0, 0.0 ],
[-0.6427876097, 0.7660444431, 0.0, 0.0 ],
[ 0.0, 0.0, 1.0, -0.2 ],
[ 0.0, 0.0, 0.0, 1.0 ]]
```
Equivalently:
```text
p_B_G = p_B_F + R_B_F @ [0,0,0.2]
R_B_G = R_B_F @ Rz(+40 degrees)
```
The translation is in the flange frame, so it must be rotated by the current
flange orientation. `observation.state` contains joints plus `T_B_F`;
`observation.state_gripper` omits joints and contains `T_B_G` as position +
rotation-6D. The same distinction applies to `action` and `action_gripper`.
## Collection-method action semantics
### Teleoperation
- State poses are absolute in the robot-base frame.
- `action[t]` is the migrated, applied absolute flange command from raw
`arm_target_*` at aligned row `t`; only those columns are read.
- Raw `action_delta_*` is retained in the raw archive as provenance but is not
read by either LeRobot or AVAloha conversion.
- `action_gripper[t]` is obtained from the same target with `T_B_G = T_B_F @
T_F_G`; no independent zero or second clamp is applied.
- Commanded action and `state[t+1]` should follow the same trajectory, but they
are not mathematical equality because command look-ahead, robot dynamics,
controller filtering, and sensor latency are real.
### UMI
Let `T_0` be the first valid TCP pose of the episode:
```text
T_local_i = inverse(T_0) @ T_raw_i
p_local_i = R_0^T @ (p_i - p_0)
R_local_i = R_0^T @ R_i
```
The first valid state is zero translation with identity rotation. The action at
`t` is the next observed local TCP pose; the final action repeats the final
state. Joint fields are zero-filled because the UMI source has no robot joints.
## LeRobot v3 files and metadata keys
| File or directory | Complete purpose |
| --- | --- |
| `meta/info.json` | `codebase_version`, `robot_type`, totals, FPS, splits, chunk/file sizes, path templates, and all feature dtype/shape/name declarations |
| `meta/stats.json` | Global min/max/mean/std/count and quantiles used for normalization/audit |
| `meta/tasks.parquet` | Task strings and their integer `task_index` values |
| `meta/episodes/chunk-*/file-*.parquet` | Per-episode length/tasks, global data bounds, data shard IDs, video shard/time ranges, and episode statistics |
| `data/chunk-*/file-*.parquet` | All non-video per-frame keys listed above |
| `videos/<video-key>/chunk-*/file-*.mp4` | AV1 RGB frames; multiple episodes may share a v3 video shard |
## Exact-depth loading note
The PNG bytes are uint16 and were verified lossless against source depth. With
some torchvision versions, `LeRobotDataset` returns a signed `torch.int16`
depth tensor because PIL mode `I;16` is passed through `ToTensor`. The bit
pattern is still exact; recover it before numeric use:
```python
depth = sample["observation.depth.cam_front"].cpu().numpy().squeeze()
if depth.dtype == np.int16:
depth = depth.view(np.uint16)
else:
depth = depth.astype(np.uint16, copy=False)
```
The provided `examples/visualize_episode.py` performs this conversion and does
not silently rescale depth to 8-bit.
**Depth-statistics note:** In this release, LeRobot's generic image-statistics path recorded depth as three-channel normalized [0,1] image statistics. Those `meta/stats.json` depth values are not metric millimetre statistics and must not normalize uint16 depth. The stored PNG values and the provided visualizer remain exact.
|