pylabrobot.brooks.precise_flex.PreciseFlex.recover_axes_within_limits#

async PreciseFlex.recover_axes_within_limits(speed_pct: float = 20.0, max_distance: float | None = 5.0) Dict[Axis, 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_pct (float) – Profile speed for the recovery moves (default 20%, deliberately slow).

  • 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.

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).

Return type:

Dict[Axis, float]