From 68a680a9eb5c3f6f8437043eb73571a1d5120af8 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Wed, 29 May 2024 11:40:02 +0200 Subject: [PATCH] make aloha dora more flexible for A koch arm --- .../common/datasets/push_dataset_to_hub/aloha_dora_format.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]]