pylabrobot.formulatrix.mantis.driver.arm_kinematics.compute_absolute_device_position#

pylabrobot.formulatrix.mantis.driver.arm_kinematics.compute_absolute_device_position(*, motor: int, reading: float, correction: Sequence[Tuple[float, float]], homing_position_a: float) → float#

An arm motor’s position, in device units, from its absolute encoder’s raw reading.

The corrected reading less the encoder reference, within one span; above ABSOLUTE_ENCODER_WRAP one span lower.

Parameters:
  • motor (int) – 0 or 1.

  • reading (float) – the raw reading.

  • correction (Sequence[Tuple[float, float]]) – the motor’s (ideal, measured) table rows.

  • homing_position_a (float) – the motor’s encoder reference, in the encoder’s units.

Return type:

float