Channel Compatibility (PCAN + slcan + CAN-FD + Damiao Serial Bridge)
- Linux SocketCAN uses interface names directly:
can0,can1,slcan0. - For USB-serial CAN adapters, bring up
slcan0first:sudo slcand -o -c -s8 /dev/ttyUSB0 slcan0 && sudo ip link set slcan0 up. - CAN-FD transport is available both in CLI (
--transport socketcanfd) and C++ SDK (Controller::from_socketcanfd(...)), and is required for Hexfellow. - 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(section3.6inmotor_cli/README.zh-CN.md). - On Linux SocketCAN, do not append bitrate in
--channel(for examplecan0@1000000is invalid). - On Windows (PCAN backend),
can0/can1map toPCAN_USBBUS1/2; optional@bitratesuffix is supported.
motor_abi.
Chinese version: README.zh-CN.md
ABI Metadata Helpers
motorbridge::abi_version()returns the loaded ABI library version.motorbridge::abi_capabilities_json()returns the loaded ABI capability JSON.- Binding parity is tracked in
bindings/api_surface.json.
Damiao Set-Zero Rule (dm-serial)
- For Damiao, call
disable()beforeset_zero_position(). - Core guard rejects
set_zero_position()when motor is not disabled. - Core applies an internal fixed settle (
~20ms) afterset_zero_position(). - C++/ABI signatures are unchanged; this is behavior guard in core.
Controller Entrypoints
Controller(channel)(SocketCAN/PCAN path)Controller::from_socketcanfd(channel)(CAN-FD path, required by Hexfellow)Controller::from_dm_serial(serial_port, baud)(Damiao-only serial bridge)add_damiao_motor(motor_id, feedback_id, model)add_hexfellow_motor(motor_id, feedback_id, model)add_myactuator_motor(motor_id, feedback_id, model)add_robstride_motor(motor_id, feedback_id, model)add_hightorque_motor(motor_id, feedback_id, model)
Quick Start
Damiao:rs-00 through rs-06. The C++ wrapper keeps one add_robstride_motor(...) shape, but parameter read/write is backed by the common section 4 runtime table.
RobStride-specific wrapper helpers include:
robstride_ping()robstride_ping_host_id(host_id, timeout_ms)robstride_get_param_f32_host_id(param_id, host_id, timeout_ms)robstride_get_fault_report()robstride_set_device_id(new_device_id)robstride_set_active_report(enabled)robstride_get_param_i8/u8/u16/u32/f32(param_id, timeout_ms)robstride_write_param_i8/u8/u16/u32/f32(param_id, value)
Example Programs
examples/cpp_wrapper_demo.cppexamples/hexfellow_canfd_demo.cpp(Hexfellow, CAN-FD, MIT / POS_VEL only)examples/robstride_wrapper_demo.cppexamples/full_modes_demo.cppexamples/pid_register_tune_demo.cppexamples/scan_ids_demo.cpp(Damiao legacy helper)examples/pos_ctrl_demo.cppexamples/pos_repl_demo.cpp
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@1000000for channel/bitrate in Windows CLI validation.