From c94d1c57454f79f4ac3d8e6f53be8d6eca76afb8 Mon Sep 17 00:00:00 2001 From: Simon Alibert Date: Fri, 23 May 2025 17:31:56 +0200 Subject: [PATCH] Fix arm & glove --- lerobot/common/teleoperators/homonculus/homonculus_arm.py | 5 ++++- lerobot/common/teleoperators/homonculus/homonculus_glove.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lerobot/common/teleoperators/homonculus/homonculus_arm.py b/lerobot/common/teleoperators/homonculus/homonculus_arm.py index c481638f..2768d70c 100644 --- a/lerobot/common/teleoperators/homonculus/homonculus_arm.py +++ b/lerobot/common/teleoperators/homonculus/homonculus_arm.py @@ -82,6 +82,9 @@ class HomonculusArm(Teleoperator): if not self.new_state_event.wait(timeout=2): raise TimeoutError(f"{self}: Timed out waiting for state after 2s.") + if not self.is_calibrated: + self.calibrate() + logger.info(f"{self} connected.") @property @@ -236,7 +239,7 @@ class HomonculusArm(Teleoperator): self.new_state_event.set() except Exception as e: - logger.warning(f"Error reading frame in background thread for {self}: {e}") + logger.debug(f"Error reading frame in background thread for {self}: {e}") def get_action(self) -> dict[str, float]: joint_positions = self._read() diff --git a/lerobot/common/teleoperators/homonculus/homonculus_glove.py b/lerobot/common/teleoperators/homonculus/homonculus_glove.py index 43027395..81ff7f8f 100644 --- a/lerobot/common/teleoperators/homonculus/homonculus_glove.py +++ b/lerobot/common/teleoperators/homonculus/homonculus_glove.py @@ -100,6 +100,9 @@ class HomonculusGlove(Teleoperator): if not self.new_state_event.wait(timeout=2): raise TimeoutError(f"{self}: Timed out waiting for state after 2s.") + if not self.is_calibrated: + self.calibrate() + logger.info(f"{self} connected.") @property @@ -253,7 +256,7 @@ class HomonculusGlove(Teleoperator): self.new_state_event.set() except Exception as e: - logger.warning(f"Error reading frame in background thread for {self}: {e}") + logger.debug(f"Error reading frame in background thread for {self}: {e}") def get_action(self) -> dict[str, float]: joint_positions = self._read()