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/MYACTUATOR_API.mdMyActuator API and Mode 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.
motor_cli MyActuator control in motorbridge.
1) Basics
- Vendor name:
myactuator(backward-compatible ) - CAN IDs:
- Tx command:
0x140 + motor_id - Rx feedback:
0x240 + motor_id
- Tx command:
- Typical ID range:
motor_id in [1, 32] - Common default for ID=1:
--motor-id 1--feedback-id 0x241
2) Supported motor_cli Modes
scan: probe IDs in 1..32enable: release brake (0x77)disable: shutdown motor (0x80)stop: stop closed loop (0x81)set-zero: set current position as encoder zero (0x64, persistent after power-cycle)status: request status-2 (0x9C)current: current closed loop (0xA1)vel: speed closed loop (0xA2)pos: absolute position closed loop (0xA4)version: query version date (0xB2)mode-query: query system operating mode (0x70)
3) Arguments and Units
| Argument | Type | Default | Used in | Unit |
|---|---|---|---|---|
--start-id | u16 | 1 | scan | id |
--end-id | u16 | 32 | scan | id |
--current | f32 | 0.0 | current | A |
--vel | f32 | 0.0 | vel | rad/s |
--pos | f32 | 0.0 | pos | rad |
--max-speed | f32 | 8.726646 | pos | rad/s |
--loop | u64 | 1 | all | cycles |
--dt-ms | u64 | 20 | all | ms |
4) Encoding Details (Current CLI)
CLI input is unified in radians/rad-s, then converted internally to MyActuator protocol units (deg/deg-s).A1current mode:- payload
[4..5] = int16(current / 0.01)
- payload
A2velocity mode:- payload
[4..7] = int32((vel_rad_s.to_degrees()) * 100)
- payload
A4absolute position mode:- payload
[2..3] = uint16(max_speed_rad_s.to_degrees()) - payload
[4..7] = int32(pos_rad.to_degrees() * 100)
- payload
5) Feedback Decoding (status/command reply)
For response commands0x9C, 0xA1, 0xA2, 0xA4:
data[1]: temperature (int8, °C)data[2..3]: current (int16 * 0.01 A)data[4..5]: speed (int16, deg/s)data[6..7]: shaft angle (int16 * 0.01 deg, near-turn angle)
0x92 multi-turn angle response:
data[4..7]: multi-turn angle (int32 * 0.01 deg)
angle=...from status-2 (0x9C)mt_angle=...from multi-turn angle (0x92) for absolute-position judgement
6) Common Command Examples
7) Troubleshooting
If motor replies but does not move:- Query status-1 (
0x9A) externally and check error code. - If error code is
0x0004, this means low voltage protection. - Recover supply voltage, then reset (
0x76) and release brake (0x77).
data[3]: brake released flagdata[4..5]: bus voltage (uint16 * 0.1 V)data[6..7]: error code