From 3bf4cfeb0c981ebc8b6bfb412c4d928bc657eed1 Mon Sep 17 00:00:00 2001 From: Martino Russi Date: Fri, 17 Jul 2026 16:35:59 +0200 Subject: [PATCH] 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 --- src/lerobot/motors/damiao/damiao.py | 3 +-- 1 file changed, 1 insertion(+), 2 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)