Skip to main content

Channel Compatibility (PCAN + slcan + Damiao Serial Bridge)

  • Linux SocketCAN uses interface names directly: can0, can1, slcan0.
  • For USB-serial CAN adapters, bring up slcan0 first: sudo slcand -o -c -s8 /dev/ttyUSB0 slcan0 && sudo ip link set slcan0 up.
  • Damiao-only serial bridge transport is also available in CLI (--transport dm-serial --serial-port /dev/ttyACM0 --serial-baud 921600).
  • Full Damiao serial-bridge interface list and command patterns are documented in motor_cli/README.md (section 3.6 in motor_cli/README.zh-CN.md).
  • On Linux SocketCAN, do not append bitrate in --channel (for example can0@1000000 is invalid).
  • On Windows (PCAN backend), can0/can1 map to PCAN_USBBUS1/2; optional @bitrate suffix is supported.
Cross-language example entry for the current motorbridge stack.
Chinese version: README.zh-CN.md

Coverage

  • Rust CLI: motor_cli/src/main.rs
  • C ABI demo: examples/c/c_abi_demo.c
  • C++ ABI demo: examples/cpp/cpp_abi_demo.cpp
  • Python ctypes demo: examples/python/python_ctypes_demo.py
  • Multi-vendor position sync script: examples/python/four_vendor_pos_sync.py
  • WS quad sync HMI: examples/web/ws_quad_sync_hmi.html
  • WS quad independent-slider HMI: examples/http_quad_control_demo/README.zh-CN.md
  • Python SDK demos: bindings/python/examples/*
  • C++ wrapper demos: bindings/cpp/examples/*
  • Damiao tuning reference:
    • ../motor_cli/DAMIAO_API.md
    • ../motor_cli/DAMIAO_API.zh-CN.md
  • RobStride API/parameter reference:
    • ../motor_cli/ROBSTRIDE_API.md
    • ../motor_cli/ROBSTRIDE_API.zh-CN.md
  • MyActuator command/mode reference:
    • ../motor_cli/MYACTUATOR_API.md
    • ../motor_cli/MYACTUATOR_API.zh-CN.md

Vendor Support in Examples

  • Damiao:
    • modes: enable, disable, mit, pos-vel, vel, force-pos
    • register / ID workflows remain available through CLI, Python SDK, and calibration tools
  • RobStride:
    • modes: ping, enable, disable, mit, vel, read-param, write-param
    • parameter examples use the RobStride ABI and binding helpers
  • MyActuator:
    • modes: scan, enable, disable, stop, status, current, vel, pos, version, mode-query
    • CLI input uses radians/rad-s for pos/vel (motor_cli converts to protocol degrees internally)

CAN Setup

Experimental Windows Support (PCAN-USB)

Linux remains the primary target. Windows support is experimental and currently uses PEAK PCAN.
  • Install PEAK PCAN driver + PCAN-Basic runtime (PCANBasic.dll).
  • Use can0@1000000 as the Windows channel form.
Windows quick validation commands:

Quick Start

Damiao with Rust CLI:
RobStride with Rust CLI:
RobStride parameter read:
For RobStride examples, rs-06 is only a sample model. Use the RS model you use for limits/logging. High-level control commands keep the same shape, and parameter read/write uses the common RobStride section 4 runtime table. MyActuator with Rust CLI:

Cross-language ABI Demos

Python ctypes:
C:
C++:
  • Python SDK:
    • bindings/python/examples/python_wrapper_demo.py
    • bindings/python/examples/robstride_wrapper_demo.py
  • C++ wrapper:
    • bindings/cpp/examples/cpp_wrapper_demo.cpp
    • bindings/cpp/examples/robstride_wrapper_demo.cpp

Validation Checklist (suggested order)

  1. Scan all vendors on the same bus.
  2. Verify Damiao control path (MIT or velocity).
  3. Verify RobStride control path (ping/read-param/velocity).
  4. Verify MyActuator control path (position or velocity).
  5. Verify Python binding demos (Damiao + RobStride).
  6. Verify C++ binding demos (Damiao + RobStride).
Quick commands:

Notes

  • id-dump is a Damiao-oriented workflow; id-set supports Damiao and RobStride device ID updates. Unified scan is available in Rust CLI (--vendor all) and Python SDK CLI (motorbridge.cli scan --vendor all).
  • RobStride examples focus on ping, parameter access, MIT, and velocity control.