Skip to main content
Low-level async interface for individual motors. The API is Python, but the Rust axol-rt transport sends and receives every CAN frame. Python never opens SocketCAN. Most code uses Axol instead. This layer is for diagnostics, custom control modes and bench tests of single motors.

Motor methods

Notes on the methods above:
  • disable() on a Damiao motor in the LOST_COMM fault, left by a session that ended without a clean shutdown, clears that fault so the motor reports DISABLED. Clearing never enables the motor, and other faults stay in place.
  • attach() uses reads only because set_control_mode() would reboot a MyActuator motor and drop its torque for about 2 s.
  • is_holding() on a Damiao motor means the feedback status is ENABLED, which is also true of a motor that was enabled but never commanded. On a MyActuator motor it means the running byte of status 1 is set and no fault is latched.
  • Damiao motors switch control modes with a register write, so switching while holding doesn’t disturb them.

Configuration parameters

Both motor families have a named configuration table: MyActuator’s 0xC0 parameters and Damiao’s 0x7FF registers. Use it to service a motor over CAN without the vendor’s setup software. The motor.dump-config, motor.set-config and motor.restore-config commands are the usual way in. The same methods are on Motor:
  • On enable(), MyActuator motors set a low undervoltage threshold (LOW_VOLTAGE, -2 V), so a brief sag in bus voltage can’t latch the level-2 undervoltage fault.
  • Parameters whose ParamSpec.min_firmware is newer than the motor’s firmware are left out of dumps and restores. read_config and write_config raise MotorError for them.
  • Read-only parameters are never written.
  • A restore skips protected parameters (factory calibration and identity, CAN IDs, baud rate) unless you pass include_protected=True. Writing them can leave a motor unable to commutate or unreachable on the bus.

ControlMode values

MotorStatus values

OK, DISABLED, OVER_VOLTAGE, UNDER_VOLTAGE, OVER_CURRENT, OVER_TEMPERATURE, MOS_OVER_TEMP, ROTOR_OVER_TEMP, LOST_COMM, OVERLOAD, MOTOR_STALL*, ENCODER_ERROR*, CALIBRATION_ERROR*, POWER_OVERRUN*, SPEEDING*, UNKNOWN * MyActuator only

Joint to driver mapping