Gripper Connection and Disconnection
SUMMARY
Gripper Connection and Disconnection manages the gripper session lifecycle for reliable runtime communication.
This skill ensures robust setup and teardown of gripper communication channels before and after task execution.
The Skill
# Connect
gripper.connect(ip=gripper_ip, protocol="RTDE", timeout_ms=2000)
# Disconnect
gripper.disconnect()The Code
Example: Basic Connect and Disconnect
from telekinesis.synapse.tools.parallel_grippers import robotiq
# Initialize gripper
gripper = robotiq.Robotiq2F85()
# Connect
gripper.connect(ip="192.168.1.1", protocol="RTDE", timeout_ms=2000, verbose=False)
# Disconnect
gripper.disconnect()The Explanation of the Code
connect opens a communication session between Synapse and the gripper. The call blocks until the session is ready or raises a RuntimeError if the gripper cannot be reached. Default units and position range are applied automatically on connection — exact values depend on the gripper model. See the parameter table for supported protocols and options per gripper.
disconnect closes the session and releases the communication channel. Safe to call when already disconnected — returns normally without raising.
How to Tune the Parameters
Connect
Robotiq 2F-85
| Parameter | Type | Default | Description |
|---|---|---|---|
ip | str | — | IP address of the gripper. |
protocol | str | "RTDE" | Only "RTDE" is accepted. |
timeout_ms | int | 2000 | Connection timeout in milliseconds. Range: 1–120000. |
verbose | bool | False | If True, enables verbose backend logging. |
OnRobot RG2 / RG6
| Parameter | Type | Default | Description |
|---|---|---|---|
ip | str | — | IP address of the gripper. |
protocol | str | "MODBUS_TCP" | Only "MODBUS_TCP" is accepted. |
Disconnect
No parameters.
TIP
Always call disconnect after task execution to cleanly release the gripper session.
WARNING
connect raises a RuntimeError if the gripper is unreachable. Verify the IP address and power state before calling.
Where to Use the Skill
- Session setup — Call
connectonce at the start of every script before issuing any gripper commands - Session teardown — Call
disconnectat the end of every script to release the gripper session - Error recovery — Re-connect after a communication fault to restore the control session
When Not to Use the Skill
Do not call connect or disconnect when:
- The gripper is already connected —
connecton an active session overwrites the existing session; disconnect first if reconnecting intentionally - Inside a tight control loop — establishing a session has latency; connect once at startup and reuse it throughout execution
Supported Grippers
| Gripper | Supported |
|---|---|
| OnRobot RG2 | ✅ |
| OnRobot RG6 | ✅ |
| Robotiq 2F-85 | ✅ |
| Schunk EGU-50 | Coming Soon! |

