Fix arm & glove

This commit is contained in:
Simon Alibert
2025-05-23 17:31:56 +02:00
parent b623a15a16
commit c94d1c5745
2 changed files with 8 additions and 2 deletions

View File

@@ -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()

View File

@@ -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()