Skip to main content
Complete parameter reference for the Rust 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 like motor-cli-vX.Y.Z-linux-x86_64.tar.gz), then run directly:
If you want 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=hightorque is a native ht_can v1.5.5 direct-CAN mode, not the official serial-CANboard transport.

CAN Debugging Entry

  • Professional Linux slcan + Windows pcan troubleshooting: ../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)
Current status:
  • Hexfellow: validated on socketcanfd with unified mit / pos-vel.
  • HighTorque: validated on standard CAN with unified mit / vel (kp/kd ignored by protocol).
  • Damiao: baseline implementation for unified mit / pos-vel / vel / force-pos.

Validated Capability Matrix (Damiao + RobStride, 2026-04)

Notes:
  • RobStride default --feedback-id is 0xFD; scan defaults to --feedback-ids 0xFD,0xFF,0xFE,0x00,0xAA.
  • RobStride feedback_id / host_id is not the motor device_id; scan reports the motor ID as probe / device_id.
  • RobStride --model is still passed for limits and logging, while current parameter read/write uses the common section 4 runtime table.
  • RobStride pos-vel ignores --vel/--kd/--tau by design (warning only, no hard error).

1. Argument Parsing Rules

  • Only --key value style 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 value 1.
  • 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@1000000 is invalid on Linux SocketCAN.
  • Windows PCAN:
    • can0 maps to PCAN_USBBUS1, can1 maps to PCAN_USBBUS2.
    • Optional bitrate suffix is supported: can0@1000000.
  • macOS PCBUSB (PCAN backend):
    • can0 maps to PCAN_USBBUS1, can1 maps to PCAN_USBBUS2.
    • Install libPCBUSB.dylib first (see root README.md macOS 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-serial mode, --channel is 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

  • scan
  • enable
  • disable
  • mit
  • pos-vel
  • vel
  • force-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

  • ping
  • scan
  • enable
  • disable
  • mit
  • pos-vel
  • vel
  • read-param
  • write-param
  • save

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, and rs-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 example iq_ref and limit registers), not a first-class high-level mode.
  • In RobStride mit, all five unified inputs are effective: --pos, --vel, --kp, --kd, --tau.
  • RobStride mit units follow unified semantics: pos in rad, vel in rad/s, tau in Nm (kp/kd are MIT loop gains).
  • In RobStride pos-vel, only --pos, --vlim, and optional --kp/--loc-kp are consumed.
  • In RobStride pos-vel, --vel, --kd, and --tau are 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_can v1.5.5 direct-CAN protocol.
  • It is intended for setups where motors are exposed directly on SocketCAN (can0 etc.).
  • 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:
    • --pos in rad
    • --vel in rad/s
    • --tau in Nm
    • --kp, --kd are accepted for MIT signature compatibility but ignored by ht_can.
    • Raw debug parameters: --raw-pos, --raw-vel, --raw-tqe.

6. Vendor = myactuator

6.1 Supported Modes

  • scan
  • enable
  • disable
  • stop
  • set-zero
  • status
  • current
  • vel
  • pos
  • version
  • mode-query

6.2 MyActuator Extra Arguments

Status output note:
  • angle comes from 0x9C status-2 near-turn angle.
  • mt_angle comes from 0x92 multi-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 0x0004 in status-1 (0x9A) and blocks motion.