Skip to main content

API: motorbridge-cli

Installation

The CLI is installed automatically with the Python package:
Gateway is provided as a separate command at the same PATH level:
-- is optional: motorbridge-gateway -- --help and motorbridge-gateway --help are equivalent.
For Ubuntu/Windows/macOS startup commands, see Installation -> “WS Gateway Quick Start (3 Platforms)”.

Global Options

Since v0.3.3, motorbridge-cli disables argparse long-option abbreviation. Invalid subcommand options such as robstride-write-param --mode save are rejected instead of being interpreted as --model save.

Commands Overview


run

Run motor control commands in a loop.

Usage

Options

Mode-Parameter Mapping Notes

  • mit: --pos/--vel/--kp/--kd/--tau are effective.
  • pos-vel: effective args are --pos/--vlim; for RobStride, Python CLI follows the same native register path as the WS gateway (limit_spd 0x7017, loc_kp 0x701E, loc_ref 0x7016). Use --loop 1 for one target write; --vel/--kd/--tau are ignored by design.
  • zero / set-zero: currently RobStride-only; must pass --zero-exp 1 to actually send zero command sequence. MotorBridge writes zero_sta=1 for the RobStride zero flow.
  • save: currently RobStride-only; sends save-parameters and waits for the RobStride status ACK.
  • zero-by-offset: currently RobStride-only and intentionally disabled; it prints a warning and sends no calibration frames.
  • read-param / write-param: currently RobStride-only in run; use --param-id, --param-type, --param-value.
  • --set-motor-id / --set-feedback-id: when present, run enters the same ID update path as id-set. Damiao supports both; RobStride supports device ID only.

Examples

Enable Motor Only

Disable Motor

MIT Mode Control

Position-Velocity Mode

RobStride Motor

RobStride Position-Velocity Mode

Reverse direction by writing the opposite absolute position:

RobStride Ping

RobStride Zero (set-zero alias available)

MyActuator Position-Velocity Mode

Hexfellow MIT Mode (CAN-FD required)

Using Serial Transport


scan

Scan CAN bus for active motors.

Usage

Options

Examples

Scan All Vendors

Scan Damiao Only

Scan RobStride

For RobStride, probe / device_id is the motor ID. feedback_id / host_id such as 0xFD is the host-side ID.

Scan MyActuator

Scan HighTorque

Scan Hexfellow (CAN-FD required)

Scan via Serial

Output Format


id-dump

Read key ID and configuration registers from Damiao motors.

Usage

Options

Register IDs

Example

Output


id-set

Write motor IDs and optionally store to flash. Damiao supports ESC_ID/MST_ID; RobStride supports changing device_id.

Usage

Options

Example

Output


robstride-read-param

Read a parameter from RobStride motor.

Usage

Options

Example

Output


robstride-write-param

Write a parameter to RobStride motor.

Usage

Options

Example

Output


damiao-read-param

Read a Damiao parameter/register exposed by the Python binding.

Usage

Options

Example


damiao-write-param

Write a Damiao parameter/register and optionally read it back.

Usage

Options

Example


Common Workflows

Initial Setup

Changing Motor ID

RobStride Parameter Tuning


Exit Codes

See Also