Skip to content

Set position range

SUMMARY

Set Position Range configures the gripper's maximum finger separation in millimeters.

Robotiq2F85 automatically sets this to 85 mm after connect. Call set_position_range_mm only if your physical installation differs from the datasheet stroke.

The Skill

python
gripper.set_position_range_mm(85.0)

The Code

Example: Use the Default Stroke

Robotiq2F85 defaults to 85 mm after connect. The call below is shown for explicitness — it is not required under normal conditions.

python
from telekinesis.synapse.tools.parallel_grippers import robotiq

gripper = robotiq.Robotiq2F85()
# Connect
gripper.connect(ip="192.168.1.1", protocol="RTDE")
# Set position range
gripper.set_position_range_mm(position_range_mm=85.0)
# Move to half-open
gripper.move(position=42.5, speed=50.0, force=60.0, asynchronous=False)
# Disconnect
gripper.disconnect()

The Explanation of the Code

set_position_range_mm sets the maximum finger separation used as the target for open and as the upper bound for move position values when the unit is "mm". It must be called after connect — it requires an active RTDE connection.

Default. Each gripper subclass sets its position range at initialization. Override only if your hardware installation uses a different stroke.

Physical stroke reference:

ModelPhysical stroke (mm)Default in subclass
Robotiq 2F-858585 (set at init)
OnRobot RG2110110 (set at init)
OnRobot RG6160160 (set at init)

How to Tune the Parameters

Robotiq 2F-85

ParameterTypeDefaultDescription
position_range_mmfloat85.0Maximum finger separation in mm. Set at initialization. Must be > 0.

OnRobot RG2 / RG6

ParameterTypeDefaultDescription
position_range_mmfloat110.0 (RG2) / 160.0 (RG6)Maximum finger separation in mm. Set at initialization. Must be > 0.

WARNING

Calling set_position_range_mm before connect raises a RuntimeError. Always connect first.

Where to Use the Skill

  • Custom stroke — Override when the physical installation differs from the model's datasheet stroke
  • Obstacle avoidance — Restrict the range to prevent fingers reaching nearby tooling or fixtures

When Not to Use the Skill

Do not call set_position_range_mm when:

  • Using "normalized", "percent", or "device" position units — the mm range only applies when the position unit is "mm"
  • Using the default 2F-85 strokeRobotiq2F85 sets 85 mm automatically after connect

Supported Grippers

GripperSupported
OnRobot RG2
OnRobot RG6
Robotiq 2F-85
Schunk EGU-50Coming Soon!