From a993af9c51d22487f6651779a2b954eaa4e853a2 Mon Sep 17 00:00:00 2001 From: Martino Russi <77496684+nepyope@users.noreply.github.com> Date: Thu, 23 Jul 2026 18:34:13 +0200 Subject: [PATCH] fix(openarms): stop set_zero_position()ing on connect (#4058) * fix(damiao): make is_calibrated a plain property, not cached `is_calibrated` was a `@cached_property`, so it froze at its first-read value and never reflected later changes to `self.calibration` (set by connect/calibrate/load). This caused the OpenArm teleop to re-run calibration even when a calibration file existed, and to skip `set_zero_position()` after a fresh calibration. Switch to `@property` (matching the MotorsBus base contract and the Feetech/SO-100 buses) and drop the now-unused `functools.cached_property` import. Co-authored-by: Cursor * don't set_zero_position() on connect --------- Co-authored-by: Cursor --- src/lerobot/motors/damiao/damiao.py | 3 +-- src/lerobot/robots/openarm_follower/openarm_follower.py | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lerobot/motors/damiao/damiao.py b/src/lerobot/motors/damiao/damiao.py index 572741cb4..afbec85d3 100644 --- a/src/lerobot/motors/damiao/damiao.py +++ b/src/lerobot/motors/damiao/damiao.py @@ -20,7 +20,6 @@ import logging import time from contextlib import contextmanager from copy import deepcopy -from functools import cached_property from typing import TYPE_CHECKING, Any, TypedDict from lerobot.utils.decorators import check_if_already_connected, check_if_not_connected @@ -854,7 +853,7 @@ class DamiaoMotorsBus(MotorsBusBase): else: raise ValueError(f"Motor {motor_obj} doesn't have a valid recv_id (None).") - @cached_property + @property def is_calibrated(self) -> bool: """Check if motors are calibrated.""" return bool(self.calibration) diff --git a/src/lerobot/robots/openarm_follower/openarm_follower.py b/src/lerobot/robots/openarm_follower/openarm_follower.py index e2c7c8cf5..5f2286eb4 100644 --- a/src/lerobot/robots/openarm_follower/openarm_follower.py +++ b/src/lerobot/robots/openarm_follower/openarm_follower.py @@ -150,9 +150,6 @@ class OpenArmFollower(Robot): self.configure() - if self.is_calibrated: - self.bus.set_zero_position() - self.bus.enable_torque() logger.info(f"{self} connected.")