Gripper Activate
SUMMARY
Activate runs the gripper's activation (and optional auto-calibration) sequence so it is ready to accept motion commands.
Robotiq grippers must be activated once per power cycle before move, open, or close will move the fingers.
The Skill
gripper.activate(auto_calibrate=False)The Code
Safety first!
A real robot will faithfully do whatever you ask of it - so please take a moment to clear the workspace, keep an E-Stop within reach, and be ready to disconnect.
Operating real hardware is at your own risk.
"""
Demonstrates activating a parallel gripper.
Supports only Robotiq grippers, and Isaac Sim.
Usage:
python activate.py --ip <GRIPPER_IP>
python activate.py --protocol MODBUS_RTU --serial-port COM4
python activate.py --prim_path <PRIM_PATH>
Note:
A simulated gripper has no activation cycle, so activate() is a no-op when connected to Isaac Sim.
Experimental gripper support for Isaac Sim: Robotiq 2F85 (USD-based simulation only); Schunk EGP and
PZN+ are.
"""
import argparse
from loguru import logger
from telekinesis.synapse.tools.parallel_grippers import robotiq
def main(ip: str | None,
serial_port: str,
protocol: str,
prim_path: str | None) -> None:
"""Activates a Robotiq gripper."""
#===================== Create Gripper ======================================
gripper = robotiq.Robotiq2F85()
try:
#===================== Connect Gripper =================================
if prim_path:
gripper.connect(simulation_prim_path=prim_path)
else:
gripper.connect(ip=ip, serial_port=serial_port, protocol=protocol)
# ==================== Run Skill ====================================
gripper.activate()
logger.success("Gripper activated.")
except (ConnectionError, OSError) as e:
logger.error(f"Error occurred: {e}")
finally:
gripper.disconnect()
if __name__ == "__main__":
p = argparse.ArgumentParser(description="Robotiq gripper activate")
p.add_argument("--protocol",
choices=["URCAP", "MODBUS_RTU"],
default="URCAP")
p.add_argument("--ip", default=None, help="IP for Robotiq Gripper")
p.add_argument("--serial-port", dest="serial_port", default="COM4",
help="Serial port for MODBUS_RTU")
p.add_argument("--prim_path", type=str, default=None,
help='Isaac Sim gripper prim path, e.g. "/World/robotiq_2f85"')
args = p.parse_args()
main(ip=args.ip,
serial_port=args.serial_port,
protocol=args.protocol,
prim_path=args.prim_path)Running the Example
python activate.py --ip 192.168.1.100python activate.py --prim_path /World/robotiq_2f85For all options:
python activate.py --helpParameter Configuration
Robotiq 2F-85
| Parameter | Type | Default | Description |
|---|---|---|---|
auto_calibrate | bool | False | If True, the gripper runs a full open/close calibration cycle during activation. URCAP only - ignored on MODBUS_RTU. |
Returns
This skill returns nothing (None).
Raises
Robotiq 2F-85
| Exception | Condition |
|---|---|
ValueError | The configured connection protocol is not supported |
RuntimeError | The gripper is not connected |
How to Tune the Parameters
Leave auto_calibrate=False for normal use - the gripper activates quickly and is immediately ready for motion. Set auto_calibrate=True (URCAP only) after a mechanical change - for example fitting different fingertips - so the gripper re-learns its full stroke; the calibration open/close cycle adds a few seconds to startup.
Where to Use the Skill
- Session startup - Activate once after
connect, before issuing the first motion command - Power-cycle recovery - Re-activate after the gripper loses power, since activation state does not persist across power cycles
- Fingertip changes - Activate with
auto_calibrate=Trueafter swapping fingertips to re-learn the stroke
When Not to Use the Skill
Do not use Activate when:
- The gripper is already activated - re-activating mid-session is unnecessary and interrupts readiness
- The gripper is not connected - always call
connectbefore activating