Spaces:
Running
Running
lerobot
Command-line interface for robot control with @lerobot/node in Node.js (see @lerobot/web for the browser version).
Quick Start
# Install globally
npm install -g lerobot
# Or use directly with npx
npx lerobot@latest --help
Complete Workflow
# 1. Find your robot port
lerobot find-port
# Output: The port of this MotorsBus is '/dev/ttyUSB0'
# 2. Calibrate the robot
lerobot calibrate --robot.type=so100_follower --robot.port=/dev/ttyUSB0 --robot.id=my_arm
# 3. Control the robot
lerobot teleoperate --robot.type=so100_follower --robot.port=/dev/ttyUSB0 --robot.id=my_arm
# 4. Release motors when done
lerobot release-motors --robot.type=so100_follower --robot.port=/dev/ttyUSB0 --robot.id=my_arm
Help
# See all available commands
lerobot --help
# Get help for specific commands
lerobot calibrate --help
lerobot teleoperate --help
Commands
find-port
Interactive port discovery using cable detection.
lerobot find-port
Process:
- Lists current ports
- Prompts to unplug USB cable
- Detects which port disappeared
- Prompts to reconnect cable
calibrate
Calibrate robot motors and save calibration data.
lerobot calibrate --robot.type=so100_follower --robot.port=/dev/ttyUSB0 --robot.id=my_arm
Options:
--robot.type
- Robot type (e.g.,so100_follower
)--robot.port
- Serial port (e.g.,/dev/ttyUSB0
,COM4
)--robot.id
- Robot identifier (default:default
)--output
- Custom output path for calibration file
Storage Location:
~/.cache/huggingface/lerobot/calibration/robots/{robot_type}/{robot_id}.json
teleoperate
Control robot through keyboard input.
lerobot teleoperate --robot.type=so100_follower --robot.port=/dev/ttyUSB0 --robot.id=my_arm
Options:
--robot.type
- Robot type (e.g.,so100_follower
)--robot.port
- Serial port (e.g.,/dev/ttyUSB0
,COM4
)--robot.id
- Robot identifier (default:default
)--teleop.type
- Teleoperator type (default:keyboard
)--duration
- Duration in seconds, 0 = unlimited (default:0
)
Keyboard Controls:
w/s
- Elbow flex/extenda/d
- Wrist down/upq/e
- Wrist roll left/righto/c
- Gripper open/closeArrow keys
- Shoulder lift/panCtrl+C
- Stop and exit
release-motors
Release robot motors for manual positioning.
lerobot release-motors --robot.type=so100_follower --robot.port=/dev/ttyUSB0 --robot.id=my_arm
Options:
--robot.type
- Robot type (e.g.,so100_follower
)--robot.port
- Serial port (e.g.,/dev/ttyUSB0
,COM4
)--robot.id
- Robot identifier (default:default
)--motors
- Specific motor IDs to release (comma-separated)