feat(calibration): add automatic calibration for SO101 leadera and follower w/ Feetech STS servos#3282
Open
IsaacSinn wants to merge 1 commit intohuggingface:mainfrom
Open
Conversation
Adds a fully automated calibration script for SO-101 arms with Feetech STS3215 servos. The script drives each joint to its mechanical limits at low torque to find the full range of motion — no manual movement required. New files: - auto_calibration.py: FeetechCalibrationMixin with stall detection, range measurement, and WritePosEx utilities - calibration_defaults.py: shared constants and default parameters - lerobot_auto_calibrate_feetech.py: CLI script with 5-stage workflow (init, unfold, calibrate joints 2-6, calibrate joint 1, persist) CLI: lerobot-auto-calibrate-feetech --port /dev/ttyUSB0 --save
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type / Scope
Summary / Motivation
Adds a fully automated calibration CLI (
lerobot-auto-calibrate-feetech) for SO-101 follower arms with Feetech STS3215 servos. The script drives each joint to its mechanical limits at low torque to measure the full range of motion no manual movement required.Manual calibration requires the user to physically move each joint through its full range while following prompts. This is error-prone (inconsistent ranges, missed limits) and tedious, especially when calibrating multiple arms. Auto-calibration produces consistent, repeatable results with a single command.
Related issues
What changed
src/lerobot/motors/feetech/auto_calibration.py(new):FeetechCalibrationMixinwith stall detection, mechanical range measurement, and WritePosEx utilitiessrc/lerobot/motors/feetech/calibration_defaults.py(new): shared constants and default calibration parameterssrc/lerobot/motors/feetech/feetech.py: addedFeetechCalibrationMixintoFeetechMotorsBusclass inheritancesrc/lerobot/scripts/lerobot_auto_calibrate_feetech.py(new): CLI entry point with 5-stage calibration workflow (init → unfold → calibrate joints 2–6 → calibrate joint 1 → persist)pyproject.toml: addedlerobot-auto-calibrate-feetechconsole script entry pointdocs/source/so101.mdx: added Auto Calibrate documentation section with usage and arguments tableHow was this tested (or how to run locally)
Tested on a physical SO-101 follower arm (macOS, ubuntu 22 24, Python 3.12)
Calibration output saved to
~/.cache/huggingface/lerobot/calibration/robots/so_follower/default.json— same format aslerobot-calibrateReproduce with:
Checklist (required before merge)
Reviewer notes