TacRich-Manip / docs /DATASET_SCHEMA.md
Tachintech's picture
Publish complete audited TacRich-Manip LeRobot v3 release
15fd275
|
Raw
History Blame Contribute Delete
11 kB

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_j1arm_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

T_B_G = T_B_F @ T_F_G

with the exact configured values

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:

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:

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/task_sources.parquet Release provenance: logical task, physical source name, collection method, main/test role, episode count, frame count, and duration at 40 Hz
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:

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.