Skip to main content
The lerobot-calibrate command calibrates motors on robots and teleoperation devices to establish correct zero positions.

Command

Location: src/lerobot/scripts/lerobot_calibrate.py

Overview

Calibration:
  • Establishes motor zero positions
  • Corrects for mechanical offsets
  • Required for accurate robot control
  • Saves calibration data for future use
  • Should be run when hardware changes

Key Options

Robot Calibration

str
Robot type to calibrate: so100_follower, koch_follower, etc.
str
Serial port for robot connection.
str
Unique identifier for robot.

Teleoperator Calibration

str
Teleoperator type to calibrate: so100_leader, koch_leader, etc.
str
Serial port for teleoperator.
str
Unique identifier for teleoperator.

Usage Examples

Calibrate Robot

Calibrate Teleoperator

Calibrate Koch Robot

Calibrate Bimanual Arms

Calibration Process

The calibration process varies by robot type:

For SO-100 Arms

  1. Script connects to motors
  2. Prompts to move arm to calibration pose
  3. User manually positions arm
  4. Press Enter to capture calibration
  5. Calibration data saved to file

For Koch Arms

  1. Script connects to motors
  2. Motors move to home position automatically
  3. Reads and saves encoder offsets
  4. Calibration complete

Calibration Storage

Calibration files are saved to:
Example calibration file:

When to Calibrate

Calibrate your device when:
  1. First Setup: Initial hardware setup
  2. Motor Replacement: After replacing any motors
  3. Mechanical Changes: After adjusting mechanical linkages
  4. Poor Accuracy: When movements become inaccurate
  5. After Crashes: If robot experiences hard impacts
  6. Regular Maintenance: Periodically for best performance

Programmatic Usage

Manual Calibration

Load Existing Calibration

Troubleshooting

Calibration Not Saving

  • Check file permissions in calibration directory
  • Verify robot.id is set correctly
  • Ensure calibration directory exists

Robot Behavior Still Incorrect

  • Re-run calibration process
  • Check mechanical assembly
  • Verify motor connections
  • Test individual motors

Port Permission Errors

Motors Not Responding

  • Verify power connection
  • Check serial cable connection
  • Try different USB port
  • Check motor IDs are configured correctly

Best Practices

  1. Consistent Pose: Use the same calibration pose each time
  2. Stable Surface: Calibrate on a stable, level surface
  3. Regular Checks: Verify calibration before important recordings
  4. Backup Calibration: Save copies of calibration files
  5. Document Pose: Take photos of calibration pose for reference

See Also