Documentation Index
Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
Use this file to discover all available pages before exploring further.
RobotiqGripper
Inherits from: object
Communicates with the gripper directly, via socket with string commands, leveraging string names for variables.
Attributes:
ACT (str): Activate (1 while activated, can be reset to clear fault status)
GTO (str): Go to (will perform go to with the actions set in pos, for, spe)
ATR (str): Auto-release (emergency slow move)
ADR (str): Auto-release direction (open(1) or close(0) during auto-release)
FOR (str): Force (0-255)
SPE (str): Speed (0-255)
POS (str): Position (0-255), 0 = open
STA (str): Status (0 = is reset, 1 = activating, 3 = active)
PRE (str): Position request (echo of last commanded position)
OBJ (str): Object detection (0 = moving, 1 = outer grip, 2 = inner grip, 3 = no object at rest)
FLT (str): Fault (0=ok, see manual for errors if not zero)
init
RobotiqGripper.__init__()
Initialize a new RobotiqGripper instance.
connect
RobotiqGripper.connect(hostname: str, port: int, socket_timeout: float = 2.0) -> None
Connect to a gripper at the given address.
Timeout for blocking socket operations.
disconnect
RobotiqGripper.disconnect() -> None
Close the connection with the gripper.
activate
RobotiqGripper.activate(auto_calibrate: bool = True)
Reset activation flag and reactivate gripper, clearing previous fault flags.
Whether to calibrate the minimum and maximum positions based on actual motion.
is_active
RobotiqGripper.is_active()
Check if the gripper is active.
True if gripper is active.
get_min_position
RobotiqGripper.get_min_position() -> int
Get the minimum position the gripper can reach (open position).
get_max_position
RobotiqGripper.get_max_position() -> int
Get the maximum position the gripper can reach (closed position).
get_open_position
RobotiqGripper.get_open_position() -> int
Get what is considered the open position for gripper (minimum position value).
get_closed_position
RobotiqGripper.get_closed_position() -> int
Get what is considered the closed position for gripper (maximum position value).
is_open
Check if the current position is considered as being fully open.
True if gripper is fully open.
is_closed
RobotiqGripper.is_closed()
Check if the current position is considered as being fully closed.
True if gripper is fully closed.
get_current_position
RobotiqGripper.get_current_position() -> int
Get the current position as returned by the physical hardware.
get_grip_detected
RobotiqGripper.get_grip_detected() -> bool
Get the current object status as returned by the physical hardware.
auto_calibrate
RobotiqGripper.auto_calibrate(log: bool = True) -> None
Attempt to calibrate the open and closed positions by slowly closing and opening the gripper.
Whether to print the results to log.
If calibration fails due to an object or other error.
move
RobotiqGripper.move(position: int, speed: int, force: int) -> Tuple[bool, int]
Send commands to start moving towards the given position, with specified speed and force.
Position to move to [min_position, max_position]
Speed to move at [min_speed, max_speed]
Force to use [min_force, max_force]
move_and_wait_for_pos
RobotiqGripper.move_and_wait_for_pos(position: int, speed: int, force: int) -> Tuple[int, ObjectStatus]
Send commands to move to position with specified speed and force, then wait for completion.
Position to move to [min_position, max_position]
Speed to move at [min_speed, max_speed]
Force to use [min_force, max_force]
If failed to set variables for move.
open
Open the gripper to minimum position with maximum speed and force.
close
Close the gripper to maximum position with maximum speed and force.
RobotiqGripper.get_tool_center_wrt_arm()
No docstring provided.