reduce_axis_position

Description

Reduces the current position of infinitely rotating axes (such as the N9 gripper) within the range of 1 revolution.


For example, the gripper has 4000 cts/rev. If its current position is 15000 (3.75 complete revolutions away from its home position), calling reduce_axis_position on this axis would change set its current position to 3000, 0.75 turns from the home position.

Signature

reduce_axis_position(self, axis: int, cts_per_rev: int = 4000)

Parameters

axis: int

The axis to reduce the position of.


cts_per_rev: int

Number of counts per revolution of the target axis. The divisor in the calculation: reduced_pos = current_pos % cts_per_rev.

Example