Documentation Index
Fetch the complete documentation index at: https://motorbridge.seeedstudio.com/llms.txt
Use this file to discover all available pages before exploring further.
Source:
motor_cli/ROBSTRIDE_API.mdRobStride API and Parameter Reference (Complete)
Channel Compatibility (PCAN + slcan + 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. - Damiao-only serial bridge transport is also available in CLI (
--transport dm-serial --serial-port /dev/ttyACM0 --serial-baud 921600). - 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.
motorbridge.
Chinese version: ROBSTRIDE_API.zh-CN.md
1) Common Device Parameters
| Parameter | Meaning | Typical value |
|---|---|---|
channel | CAN interface name | can0 |
model | RobStride model string; is used for limits and logging | rs-00 … rs-06 |
motor-id | Device ID | e.g. 127 |
feedback-id | Host/feedback ID used in command frame | usually 0xFD |
loop | Send cycles for periodic control | 20~100 |
dt-ms | Send interval per cycle | 20~50 |
rs-00, rs-01, rs-02, rs-03, rs-04, rs-05, and rs-06.
High-level control commands keep the same shape across these models. Runtime read-param and write-param use the common protocol section 4 table (0x7005..0x702E); keep --model set to the physical RS model for limits and logging.
The runtime parameter table is aligned with the RobStride manual section 4 “read/write single parameter” list.
2) motor_cli RobStride Modes
Supported now:
pingscanenabledisablemitpos-velvelread-paramwrite-param
| Unified capability | RobStride status | Notes |
|---|---|---|
MIT | supported | native operation-control frame |
POS_VEL | supported | mapped to run_mode=1 + 0x7017/0x7016 |
VEL | supported | mapped to run_mode=2 + 0x700A |
TORQUE/CURRENT | parameter-level only | no first-class high-level mode yet; use write-param (iq_ref, limits) |
2.1 Ping
2.2 MIT
- Effective inputs:
--pos,--vel,--kp,--kd,--tau(all are used). - Units:
--pos:rad--vel:rad/s--tau:Nm--kp,--kd: MIT loop gains
2.3 Position (unified pos-vel mapping)
- Unified
pos-velmaps to native RobStride Position path:run_mode=1(Position)- write
0x7017(limit_spd) from--vlim - optional write
0x701E(loc_kp) from--loc-kpor--kp - write
0x7016(loc_ref) from--pos
--vel,--kd, and--taudo not belong to native Position mode and are ignored in--mode pos-vel.
2.4 Velocity
2.5 Two Usage Paths (Unified Wrapper / Native Params)
- Unified wrapper path (recommended for app-layer control):
--mode mit--mode pos-vel(already mapped to native Position)--mode vel
- Native path (debug/protocol-level verification):
--mode read-param --param-id ...--mode write-param --param-id ... --param-value ...- Typical sequence: write
run_mode(0x7005)first, then write target params (loc_ref/spd_ref, etc.)
3) Scan and ID Update
3.1 Scan
- Fast pass: ping + query-parameter probe.
probe/device_idis the motor ID.feedback_id/host_id(for example0xFD) is the host-side ID, not the motor ID.--feedback-idsis a comma-separated list of host IDs to try during scan.- RobStride
motor_id/device_idmust be1..255;feedback_id/host_idmust be0..255. - During scan, each listed
--feedback-idsentry is probed exactly; invalid host IDs are rejected instead of silently falling back. - If no ping replies in full range, CLI auto-falls back to blind pulse probing:
--manual-vel(default0.2)--manual-ms(default200)--manual-gap-ms(default200)
3.2 Update Device ID
- Set-ID frame uses
comm_type=7. - This changes the RobStride
device_idonly; it does not changefeedback_id/host_id. --set-motor-id/--new-motor-idis validated as1..255; out-of-range values are rejected instead of being truncated.- Extended ID format in this command path is:
0x07 [new_id] [host_id] [old_id]- example (
old_id=1,new_id=11,host_id=0xFD):0x070BFD01
- Data payload uses the latest ping UUID token when available (fallback to zeros if ping token is unavailable).
4) Frequently Used Parameter IDs
| Param ID | Name | Type | Meaning |
|---|---|---|---|
0x7005 | run_mode | i8 | control mode selector |
0x700A | spd_ref | f32 | target velocity |
0x7019 | mechPos | f32 | mechanical position |
0x701B | mechVel | f32 | mechanical velocity |
0x701C | VBUS | f32 | bus voltage |
5) Parameter Read/Write
Parameter access is section-4-runtime. For common runtime control parameters in the0x7000 range, the unified control paths share the same IDs. For manual function-code parameters from the RobStride manuals, especially the 0x2000 and 0x3000 ranges, each RS model may define different names, data types, or valid ranges at the same ID.
Read parameter:
6) Protocol Communication Coverage
motorbridge currently exposes or uses these RobStride protocol communication types:
- In use directly:
0(GET_DEVICE_ID),1(OPERATION_CONTROL),3(ENABLE),4(DISABLE),6(SET_ZERO_POSITION),7(SET_DEVICE_ID),17(READ_PARAMETER),18(WRITE_PARAMETER),22(SAVE_PARAMETERS) - Receive/parse path:
2(OPERATION_STATUS),21(FAULT_REPORT) - Present in protocol constants but not yet first-class high-level APIs:
23(SET_BAUDRATE),24(ACTIVE_REPORT),25(SET_PROTOCOL)
7) Gap Summary and Next Improvements
Current status: core control is production-usable (scan/ping/mit/pos-vel/vel/read/write/set-id/set-zero/store).
Known issues (observed in field tests):
pos-velparameter effectiveness can be inconsistent on some firmware:--vlim(0x7017) and--kp/loc_kp(0x701E) may read back as written but show weak/no visible effect.MITpath is currently more reliable.
- RobStride zeroing now keeps the unified user-facing command and writes
zero_sta(0x7029)=1internally:- use the normal
zero/set_zero_position()path; - use
store_parameters/--store 1when the-pi..pistartup range must survive power cycles.
- use the normal
- Add semantic CLI mode for current/torque control (today still done via write-param, less ergonomic).
- Add multi feedback-host candidate support in scan CLI.
- Expose high-level APIs for
SET_BAUDRATE / ACTIVE_REPORT / SET_PROTOCOL. - Decode and present
FAULT_REPORTin dedicated structured output.
8) WS Gateway JSON Examples
9) Safety Notes
- Start with small velocity and short loop count.
- Confirm CAN wiring/termination and interface state before stress tests.
- Prefer ping/read-param verification before long periodic control.
- Keep emergency stop path available.