Spaces:
Running
Running
File size: 2,860 Bytes
bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 212fd81 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 0f698f8 bdc1ac8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# lerobot
Command-line interface for robot control with [@lerobot/node](https://www.npmjs.com/package/@lerobot/node) in Node.js (see [@lerobot/web](https://www.npmjs.com/package/@lerobot/web) for the browser version).
## Quick Start
```bash
# Install globally
npm install -g lerobot
# Or use directly with npx
npx lerobot@latest --help
```
### Complete Workflow
```bash
# 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
```bash
# 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.
```bash
lerobot find-port
```
**Process:**
1. Lists current ports
2. Prompts to unplug USB cable
3. Detects which port disappeared
4. Prompts to reconnect cable
### `calibrate`
Calibrate robot motors and save calibration data.
```bash
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.
```bash
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/extend
- `a/d` - Wrist down/up
- `q/e` - Wrist roll left/right
- `o/c` - Gripper open/close
- `Arrow keys` - Shoulder lift/pan
- `Ctrl+C` - Stop and exit
### `release-motors`
Release robot motors for manual positioning.
```bash
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)
|