Tutorial 01: Scan and Identify Motors
Prerequisites
- motorbridge installed
- CAN interface configured and up
- Motors powered on
Why Scan First?
Scanning is essential because it:- Confirms wiring - Verifies physical connections are correct
- Validates bitrate - Ensures CAN baud rate matches motor settings
- Discovers IDs - Finds motor_id and feedback_id pairs needed for control
- Detects conflicts - Identifies duplicate IDs that could cause communication issues
Quick Scan with CLI
The fastest way to discover motors:Expected Output
Vendor-Specific Scanning
Damiao Motors
- Probes each motor_id from start to end
- Calculates feedback_id = feedback_base + (motor_id & 0x0F)
- Reads ESC_ID (rid=8) and MST_ID (rid=7) to confirm identity
RobStride Motors
- RobStride uses different feedback IDs
- Tries multiple feedback_ids per motor_id
- Uses ping command and parameter read as probes
MyActuator Motors
- MyActuator uses feedback_id = 0x240 + motor_id
- Requests feedback and waits for response
- Limited to IDs 1-32
HighTorque Motors
Scanning via Serial Bridge
For Damiao motors using USB-CAN adapter:Programmatic Scanning
You can also scan from Python:Understanding Scan Results
Damiao Format
| Field | Meaning | Use in add_damiao_motor() |
|---|---|---|
| probe | CAN ID probed | — |
| esc_id | Motor ID register value | motor_id parameter |
| mst_id | Feedback ID register value | feedback_id parameter |
MyActuator Format
| Field | Meaning |
|---|---|
| probe | Motor ID (1-32) |
| feedback_id | Expected feedback CAN ID |
| temp | MOSFET temperature |
| vel | Current velocity |
| angle | Current position |
RobStride Format
| Field | Meaning |
|---|---|
| probe | Device ID probed |
| via | Discovery method (ping or read-param) |
| feedback_id | Feedback ID that worked |
| device_id | Device ID from ping response |
| responder_id | Responder ID from ping response |
Troubleshooting
No Motors Found
-
Check CAN interface
-
Check wiring
- CAN_H and CAN_L connected correctly
- Termination resistors (120Ω) at bus ends
- Motor powered on
-
Check bitrate
-
Try wider ID range
Timeout Errors
Increase scan timeout:Multiple Motors Same ID
If scan shows multiple motors with same ID:Recording Motor Configuration
After scanning, record the discovered configuration:Next Steps
- Tutorial 02: Enable and Status - Enable motors and read feedback
- CLI Reference - Full CLI documentation
- Controller API - Python API reference