FeetechMotorsBus class. Feetech motors are affordable smart servos commonly used in robotics projects, offering position control, velocity feedback, and temperature monitoring.
Overview
Feetech motors communicate via a serial protocol similar to Dynamixel, supporting both Protocol 0 and Protocol 1. LeRobot handles motor communication, calibration, and control through a unified interface. Supported Features:- Position, velocity, and torque control
- Real-time position and velocity feedback
- Temperature monitoring
- Motor calibration and homing
- Synchronized read/write for multi-motor control
- Drive mode configuration (forward/inverted)
Supported Models
LeRobot supports various Feetech motor series including:- SCS series (SCS15, SCS215, etc.)
- STS series (STS3215, STS3032, etc.)
- SMS series
/home/daytona/workspace/source/src/lerobot/motors/feetech/tables.py
Installation
Hardware Requirements
- Feetech servo motors
- USB-to-TTL adapter or Feetech serial interface board
- Power supply (voltage depends on motor model, typically 6-12V)
Software Dependencies
Install the SCServo SDK:Configuration
Motor Configuration
Define your motors in a configuration dictionary:Protocol Versions
- Protocol 0: Older Feetech motors (SCS series)
- Protocol 1: Newer Feetech motors (STS series, SMS series)
Basic Usage
Connecting to Motors
/home/daytona/workspace/source/src/lerobot/motors/feetech/feetech.py:221
Reading Motor State
Writing Motor Commands
Torque Control
Disconnecting
Motor Calibration
Overview
Calibration establishes the mapping between motor positions and robot joint angles. LeRobot uses three calibration parameters per motor:- Homing Offset: Position offset from motor zero to robot zero
- Range Min: Minimum allowed position (in motor units)
- Range Max: Maximum allowed position (in motor units)
/home/daytona/workspace/source/src/lerobot/motors/feetech/feetech.py:251
Automatic Calibration
LeRobot provides helper methods for calibration:Manual Calibration
You can also create calibration data manually:Reading Calibration
Advanced Usage
Operating Modes
Feetech motors support multiple operating modes (from/home/daytona/workspace/source/src/lerobot/motors/feetech/feetech.py:44):
Drive Mode (Direction Inversion)
Invert motor direction if needed:Baudrate Configuration
PID Tuning
Speed and Acceleration Limits
Finding and Auto-Discovering Motors
Find Single Motor
If you don’t know a motor’s ID or baudrate:/home/daytona/workspace/source/src/lerobot/motors/feetech/feetech.py:169
Broadcast Ping (Protocol 0 Only)
Discover all motors on the bus:/home/daytona/workspace/source/src/lerobot/motors/feetech/feetech.py:405
Troubleshooting
Connection Issues
“Motor not found” error:- Check power supply is connected and adequate for your motors
- Verify serial port name (
ls /dev/ttyUSB*on Linux) - Try different baudrates (common: 1000000, 115200, 57600)
- Check wiring: TX->RX, RX->TX (may need level shifter)
- Ensure only one motor is connected when using
_find_single_motor()
- Update all motors to the same firmware version
- Use Feetech’s official software: https://www.feetechrc.com/software
/home/daytona/workspace/source/src/lerobot/motors/feetech/feetech.py:155
Permission denied on Linux:
Motor Behavior Issues
Motor doesn’t move:- Check torque is enabled:
motor_bus.enable_torque("motor_name") - Verify position limits allow movement
- Check motor is not overheated (read temperature)
- Ensure adequate power supply voltage and current
- Reduce acceleration settings
- Tune PID parameters
- Check for mechanical binding
- Verify power supply is stable (no voltage drops)
- Recalibrate motor
- Check for mechanical backlash
- Tune PID gains
- Verify temperature is within normal range
Communication Issues
Slow read/write operations:- Decrease
return_delay_time(seeconfigure_motors()) - Use synchronized operations (
sync_read,sync_write) for multiple motors - Increase baudrate if supported
- Check wiring quality
- Reduce cable length
- Try lower baudrate
- Add termination resistors for long cables
Firmware Updates
To update Feetech motor firmware:- Download Feetech’s official software from https://www.feetechrc.com/software
- Download latest firmware for your motor model
- Connect motor individually to PC
- Follow software instructions to flash firmware
- Verify new firmware version:
Best Practices
- Always configure motors after connecting using
configure_motors()to minimize delays - Use sync operations for multi-motor control to improve performance
- Enable torque only when needed to reduce heat and power consumption
- Monitor temperature during extended operation
- Calibrate regularly if motors are mechanically adjusted
- Set appropriate position limits to prevent mechanical damage
- Use retries for critical operations in noisy environments:
num_retry=3
Example: Complete Robot Arm Control
References
- Source code:
/home/daytona/workspace/source/src/lerobot/motors/feetech/feetech.py:1 - Control tables:
/home/daytona/workspace/source/src/lerobot/motors/feetech/tables.py - Feetech Official Website
- SCServo SDK