How martin-axt/lerobot_cpp works
lerobot_cpp is a Linux C++ SDK for controlling SO-100/101 robots and Feetech STS3215 servos. The principal workflow is to command the SO101 in physical units; it clamps and converts joint values, then uses the servo application layer to issue motor operations through the Feetech protocol and Linux serial transport. The README also documents home, wave, and recording examples. Unsampled implementation details are represented only where documented; optional or otherwise unverified wiring is omitted.
Main entry points: SO101.cpp SO101 controller · STS3215.cpp STS3215 control · SCS.cpp SCS protocol · SCSerial.cpp Linux serial I/O
Components 12
Robot control
- SO101 controller
src/robots/SO101.cpp - Unit conversion
src/robots/RobotUtils.cpp
Servo application
- STS3215 control
src/STS3215.cpp - Sync write buffer
include/lerobot_cpp/SyncWriteBuffer.h - Servo errors
include/lerobot_cpp/ServoErrors.h
Communication
- SCS protocol
src/SCS.cpp - Linux serial I/O
src/SCSerial.cpp
Robot examples
- SO101 home
examples/robots/SO101_Home.cpp - SO101 wave
examples/robots/SO101_Wave.cpp - SO101 record
examples/robots/SO101_Record.cpp
Other components
- Robot operator
- STS3215 servos
Connections 10
- Robot operator → SO101 controller: commands joints
README.md - SO101 controller → Unit conversion: converts units
src/robots/SO101.cpp - SO101 controller → STS3215 control: issues servo commands
src/robots/SO101.cpp - STS3215 control → Sync write buffer: builds sync writes
src/STS3215.cpp - STS3215 control → SCS protocol: uses protocol
- SCS protocol → Linux serial I/O: dispatches I/O
src/SCSerial.cpp - Linux serial I/O → STS3215 servos: transfers serial data
src/SCSerial.cpp - Robot operator → SO101 home: runs example
README.md - Robot operator → SO101 wave: runs example
README.md - Robot operator → SO101 record: runs example
README.md