pylabrobot.brooks.precise_flex.PreciseFlexArm.recover_axes_within_limits#

async PreciseFlexArm.recover_axes_within_limits(speed_percent: float | None = None, max_distance: float | None = 5.0) → Dict[PreciseFlexAxis, float]#

Bring out-of-range axes back inside their soft limits, one axis at a time.

While an axis is outside its soft limit the controller rejects every commanded coordinated move (-1012), and homing does not help on the absolute rotary axes. A single-axis move is the documented exception: it may move an axis toward the in-range region. Each recoverable offender is driven to just inside its nearest soft limit, slowly, waiting for each to finish, in _RECOVERY_ORDER.

Parameters:
  • speed_percent (float | None) – Profile speed for the recovery moves, in percent; deliberately slow. default_recovery_speed_percent when None.

  • max_distance (float | None) – only move an axis that is out of range by at most this much (deg for the rotary axes, mm for base/gripper). An axis further out is left in place: a large unattended single-axis sweep risks a collision, so it is left for the caller to recover manually (e.g. by freedriving). Pass None to move regardless.

Raises:

ValueError – If a recovery move would carry the gripper into the column or the base plate, on a modelled arm.

Returns:

The axes moved, as axis -> recovered target. Empty when nothing recoverable is out of range or the configuration was not discovered. The wrist and rail are never auto-recovered (see _RECOVERY_ORDER), nor a gripper open past its limit: bringing it in would close the jaws without sensing force.

Return type:

Dict[PreciseFlexAxis, float]