Python Binding Quickstart (pip-first)
This is a beginner-first quickstart for users who install from pip. Goal: install package → run scan → run a motor example in minutes.1) Install
2) Hardware and Channel
- Linux SocketCAN channel examples:
can0,can1,slcan0 - Windows PCAN channel examples:
can0@1000000,can1@1000000 - Ensure only one sender is writing to the bus while testing.
Channel compatibility details: See shared/channel-compat.md
Which transport should I use?
TRANSPORT = "auto"or"socketcan": use normal CAN path (CHANNELis used).TRANSPORT = "dm-serial": use Damiao serial bridge (SERIAL_PORT/SERIAL_BAUDare used), Damiao only.
3) Quick Commands (no source checkout required)
4) Config constants (simple meaning)
TRANSPORT:auto/socketcan/dm-serialCHANNEL: CAN interface name (can0,slcan0,can0@1000000, …)VENDOR: scan target vendor (allis most common)MOTOR_ID/FEEDBACK_ID: motor command/feedback IDsMODEL: motor model stringTARGET_POS/POS: target position in radiansV_LIMIT: velocity limit for position modeLOOP: send loop countDT_MS: control period in msSERIAL_PORT/SERIAL_BAUD: used only fordm-serial
5) Course Series (workflow-first)
If you want a strict real-world workflow course, usecourses/:
| Course | Topic |
|---|---|
| 00-enable-and-status | Enable + status query |
| 01-scan | Scan devices |
| 02-register-rw | Register read/write |
| 03-mode-switch-method | Mode switching |
| 04-mode-mit | MIT mode |
| 05-mode-pos-vel | POS_VEL mode |
| 06-mode-vel | VEL mode |
| 07-mode-force-pos | FORCE_POS mode |
| 08-mode-mixed-switch | Mixed mode switching |
| 09-multi-motor | Multi-motor control |
6) Common Issues
os error 105: bus TX is too fast or another process is sending; increase--dt-msto 30/50.- no motor response: verify CAN wiring, bitrate, motor/feedback IDs.
slcanusers: bring upslcan0before running examples.
7) poll_feedback_once() version note
<= v0.1.6: keep manualpoll_feedback_once()in status-query scripts.v0.1.7+: background polling is enabled by default, so manual poll is usually optional.- Course scripts keep
poll_feedback_once()for backward-compatible teaching style.
8) What to read next
- Python API overview: sdk/python/reference.md
- CLI full docs: cli/reference.md
- Architecture: architecture/overview.md