Skip to main content

Goal

  • Same-vendor multi-motor: multiple motor handles under one Controller, query state in one pass.
  • Multi-vendor mixed: multiple Controllers in parallel, query state in one pass.

Run

Notes

  • Damiao uses a DAMIAO_MOTORS list; add as many as you need.
  • MyActuator uses USE_MYACTUATOR + MYACTUATOR_MOTORS.
  • RobStride uses USE_ROBSTRIDE + ROBSTRIDE_MOTORS.
  • The unified call is request_feedback() + poll_feedback_once() + get_state() (compat form).
  • RETRY_ENABLED=True: enables query retry, which greatly reduces None.
  • MAX_RETRIES / RETRY_DT_MS: control retry count and interval.
Version notes:
  • <= v0.1.6: keep poll_feedback_once().
  • v0.1.7+: background polling is on by default; manual poll_feedback_once() is usually optional.

How to add more Damiao motors

Add a row to DAMIAO_MOTORS, e.g.:
Example scan results:
  • probe=0x01 -> mst_id=0x11
  • probe=0x04 -> mst_id=0x14
  • probe=0x07 -> mst_id=0x17
You can write them directly as:

How to remove a motor or brand

  • Remove a motor: delete its row from the list.
  • Disable a brand: set USE_MYACTUATOR or USE_ROBSTRIDE to False.

How to add a brand-new vendor (code level)

To add a vendor not yet in the script (e.g. hightorque):
  1. Add that vendor’s config list and switch.
  2. Add attach_xxx(ctrl, cfgs) that calls ctrl.add_xxx_motor(...) internally.
  3. In main(), create that vendor’s controller and run:
    • ctrl.enable_all()
    • states = query_states_with_retry(ctrl, motors)
    • append_states(out, names, states)
This keeps a unified calling pattern after extension, so the code stays readable.
Set VENDOR to robstride in 01-scan.py, confirm the scanned ids, then fill them back into ROBSTRIDE_MOTORS.