go2-motor-sdk
kily-smith
An RS-485 control SDK in C++, Python, and C99 for driving salvaged Unitree Go2 joint motors.
What is kily-smith/go2-motor-sdk?
This SDK enables direct RS-485 serial control of salvaged Unitree Go2 joint actuators from Linux hosts or embedded microcontrollers. It bundles serial communication, protocol encoding and decoding, and pybind11 Python bindings in a self-contained directory that can be built independently or embedded into other CMake projects.
Communication runs at 4 Mbps with 8N1 framing using 17-byte control frames, 16-byte feedback frames, a nominal 6.33 gear ratio, and CRC16 checksums. On the host, Python and C++ programs can issue Field Oriented Control commands across position, velocity, damping, torque, zero-torque, and hybrid modes, as well as explicit brake commands before closing the port. For microcontrollers, a standalone C99 protocol layer and STM32F103 HAL integration are included.
On Ubuntu, building requires CMake, a C/C++ compiler, Python development headers, and pybind11, with a virtual-serial test script available to verify the build without physical motor hardware.
Before you startThe README says
- Runs on
- Ubuntu Linux and STM32F103 microcontrollers (or other boards via C99 layer)
- Needs
- CMake, C/C++ compiler, python3-dev, pybind11-dev; RS-485 adapter and Go2 motor for hardware
- How you get it
- Clone repository and build from source with CMake or include C99 files
- Not yet
- Supports bus IDs 0 through 14; joint mechanical limits must be enforced by upper layers
- README language
- Chinese
Facts from GitHub (updated Dec 1, 2026) and the project's README. License summaries are simplified: check the license file. RepoRanking reviews listings for relevance and spam, and doesn't test or vouch for code.