From 6d42af98b6e86e4747b5fa5ca201eec4fcded85e Mon Sep 17 00:00:00 2001 From: Steven Palma Date: Mon, 17 Mar 2025 18:16:52 +0100 Subject: [PATCH] fix(motors): Allows motor to be called other than gripper --- lerobot/common/motors/feetech/feetech_calibration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lerobot/common/motors/feetech/feetech_calibration.py b/lerobot/common/motors/feetech/feetech_calibration.py index 262a5b6e..f6a91b49 100644 --- a/lerobot/common/motors/feetech/feetech_calibration.py +++ b/lerobot/common/motors/feetech/feetech_calibration.py @@ -33,7 +33,7 @@ def disable_torque(arm: MotorsBus): def get_calibration_modes(arm: MotorsBus): """Returns calibration modes for each motor (DEGREE for rotational, LINEAR for gripper).""" return [ - CalibrationMode.LINEAR.name if name == "gripper" else CalibrationMode.DEGREE.name + CalibrationMode.LINEAR.name if "gripper" in name else CalibrationMode.DEGREE.name for name in arm.motor_names ] @@ -217,7 +217,7 @@ def apply_feetech_offsets_from_calibration(motorsbus: FeetechMotorsBus, calibrat print(f"Warning: '{m_name}' not found in motorsbus.motors; skipping offset.") continue - if m_name == "gripper": + if "gripper" in m_name: old_offset = start_pos # If gripper set the offset to the start position of the gripper continue