diff --git a/lerobot/common/teleoperators/homonculus/homonculus_arm.py b/lerobot/common/teleoperators/homonculus/homonculus_arm.py index 0d4571f2..b4fc37e8 100644 --- a/lerobot/common/teleoperators/homonculus/homonculus_arm.py +++ b/lerobot/common/teleoperators/homonculus/homonculus_arm.py @@ -64,10 +64,10 @@ class HomonculusArm(Teleoperator): self.joints_buffer = {joint: deque(maxlen=self.buffer_size) for joint in self.joints} # Last read dictionary - self.last_d = {joint: 100 for joint in self.joints} + self.last_d = dict.fromkeys(self.joints, 100) # For adaptive EMA, we store a "previous smoothed" state per joint - self.adaptive_ema_state = {joint: None for joint in self.joints} + self.adaptive_ema_state = dict.fromkeys(self.joints) self.kalman_state = {joint: {"x": None, "P": None} for joint in self.joints} self.calibration = None diff --git a/lerobot/common/teleoperators/homonculus/homonculus_glove.py b/lerobot/common/teleoperators/homonculus/homonculus_glove.py index 2ba2f712..fb78fb61 100644 --- a/lerobot/common/teleoperators/homonculus/homonculus_glove.py +++ b/lerobot/common/teleoperators/homonculus/homonculus_glove.py @@ -73,7 +73,7 @@ class HomonculusGlove(Teleoperator): # Initialize a buffer (deque) for each joint self.joints_buffer = {joint: deque(maxlen=self.buffer_size) for joint in self.joints} # Last read dictionary - self.last_d = {joint: 100 for joint in self.joints} + self.last_d = dict.fromkeys(self.joints, 100) self.calibration = None self.thread = threading.Thread(target=self.async_read, daemon=True)