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
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.
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:
| Model | Physical stroke (mm) | Default in subclass |
|---|---|---|
| Robotiq 2F-85 | 85 | 85 (set at init) |
| OnRobot RG2 | 110 | 110 (set at init) |
| OnRobot RG6 | 160 | 160 (set at init) |
How to Tune the Parameters
Robotiq 2F-85
| Parameter | Type | Default | Description |
|---|---|---|---|
position_range_mm | float | 85.0 | Maximum finger separation in mm. Set at initialization. Must be > 0. |
OnRobot RG2 / RG6
| Parameter | Type | Default | Description |
|---|---|---|---|
position_range_mm | float | 110.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 stroke —
Robotiq2F85sets 85 mm automatically afterconnect
Supported Grippers
| Gripper | Supported |
|---|---|
| OnRobot RG2 | ✅ |
| OnRobot RG6 | ✅ |
| Robotiq 2F-85 | ✅ |
| Schunk EGU-50 | Coming Soon! |

