diff --git a/lerobot/common/datasets/push_dataset_to_hub/aloha_dora_format.py b/lerobot/common/datasets/push_dataset_to_hub/aloha_dora_format.py index b6ae8b34..c2e1497e 100644 --- a/lerobot/common/datasets/push_dataset_to_hub/aloha_dora_format.py +++ b/lerobot/common/datasets/push_dataset_to_hub/aloha_dora_format.py @@ -42,7 +42,10 @@ def check_format(raw_dir) -> bool: def load_from_raw(raw_dir: Path, out_dir: Path): # Load data stream that will be used as reference for the timestamps synchronization - reference_key = "observation.images.cam_right_wrist" + reference_files = list(raw_dir.glob("observation.images.cam_*.parquet")) + if len(reference_files) == 0: + raise ValueError(f"Missing reference files for camera, starting with in '{raw_dir}'") + reference_key = reference_files[0].stem reference_df = pd.read_parquet(raw_dir / f"{reference_key}.parquet") reference_df = reference_df[["timestamp_utc", reference_key]]