Tutorial 07: Complete Binding Interface Guide
Module Overview
Controller Constructors
Controller(channel="can0")
Standard SocketCAN transport.
Controller.from_socketcanfd(channel="can0")
CAN-FD transport (required for Hexfellow).
Controller.from_dm_serial(serial_port="/dev/ttyACM0", baud=921600)
Damiao serial bridge transport.
Controller Methods
Motor Registration
| Method | Vendor | Notes |
|---|---|---|
add_damiao_motor(motor_id, feedback_id, model) | Damiao | Most complete protocol |
add_robstride_motor(motor_id, feedback_id, model) | RobStride | Supports ping + param rw |
add_myactuator_motor(motor_id, feedback_id, model) | MyActuator | Vendor-specific mode constraints |
add_hightorque_motor(motor_id, feedback_id, model) | HighTorque | Native vendor semantics |
add_hexfellow_motor(motor_id, feedback_id, model) | Hexfellow | Requires CAN-FD |
Global Operations
Lifecycle
Motor Methods
Lifecycle and Safety
Mode Control
Control Commands
Feedback
Register Access
RobStride-Specific
Mode Enum
MotorState Dataclass
Error Classes
Register Utilities
RegisterSpec
DAMIAO_RW_REGISTERS
Dictionary of all Damiao read-write registers:Register ID Constants
Complete Template
Vendor Rules
| Rule | Description |
|---|---|
| Same vendor → same controller | Motors from same vendor share one Controller instance |
| Different vendor → separate controller | Each vendor family needs its own Controller |
| Hexfellow requires CAN-FD | Must use from_socketcanfd() |
| DM serial is Damiao-only | from_dm_serial() only works with Damiao motors |
Version Compatibility
| Version | Notes |
|---|---|
| v0.1.6 and earlier | Requires manual poll_feedback_once() |
| v0.1.7+ | Background polling enabled by default |
See Also
- Controller API - Detailed controller reference
- Motor API - Detailed motor reference
- CLI Reference - Command-line tools
- Best Practices - Production patterns