Data Conversion¶
Convert collected .vla trajectories to LeRobot / DROID format for use with the openpi training pipeline.
DROID Schema¶
The exporter targets the DROID LeRobot schema:
- Three named cameras:
wrist_image_left,exterior_image_1_left,exterior_image_2_left joint_position— firstnum_jointsdims ofobservation/proprio_jointsactions— joint velocities (num_joints) concatenated with a zeroed gripper channel
Configuration¶
All fields can be overridden at the command line with tyro.
DatasetCfg fields:
| Field | Default | Description |
|---|---|---|
image_height |
180 |
Output image height in pixels |
image_width |
320 |
Output image width in pixels |
fps |
50 |
Dataset frames per second |
robot_type |
"panda" |
Robot type label in LeRobot metadata |
repo_id |
"rio" |
HuggingFace repo ID for the dataset |
num_joints |
None |
Number of joints; inferred from data if None |
action_dim |
None |
Action dimensionality; inferred if None |
camera_mapping |
None |
Dict mapping camera keys → DROID names; inferred if None |
Script-specific Args fields:
| Field | Default | Description |
|---|---|---|
input |
"/tmp/dummy_data/" |
Path to a .vla file or directory |
output |
None |
Output directory (defaults to ~/.cache/huggingface/lerobot/{repo_id}) |
robot_type |
"xarm" |
Overrides DatasetCfg default for xarm datasets |
verbose |
False |
Enable verbose logging |
clean |
False |
Delete output directory before converting |
Auto-Inference¶
When num_joints, action_dim, or camera_mapping are left as None, the script infers them from the first trajectory:
num_joints— last dimension ofobservation/proprio_jointsaction_dim—num_joints+ gripper dimensionscamera_mapping— assigns DROID names by ascending resolution (smallest →wrist_image_left)
Convert to DROID¶
Minimal — auto-infer everything:
Output lands in ~/.cache/huggingface/lerobot/rio by default.
Specify output path and repo ID:
uv run examples/data/convert_to_lerobot_droid.py \
--input /data/rollouts/my_task/ \
--output /data/lerobot/my_task/ \
--repo-id myuser/my_task
Re-run from scratch (wipe existing output):
uv run examples/data/convert_to_lerobot_droid.py \
--input /data/rollouts/my_task/ \
--output /data/lerobot/my_task/ \
--clean
Override inferred fields:
uv run examples/data/convert_to_lerobot_droid.py \
--input /data/my_task \
--num-joints 7 \
--action-dim 8
Compute Normalization Statistics¶
After conversion, compute normalization stats required by the openpi training pipeline: