grippers_robotiq
Robotiq gripper interface via pyRobotiqGripper.
High-level interface for controlling Robotiq 2F grippers through the pyrobotiqgripper package.
- class robotblockset.robotiq.grippers_robotiq.robotiq_gripper(*args: Any, **kwargs: Any)[source]
Bases:
RobotiqGripper,gripperRobotBlockset wrapper around pyrobotiqgripper.RobotiqGripper.
The upstream library communicates with the gripper over Modbus RTU and uses a serial port connection. Width commands are expressed in meters in the RobotBlockset API and are converted to millimeters for the backend.
Initialize the Robotiq gripper interface.
- Parameters:
name (str, optional) – Name identifier for the gripper instance.
portname (str, optional) – Serial port used by pyrobotiqgripper. “auto” enables the package auto-detection logic.
slave_address (int, optional) – Modbus slave address of the gripper, usually 9.
activate (bool, optional) – If True, activate the gripper during initialization.
calibrate (bool, optional) – If True, calibrate the gripper using width_min and width_max.
width_min (float, optional) – Closed gripper width in meters used for calibration.
width_max (float, optional) – Open gripper width in meters used for calibration.
**kwargs (Any) – Additional keyword arguments reserved for future extensions.
- __init__(name: str = 'robotiq_gripper', portname: str = 'auto', slave_address: int = 9, activate: bool = True, calibrate: bool = False, width_min: float = 0.0, width_max: float = 0.085, **kwargs: Any) None[source]
Initialize the Robotiq gripper interface.
- Parameters:
name (str, optional) – Name identifier for the gripper instance.
portname (str, optional) – Serial port used by pyrobotiqgripper. “auto” enables the package auto-detection logic.
slave_address (int, optional) – Modbus slave address of the gripper, usually 9.
activate (bool, optional) – If True, activate the gripper during initialization.
calibrate (bool, optional) – If True, calibrate the gripper using width_min and width_max.
width_min (float, optional) – Closed gripper width in meters used for calibration.
width_max (float, optional) – Open gripper width in meters used for calibration.
**kwargs (Any) – Additional keyword arguments reserved for future extensions.
- property width: float
Get the current gripper width in meters.
- Calibrate(width_min: float = 0.0, width_max: float = 0.085) None[source]
Calibrate the gripper for mm-based commands and feedback.
- Grasp(width: float = 0.0, speed: int = 255, force: int = 255, **kwargs: Any) bool[source]
Close the gripper to width and report whether an object was detected.
- Move(width: float, speed: int = 255, force: int = 255) bool[source]
Move the gripper to the requested width in meters.
Classes
|
RobotBlockset wrapper around pyrobotiqgripper.RobotiqGripper. |