pylabrobot.brooks.precise_flex.PreciseFlex.__init__#

PreciseFlex.__init__(host: str, gripper_length: float, gripper_z_offset: float, closed_gripper_position: float, port: int = 10100, timeout: int = 20, is_dual_gripper: bool = False, has_rail: bool = False, read_kinematics_from_device: bool = True, recover_out_of_range: bool = True, parking_position: Dict[int, float] | None = None) None#
Parameters:
  • gripper_length (float) – wrist-axis → TCP distance in mm. Used as the fallback / override; when read_kinematics_from_device is True (the default) the link lengths and tool length are read from the controller at setup and this value is only used if that read fails.

  • gripper_z_offset (float) – vertical offset in mm from the wrist plate to the tool tip. Depends on the mounted gripper; the concrete Device wrapper supplies a model-appropriate default. Always taken from here (not on the controller).

  • read_kinematics_from_device (bool) – when True, read l1/l2 and the tool length from the controller at setup and use them for kinematics; the constructor’s gripper_length then acts only as a fallback. Set False to force the constructor values regardless of what the controller reports.

  • recover_out_of_range (bool) – when True (the default), an out-of-range axis (its current position outside its soft limit - a state the controller rejects every commanded move for, -1012) is driven back into range once via recover_axes_within_limits, the same way at both moments it matters: at setup, and before a commanded move (which then retries). If it is still out of range after that, OutOfRangeOfMotionError propagates (no loop). Set False to forbid this autonomous motion - an out-of-range axis then raises instead, carrying recovery instructions. Every recovery is logged.

  • closed_gripper_position (float) – firmware-unit value (passed to GripClosePos / GripOpenPos) at which the jaws are at min_gripper_width. Depends on the mounted gripper. The conversion mm → firmware units is linear with slope 1: units = closed_gripper_position + (width_mm - min_gripper_width).

  • parking_position (Dict[int, float] | None) – initial value for the public, runtime-settable parking_position that park() moves to. Leave None (the default) and setup fills the generic default RIGHT pose (planar fold, Z column at 3/4 of the discovered travel); reassign it any time to park elsewhere. While unset (no configuration), park() falls back to movetosafe.

  • host (str)

  • port (int)

  • timeout (int)

  • is_dual_gripper (bool)

  • has_rail (bool)

Return type:

None