motor_cli binary.
- Crate:
motor_cli - Recommended (release package):
./bin/motor_cli [ARGS...] - Optional (source build):
./target/release/motor_cli [ARGS...]
Release-first Usage
Download and extract the release package (GitHub Releases asset likemotor-cli-vX.Y.Z-linux-x86_64.tar.gz), then run directly:
motor_cli as a plain command:
Additional Damiao Command/Register Reference
- Detailed Damiao command + register tuning doc (English):
DAMIAO_API.md - Chinese version (command/register reference):
DAMIAO_API.zh-CN.md
Additional RobStride Command/Parameter Reference
- Detailed RobStride command + parameter guide (English):
ROBSTRIDE_API.md - Chinese version (parameter/capability reference):
ROBSTRIDE_API.zh-CN.md
Additional MyActuator Command/Mode Reference
- Detailed MyActuator command + mode guide (English):
MYACTUATOR_API.md - Chinese version (command/mode reference):
MYACTUATOR_API.zh-CN.md
HighTorque Notes
- Protocol analysis (Chinese):
../docs/zh/hightorque_protocol_analysis.md - Current
vendor=hightorqueis a native ht_can v1.5.5 direct-CAN mode, not the official serial-CANboard transport.
CAN Debugging Entry
- Professional Linux
slcan+ Windowspcantroubleshooting:../docs/en/can_debugging.md - Chinese troubleshooting guide:
../docs/zh/can_debugging.md
Transport Legend
[STD-CAN]=>--transport auto|socketcan[CAN-FD]=>--transport socketcanfd(Linux-only; required by Hexfellow)[DM-SERIAL]=>--transport dm-serial(Damiao-only)
- Hexfellow: validated on
socketcanfdwith unifiedmit/pos-vel. - HighTorque: validated on standard CAN with unified
mit/vel(kp/kdignored by protocol). - Damiao: baseline implementation for unified
mit/pos-vel/vel/force-pos.
Validated Capability Matrix (Damiao + RobStride, 2026-04)
Notes:
- RobStride default
--feedback-idis0xFD; scan defaults to--feedback-ids 0xFD,0xFF,0xFE,0x00,0xAA. - RobStride
feedback_id/host_idis not the motordevice_id; scan reports the motor ID asprobe/device_id. - RobStride
--modelis still passed for limits and logging, while current parameter read/write uses the common section 4 runtime table. - RobStride
pos-velignores--vel/--kd/--tauby design (warning only, no hard error).
1. Argument Parsing Rules
- Only
--key valuestyle options are parsed. - A bare mode word, for example
motor_cli scan --vendor robstride ..., is accepted as shorthand for--mode scan. - A standalone flag (for example
--help) is treated as value1. - Numeric IDs accept decimal (
20) and hex (0x14). - Unknown keys are parsed but ignored unless used by code paths.
2. Top-Level Arguments (All Vendors)
2.1 Channel Quick Reference (--channel)
- Linux SocketCAN:
- Use interface names directly:
can0,can1,slcan0. - Configure bitrate at interface setup time (
ip link/slcand), not in--channel. can0@1000000is invalid on Linux SocketCAN.
- Use interface names directly:
- Windows PCAN:
can0maps toPCAN_USBBUS1,can1maps toPCAN_USBBUS2.- Optional bitrate suffix is supported:
can0@1000000.
- macOS PCBUSB (PCAN backend):
can0maps toPCAN_USBBUS1,can1maps toPCAN_USBBUS2.- Install
libPCBUSB.dylibfirst (see rootREADME.mdmacOS section).
2.2 Damiao Serial-Bridge Quick Reference (--transport dm-serial)
- This path is adapter-specific and intended for Damiao motors.
- Typical flags:
--transport dm-serial --serial-port /dev/ttyACM1 --serial-baud 921600. - In
dm-serialmode,--channelis ignored by transport creation.
2.3 Damiao Dedicated CAN-FD Quick Reference (--transport socketcanfd)
- This path is Linux-only and independent from classic SocketCAN transport.
- Hexfellow must use this path (
--vendor hexfellow --transport socketcanfd). - Typical flags:
--transport socketcanfd --channel can0. - Ensure the interface is in FD mode first (
scripts/canfd_restart.sh can0). - Current status: Hexfellow validated; Damiao CAN-FD matrix can be validated per model.
3. Vendor = damiao
3.1 Supported Modes
scanenabledisablemitpos-velvelforce-pos
3.2 Damiao Extra Arguments
3.3 Control Arguments by Mode
3.4 Scan Behavior Details
- The scanner is model-agnostic in practice: it internally tries a built-in model-hint list.
- For each candidate ID, it also tries multiple feedback-ID hints: inferred (
id+0x10), user--feedback-id,0x11,0x17. - Detection first attempts register reads (RID 21/22/23), then feedback fallback.
3.5 Damiao Examples
4. Vendor = robstride
4.1 Supported Modes
pingscanenabledisablemitpos-velvelread-paramwrite-paramsave
4.2 RobStride Extra Arguments
4.3 Control Arguments by Mode
Notes:
- RobStride unified control currently supports
MIT/POS_VEL/VEL. - Supported RobStride models are
rs-00,rs-01,rs-02,rs-03,rs-04,rs-05, andrs-06. - Always pass the real motor model. Basic control command shape is shared, but native function-code parameters differ by model; a parameter ID may have a different name or type on a different RS model.
- The built-in RS00-RS06 parameter tables are aligned with RobStride/Product_Information commit
ba7236bc26417766fda71e75ae128c66dbd21aba. - Torque/current is currently parameter-level only (via
write-param, for exampleiq_refand limit registers), not a first-class high-level mode. - In RobStride
mit, all five unified inputs are effective:--pos,--vel,--kp,--kd,--tau. - RobStride
mitunits follow unified semantics:posinrad,velinrad/s,tauinNm(kp/kdare MIT loop gains). - In RobStride
pos-vel, only--pos,--vlim, and optional--kp/--loc-kpare consumed. - In RobStride
pos-vel,--vel,--kd, and--tauare ignored (CLI prints a warning if provided).
4.4 Scan Behavior Details
- Fast pass: ping + query-parameter probe per ID.
- If no hits in full range: fallback to blind velocity pulses for manual movement observation.
- Fallback hit criteria includes state feedback presence.
4.5 RobStride Examples
5. Vendor = all
vendor=all currently supports only --mode scan.
5.1 Additional Arguments for all-scan
5.2 Example
5.3 Vendor = hightorque (native ht_can v1.5.5)
- This path uses native HighTorque
ht_canv1.5.5 direct-CAN protocol. - It is intended for setups where motors are exposed directly on SocketCAN (
can0etc.). - Official Panthera/HighTorque SDK serial chain (
USB serial -> CANboard -> motors) is separate from this CLI direct-CAN path. - Supported modes:
scan | read | ping | mit | pos | vel | tqe | pos-vel-tqe | volt | cur | stop | brake | rezero | conf-write | timed-read. - Unified unit interface:
--posinrad--velinrad/s--tauinNm--kp,--kdare accepted for MIT signature compatibility but ignored byht_can.- Raw debug parameters:
--raw-pos,--raw-vel,--raw-tqe.
6. Vendor = myactuator
6.1 Supported Modes
scanenabledisablestopset-zerostatuscurrentvelposversionmode-query
6.2 MyActuator Extra Arguments
Status output note:
anglecomes from0x9Cstatus-2 near-turn angle.mt_anglecomes from0x92multi-turn angle and should be used for absolute-position judgement.
6.3 MyActuator Examples
7. Vendor = hexfellow
Transport constraint:
- Hexfellow is CAN-FD-only in this repository (
--transport socketcanfd). - Current support scope: scan / status / pos-vel / mit / enable / disable.
- Current status: transport integrated; model validation matrix pending.
7.1 Hexfellow Examples
8. Practical Notes
- For Damiao ID updates, prefer keeping
--store 1 --verify-id 1. - If scan intermittently misses motors, retry after CAN restart.
- RobStride supports CLI
--mode pos-vel(mapped to native Position); in this mode use--pos/--vlim/[--kp|--loc-kp]. - MyActuator low-voltage protection returns error code
0x0004in status-1 (0x9A) and blocks motion.