What is MotorBridge?
v0.5.0 Rust Core Python Binding MotorBridge is a unified motor control stack with pluggable vendor drivers and a C ABI for cross-language integration.The Problem We Solve
Every motor vendor has a different protocol:Without MotorBridge, you need to:
- Learn 5+ different protocols
- Maintain separate codebases per vendor
- Rewrite control logic when switching motors
- Build your own debugging tools
MotorBridge Architecture
The diagram above is the readable system map. The text diagram below is kept as a compact terminal-friendly reference.
Project Structure
Why “Python Binding” Not “SDK”?
What is a Binding?
What is a Binding?
A binding is a thin wrapper that exposes a native library to another language via FFI (Foreign Function Interface).Key characteristics:
- Logic lives in Rust, not Python
- Python is a 1:1 mapping to C ABI functions
- No duplicate implementation
- Minimal overhead (direct FFI calls)
How the ABI Works
How the ABI Works
The Python loads it via This is zero-copy for primitive types - floats and ints pass directly between Python and Rust.
motor_abi crate compiles to a shared library:ctypes:SDK vs Binding Comparison
SDK vs Binding Comparison
MotorBridge is a Binding because:
- The “SDK” is the Rust core (
motor_core+ vendor drivers) - Python is just one interface to that core
- Future: C++, ROS2 nodes will use the same ABI
Why Rust for the Core?
Core Components
Controller
Manages CAN interface and motor lifecycle:Motor
Handle to a single physical motor:Mode
Control mode determines how the motor responds:MotorState
Real-time feedback structure:Transport Options
CLI Tools
The project includes command-line utilities:Integrations
WebSocket Gateway
Control motors over WebSocket (useful for browser/remote apps):Motor Calibration
Tool for motor calibration routines:Comparison with Alternatives
Quick Start
1
Install Python Package
2
Configure CAN Interface
3
Run Your First Program
What Can You Build?
Next Steps
Quick Start Guide
Get your first motor running in 5 minutes
API Reference
Complete API documentation
Tutorials
Step-by-step practical guides
Best Practices
Production-ready patterns