mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-29 20:49:42 +00:00
7b78e751a6
The SO follower/leader calibration hardcoded drive_mode=0 for all motors. When the gripper motor is mounted mirrored relative to the other arm's (raw position increases when closing instead of decreasing), the 0=closed/100=open normalization convention flips: a 'closed' (0%) command from the leader unnormalizes to the follower's fully-open hard stop, slamming the gripper open and triggering the Feetech overload protection (torque off until power cycle). FeetechMotorsBus already supports per-motor inversion via drive_mode (apply_drive_mode=True); calibration just never set it. This adds a step after range recording that asks the user to fully close the gripper, reads the raw position, and sets drive_mode=1 when the closed position sits at range_max. No calibration file format change. Verified against the exact calibration values reported in #3942 using the real FeetechMotorsBus normalization: with drive_mode=0 a 0% goal maps to raw 2035 (open, bug reproduced); with drive_mode=1 it maps to raw 3528 (closed, expected). Fixes #3942