Get Current Position
SUMMARY
Get Current Position reads the current finger separation of the gripper in the configured position unit (default: millimeters).
The Skill
position = gripper.get_current_position()The Code
Example: Read Position After a Move
from telekinesis.synapse.tools.parallel_grippers import robotiq
gripper = robotiq.Robotiq2F85()
# Connect
gripper.connect(ip="192.168.1.1", protocol="RTDE")
# Move then read position
gripper.move(position=42.5, speed=50.0, force=60.0, asynchronous=False)
position = gripper.get_current_position()
print(f"Current position: {position:.1f} mm")
# Disconnect
gripper.disconnect()The Explanation of the Code
get_current_position queries the gripper backend for the current finger separation and returns it in the active position unit set by set_unit. The default after connect is "mm".
Position unit. The returned value follows whichever unit was last configured via set_unit("position", ...). Call set_unit("position", "mm") before reading if millimeters are expected.
Grasp detection. After close, a returned position significantly above zero indicates the fingers stopped against an object. A value near zero means the gripper closed fully without contact.
Return Value
| Type | Description |
|---|---|
float | Current finger separation in the configured position unit. |
How to Tune the Parameters
No parameters.
TIP
Compare the returned position against a threshold rather than an exact value — hardware-level variation means the reading will vary slightly between calls.
WARNING
get_current_position raises a RuntimeError if the gripper is not connected. Always call connect before reading position.
Where to Use the Skill
- Grasp verification — Confirm an object is held before transporting
- State inspection — Read gripper position at any point in a workflow for logging or branching logic
- Closed-loop control — Combine with
moveto implement position-feedback loops
When Not to Use the Skill
Do not use Get Current Position when:
- The gripper is not connected — always call
connectbefore issuing gripper commands - High-frequency polling is required — repeated queries add latency; use asynchronous motion and a single readback instead
Supported Grippers
| Gripper | Supported |
|---|---|
| OnRobot RG2 | ✅ (always returns mm) |
| OnRobot RG6 | ✅ (always returns mm) |
| Robotiq 2F-85 | ✅ (returns in configured position unit) |
| Schunk EGU-50 | Coming Soon! |

