pylabrobot.formulatrix.mantis.driver.arm_kinematics#

The arm’s kinematics and units: pure maths, nothing sent.

The arm is a five-bar linkage: two motors on fixed bases, each turning a short link, whose two long links meet at the head. The arm frame has the base of motor 0’s link at its origin and the other base ARM_DISTANCE along x; it is in mm, and the head at idle sits at about (15.0, 31.2).

Motors 0 and 1 turn the links in degrees; motor 2, Z, travels in mm, down from its home flag. The wire carries device units: 200 per revolution of a motor.

Functions

compute_absolute_device_position(*, motor, ...)

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

compute_corrected_encoder_reading(*, ...)

An absolute encoder reading made linear by its one-revolution table.

compute_device_position(*, motor, position)

A position in device units.

compute_device_rate(*, motor, rate)

A speed or an acceleration in device units, rounded up half a step as on the wire.

compute_elbow_positions(*, theta_1, theta_2)

Where each short link ends in the arm frame, motor 0's first; z None.

compute_head_position(*, theta_1, theta_2)

Where the head is in the arm frame for two link angles, z None: forward kinematics.

compute_joint_angles(*, location)

The two links' angles that put the head at a location's x and y: inverse kinematics.

compute_position(*, motor, device_position)

A position from device units, in degrees (arms) or mm (Z).

compute_wrapped_angle(*, angle, minimum)

An angle moved by whole turns into [minimum, minimum + 360].

Classes

MantisArmCoordinate(x, y, z)

A position in the arm frame, mm: the unit's files' frame, not PLR's deck frame.