lerobot-teleoperate command provides a simple interface for controlling robots using teleoperation devices.
Command
src/lerobot/scripts/lerobot_teleoperate.py
Overview
The teleoperation script:- Controls robots in real-time with leader devices
- Tests robot hardware and teleoperation setup
- Visualizes robot state with Rerun
- Supports keyboard, gamepad, and leader arm control
- Useful for testing before recording datasets
Key Options
Robot Configuration
str
required
Robot type:
so100_follower, koch_follower, etc.str
required
Serial port for robot connection.
str
required
Unique identifier for robot.
dict
Camera configuration for visualization.
Teleoperation Configuration
str
required
Teleoperator type:
so100_leader, koch_leader, keyboard, gamepad, etc.str
Serial port for teleoperation device.
str
Unique identifier for teleoperator.
Control Options
int
default:"60"
Control loop frequency in Hz.
float
Duration of teleoperation session in seconds. If None, runs indefinitely.
Visualization Options
bool
default:"False"
Display robot data in Rerun viewer.
str
IP address for remote Rerun server.
int
Port for remote Rerun server.
bool
default:"False"
Compress images in Rerun for lower bandwidth.
Usage Examples
Basic Teleoperation
Teleoperation with Visualization
Bimanual Teleoperation
Keyboard Teleoperation
Gamepad Teleoperation
Timed Teleoperation Session
Remote Visualization
High Frequency Control
Workflow
- Connect Devices: Plug in robot and teleoperator
- Calibrate (if needed): Run
lerobot-calibratefirst - Start Teleoperation: Run
lerobot-teleoperate - Control Robot: Move teleoperator to control robot
- Stop: Press Ctrl+C to stop
Keyboard Controls
When using keyboard teleop:- Arrow Keys: Move in X-Y plane
- W/S: Move up/down
- Space: Toggle gripper
- Esc: Exit
Programmatic Usage
Custom Control Loop
Troubleshooting
Robot Not Responding
- Verify both devices are calibrated
- Check serial port connections
- Ensure devices are powered on
- Verify port permissions:
sudo chmod 666 /dev/ttyUSB0
Laggy Control
- Reduce
--fpsif control loop can’t keep up - Disable visualization with
--display_data=false - Check for USB bandwidth issues with multiple cameras
Misaligned Movement
- Recalibrate devices:
lerobot-calibrate - Check mechanical coupling between leader and follower
- Verify action mapping in teleoperator configuration
Tips
- Test Before Recording: Always test teleoperation before recording datasets
- Calibration: Calibrate devices regularly for best performance
- FPS: 30-60 FPS is typically sufficient for most tasks
- Visualization: Use visualization to debug behavior
- Safety: Keep emergency stop accessible
See Also
- lerobot-record - Record demonstrations
- lerobot-calibrate - Calibrate devices
- Robot API - Robot interface
- Phone Teleoperator - Teleoperation setup