RobotiqGripper¶
RobotiqGripper(com_port: str = AUTO_DETECTION, device_id: int = 9, connection_type: str = GRIPPER_MODE_RTU, tcp_host: str = '127.0.0.1', tcp_port: int = 54321, baudrate=BAUDRATE, debug: bool = False, **kwargs)
¶
Class use to control Robotiq grippers (2F85, 2F140 or hande).
This class provides methods to initialize, open, close, and monitor the gripper.
Physical connection
The physical connection with the gripper can be done in 2 ways:
- Connected to the PC via the USB/RS485 adapter.
- Connected to the UR robot: In this case the UR RS485 URCAP needs to be installed on the robot controller.
Modbus RTU/TCP communication
Modbus RTU function code supported by robotiq gripper:
| Description | Modbus function code |
|---|---|
| Read registers | 4 |
| Write registers | 16 |
| Master read & write multiple registers | 23 |
For more information for gripper communication please check gripper manual on Robotiq website. https://robotiq.com/support/2f-85-2f-140
Note
This class cannot be used to control epick, 3F or powerpick.
Create a RobotiqGripper object which can be use to control Robotiq grippers using modbus RTU protocol USB/RS485 connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
com_port
|
str
|
COM port to which the gripper is connected. If "auto" (or equal to the constant AUTO_DETECTION), the library will try to find the COM port to which the gripper is connected. On Windows, COM ports are named COM1, COM2, etc. On Linux, COM ports are named /dev/ttyUSB0, /dev/ttyUSB1, etc. Default is AUTO_DETECTION. |
AUTO_DETECTION
|
device_id
|
int
|
Address of the gripper (integer) usually 9. |
9
|
connection_type
|
str
|
Type of connection to the gripper. "RTU" (or equal to the constant GRIPPER_MODE_RTU) for direct Modbus RTU connection (e.g. via USB/RS485 adapter). "RTU_VIA_TCP" (or equal to the constant GRIPPER_MODE_RTU_VIA_TCP) for Modbus RTU connection via TCP (e.g. when using the UR RS485 URCAP). Default is "RTU". |
GRIPPER_MODE_RTU
|
tcp_host
|
str
|
Host IP address for TCP connection. Default is "127.0.0.1" |
'127.0.0.1'
|
tcp_port
|
int
|
Port number for TCP connection. Default is 54321. |
54321
|
baudrate
|
int
|
Gripper communication baudrate. |
BAUDRATE
|
debug
|
bool
|
If True, enable debug logging for Modbus communication. Default is False. |
False
|
Examples:
Gripper connected at PC USB port:
>>> import pyrobotiqgripper as rq
>>> gripper = rq.RobotiqGripper(connection_type=rq.GRIPPER_MODE_RTU)
>>> gripper.connect()
>>> gripper.activate()
>>> gripper.start()
>>> gripper.open()
>>> gripper.close()
>>> gripper.move(100) #Move at position 100 in bit
>>> print(gripper.position()) #Print gripper position in bit
>>> gripper.calibrate_mm(closemm=0,openmm=85) #Calibrate the gripper with 0mm when closed and 85mm when open
>>> gripper.move_mm(50) #Move at position 50mm
>>> gripper.printStatus() #Print gripper status information in the python terminal
>>> print(gripper.positionmm()) #Print gripper position in mm
Gripper connected to UR robot via RS495 URCAP (RTU over TCP):
>>> import pyrobotiqgripper as rq
>>> gripper = rq.RobotiqGripper(connection_type=rq.GRIPPER_MODE_RTU_VIA_TCP,tcp_host="192.168.1.100")
>>> gripper.connect()
>>> gripper.activate()
>>> gripper.start()
>>> gripper.open()
Setup¶
RobotiqGripper.connect()
¶
Connect to the gripper. If the connection is already established, do nothing.
RobotiqGripper.disconnect()
¶
Disconnect from the gripper. If the connection is already closed, do nothing.
RobotiqGripper.reset()
¶
Reset the gripper (clear previous activation and calibration if any)
RobotiqGripper.activate(reset=True, start=True, refreshStatus=True)
¶
Activate the gripper if it is not already active.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reset
|
bool
|
Whether to reset the gripper before activation. |
True
|
start
|
bool
|
Whether to start the gripper motion immediately after activation (gGTO set to 1). |
True
|
refreshStatus
|
bool
|
Whether to refresh the gripper status before the activation process. The status information is used to determine if the gripper is already activated. Setting this parameter to False can make the activation faster if you are sure the gripper status is up to date. |
True
|
Warning
When you execute this function, the gripper will fully open and close. During this operation, the gripper must be able to move freely. Do not place any object inside the gripper.
RobotiqGripper.start(refreshStatus=True, readStatus=True)
¶
Start the gripper motion.
The GTO bit is set to 1. The gripper will move to the position command if it is not already there.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refreshStatus
|
bool
|
Whether to refresh the gripper status before the start process. The status information is used to determine if the gripper is already started. Setting this parameter to False can make the start process faster if you are sure the gripper status is up to date. |
True
|
readStatus
|
bool
|
Whether to read the gripper status while sending the start command. |
True
|
RobotiqGripper.stop(refreshStatus=True, readStatus=True)
¶
Gripper stop moving. GTO bit is set to 0 but the position command is not changed. The gripper will stop at its current position and hold it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refreshStatus
|
bool
|
Whether to refresh the gripper status before deciding whether to preserve the activation bit. Defaults to True. |
True
|
readStatus
|
bool
|
If True, read fresh gripper status in the same Modbus transaction as the stop write (function code 23). If False, only the stop is written (function code 16). Defaults to True. |
True
|
RobotiqGripper.calibrate_bit(openbit=None, closebit=None)
¶
Calibrate the maximum and minimum position bit values of the gripper.
This function sets the reference positions for the gripper in bits. If no parameters are provided, the gripper will perform a full open followed by a full close to measure the maximum and minimum positions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
openbit
|
int
|
Position value in bits when the gripper is open. |
None
|
closebit
|
int
|
Position value in bits when the gripper is closed. |
None
|
Warning
If no parameters are provided, the gripper will make a full open followed by a full close to measure the maximum and minimum positions in bits. Ensure the gripper can move freely during this operation.
RobotiqGripper.calibrate_speed(minSpeedClosingTime=None, maxSpeedClosingTime=None)
¶
Calibrate gripper speed to estimate gripper position over time.
If no parameters are provided, the gripper will perform a full-speed closing and a slow-speed closing to evaluate its motion. Bit calibration will also be performed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
minSpeedClosingTime
|
float
|
Time in seconds for the gripper to move from fully open to fully closed at minimum speed. |
None
|
maxSpeedClosingTime
|
float
|
Time in seconds for the gripper to move from fully open to fully closed at maximum speed. |
None
|
Warning
If no parameters are provided, the gripper will perform a full-speed closing and a slow-speed closing to evaluate its motion. Ensure the gripper can move freely during this operation.
RobotiqGripper.calibrate_mm(closemm, openmm)
¶
Calibrate the gripper for millimeter positioning.
Once this calibration is done, it is possible to control the gripper using millimeters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
closemm
|
float
|
Distance between the fingers when the gripper is fully closed. |
required |
openmm
|
float
|
Distance between the fingers when the gripper is fully open. |
required |
Warning
Bit calibration is required before executing this function. If the bit
calibration is not done, the function calibrate_bit() will be executed
automatically before calibrating in millimeters.
Control¶
RobotiqGripper.open(speed=255, force=255, wait=True, readStatus=True, refreshStatus=False)
¶
Open the gripper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
speed
|
int
|
Gripper speed between 0 and 255. Defaults to 255. |
255
|
force
|
int
|
Gripper force between 0 and 255. Defaults to 255. |
255
|
wait
|
bool
|
If True, the function waits until the gripper reaches the requested position or detects an object. Defaults to True. |
True
|
readStatus
|
bool
|
If True, the gripper status is read after sending the command. Defaults to True. |
True
|
refreshStatus
|
bool
|
If True, the gripper status is refreshed before sending the command. The status information is used to determine if the gripper is already activated. Setting this parameter to False can make the command process faster if the gripper status is up to date. Defaults to False. |
False
|
RobotiqGripper.close(speed=255, force=255, wait=True, readStatus=True, refreshStatus=False, start=False)
¶
Close the gripper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
speed
|
int
|
Gripper speed between 0 and 255. Defaults to 255. |
255
|
force
|
int
|
Gripper force between 0 and 255. Defaults to 255. |
255
|
wait
|
bool
|
If True, the function waits until the gripper reaches the requested position or detects an object. Defaults to True. |
True
|
readStatus
|
bool
|
If True, the gripper status is read after sending the command. Defaults to True. |
True
|
refreshStatus
|
bool
|
If True, the gripper status is refreshed before sending the command. The status information is used to determine if the gripper is already activated. Setting this parameter to False can make the command process faster if the gripper status is up to date. Defaults to False. |
False
|
start
|
bool
|
If True, the activation and go-to bits are combined with this move in a single Modbus transaction instead of requiring a separate start() call first. The gripper must already be activated (activate() called at least once). Defaults to False. |
False
|
RobotiqGripper.open_mm()
¶
Return distance between fingers in open position
RobotiqGripper.close_mm()
¶
Return distance between fingers in open position
RobotiqGripper.move(position, speed=255, force=255, wait=True, readStatus=True, refreshStatus=False, start=False)
¶
Move gripper fingers to the requested position with specified speed and force.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
position
|
int
|
Target position of the gripper. Must be between 0 and 255, where 0 represents fully open and 255 represents fully closed. |
required |
speed
|
int
|
Gripper speed between 0 and 255. Defaults to 255. |
255
|
force
|
int
|
Gripper force between 0 and 255. Defaults to 255. |
255
|
wait
|
bool
|
If True, the function waits until the gripper reaches the requested position or detects an object. Defaults to True. |
True
|
readStatus
|
bool
|
If True, the gripper status is read after sending the command. Defaults to True. |
True
|
refreshStatus
|
bool
|
If True, the gripper status is refreshed before sending the command. The status information is used to determine if the gripper is already activated. Setting this parameter to False can make the command process faster if the gripper status is up to date. Defaults to False. |
False
|
start
|
bool
|
If True, the activation and go-to bits are combined with this move in a single Modbus transaction instead of requiring a separate start() call first. The gripper must already be activated (activate() called at least once). Defaults to False. |
False
|
Examples:
Combine start() and move() in a single Modbus transaction:
>>> gripper.activate()
>>> gripper.move(200, speed=150, force=100, start=True)
RobotiqGripper.move_mm(positionmm, speed=255, force=255, wait=True, readStatus=True, refreshStatus=False)
¶
Move the gripper to the requested opening in millimeters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
positionmm
|
float
|
Target gripper opening in millimeters. |
required |
speed
|
int
|
Gripper speed between 0 and 255. Defaults to 255. |
255
|
force
|
int
|
Gripper force between 0 and 255. Defaults to 255. |
255
|
wait
|
bool
|
If True, the function waits until the gripper reaches the requested position or detects an object. Defaults to True. |
True
|
readStatus
|
bool
|
If True, the gripper status is read after sending the command. Defaults to True. |
True
|
refreshStatus
|
bool
|
If True, the gripper status is refreshed before sending the command. The status information is used to determine if the gripper is already activated. Setting this parameter to False can make the command process faster if the gripper status is up to date. Defaults to False. |
False
|
Note
Millimeter calibration is required to use this function.
Execute the function calibrate_mm() before using this function.
RobotiqGripper.moveToCurrentPosition(speed=None, force=None)
¶
Move the gripper to its current position. This has the effect to stop the gripper while keeping it started. It is more flexible than jsut stopping the gripper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
speed
|
int
|
Gripper speed parameter value to move to current position |
None
|
force
|
int
|
Gripper force parameter value to move to current position |
None
|
Realtime Control¶
RobotiqGripper.realTimePositionMove(controlSignal, controlBuffer=0.05, speedLowerControlThreshold=10, speedUpperControlThreshold=30, gripSpeed=None, gripForce=None, verbose=0)
¶
Move the gripper in real time to the requested position.
Meant to be called at high frequency (e.g. 100 Hz) in a non-blocking control loop for remote operation application.
If gripSpeed and gripForce are not set, the grip force can be fine-tuned once an object is detected, by moving through the following states:
- An object is detected while closing (or opening): mode switches to "object detected". The gripper holds its position and controlSignal is ignored.
- Bring the joystick back to the neutral end of the signal (< controlBuffer if closing, > 1-controlBuffer if opening) to switch to "force deactivated". The gripper still holds, and is now ready to enter force mode.
- Push the joystick again past that same threshold, toward the grip direction, to switch to "force activated". The holding force now increases with how far you push - pushing further can only increase the force, it cannot be decreased this way.
- To leave force mode, bring the signal back to the neutral end (step 2's threshold). If the force was increased in step 3, you return to "force deactivated" and can push again to increase it further. If it was not increased, control returns to normal free positioning and the object is released.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
controlSignal
|
float
|
Analogic position control signal in range [0,1] |
required |
controlBuffer
|
float
|
Dimension of the signal deadzones express in percentage of the the control signal. Deadzones are positionned at the bottom and the top of the control range. |
0.05
|
speedLowerControlThreshold
|
int
|
The speed is function of the difference between current position and target position. The function is ramp that start at speedLowerControlThreshold and finish at speedUpperControlThreshold. |
10
|
speedUpperControlThreshold
|
int
|
The speed is function of the difference between current position and target position. The function is ramp that start at speedLowerControlThreshold and finish at speedUpperControlThreshold. |
30
|
gripSpeed
|
int
|
Speed parameter use to secure a grip when an object is detected. If used, gripForce and gripSpeed have to be both set. |
None
|
gripForce
|
int
|
Force parameter use to secure a grip when an object is detected. If used, gripForce and gripSpeed have to be both set. |
None
|
verbose
|
int
|
Verbose level for debug. |
0
|
Examples:
Make a loop to control the gripper using a joystick with pygame
>>> import pygame
>>> import time
>>> import pyrobotiqgripper as rq
>>> grip = rq.RobotiqGripper()
>>> pygame.init()
>>> pygame.joystick.init()
>>> js = pygame.joystick.Joystick(0)
>>> js.init()
>>> while True:
>>> positionSignal = js.get_axis(0)
>>> pygame.event.pump()
>>> grip.realTimePositionMove(positionSignal)
RobotiqGripper.realTimePositionMove_Mode()
¶
Return the mode of the realTimePositionMove function
Returns:
| Type | Description |
|---|---|
int
|
Control mode code. See constants for details. REALTIME_POSITION_MOVE_MODE_FREEMOVE = 0 REALTIME_POSITION_MOVE_MODE_OBJECT_DETECTED_CLOSING = 100 REALTIME_POSITION_MOVE_MODE_FORCE_DEACTIVATED_CLOSING = 101 REALTIME_POSITION_MOVE_MODE_FORCE_ACTIVATED_CLOSING = 102 REALTIME_POSITION_MOVE_MODE_OBJECT_DETECTED_OPENING = 200 REALTIME_POSITION_MOVE_MODE_FORCE_DEACTIVATED_OPENING = 201 REALTIME_POSITION_MOVE_MODE_FORCE_ACTIVATED_OPENING = 202 |
RobotiqGripper.realTimeSpeedMove(controlSignal, controlBuffer=0.05, gripSpeed=None, gripForce=None, verbose=0)
¶
Move the gripper with a speed signal.
Meant to be called at high frequency (e.g. 100 Hz) in a non-blocking control loop for remote operation application.
If gripSpeed and gripForce are not set, the grip force can be fine-tuned once an object is detected, by moving through the following states:
- An object is detected while closing or opening: mode switches to "object detected". The gripper holds its position and controlSignal is ignored.
- Bring the joystick back to center (abs(controlSignal) < controlBuffer) to switch to "force deactivated". The gripper still holds, and is now ready to enter force mode.
- Push the joystick toward the closing direction (positive values), past controlBuffer, to switch to "force activated". The holding force ramps up once the signal passes 2*controlBuffer, increasing with how far you push - pushing further can only increase the force, it cannot be decreased this way. Note this direction is always "closing", even if the object was detected while opening.
- To leave force mode, bring the signal back to center. If the force was increased in step 3, you return to "force deactivated" and can push again to increase it further. If it was not increased, control returns to normal free speed control and the object is released.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
controlSignal
|
float
|
Analogic signal in the range [-1, 1] use to control gripper speed. Positive closes the gripper, negative opens it, 0 holds the current position. Magnitude controls the commanded speed. |
required |
controlBuffer
|
float
|
controlSignal deadzone express in percentage of the control range (Joystick position range between -1 and 1). The deadzone is positionned at the center of the control range. |
0.05
|
gripSpeed
|
int
|
Speed parameter use to secure a grip when an object is detected. If used, gripForce and gripSpeed have to be both set. |
None
|
gripForce
|
int
|
Force parameter use to secure a grip when an object is detected. If used, gripForce and gripSpeed have to be both set. |
None
|
verbose
|
int
|
Verbose level for debug. |
0
|
Examples:
Make a loop to control the gripper using a joystick with pygame
>>> import pygame
>>> import time
>>> import pyrobotiqgripper as rq
>>> grip = rq.RobotiqGripper()
>>> pygame.init()
>>> pygame.joystick.init()
>>> js = pygame.joystick.Joystick(0)
>>> js.init()
>>> while True:
>>> speedSignal = js.get_axis(0)
>>> pygame.event.pump()
>>> grip.realTimeSpeedMove(speedSignal)
RobotiqGripper.realTimeSpeedMove_Mode()
¶
Return the mode of the realTimeSpeedMove function
Status¶
RobotiqGripper.isActivated(refreshStatus=True)
¶
Check whether the gripper is activated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refreshStatus
|
bool
|
Whether to refresh the gripper status before checking the activation state. The status information is used to determine if the gripper is already activated. Setting this parameter to False can make the check faster if the gripper status is up to date. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
bool | None
|
True if the gripper is activated, False if not activated, or None if there is no available information to confirm gripper activation status. |
RobotiqGripper.isStarted(refreshStatus=True)
¶
Check whether the gripper is started.
Returns:
| Type | Description |
|---|---|
bool | None
|
True if the gripper is started, False if not started, or None if there is not enough information to confirm if the gripper is started. |
RobotiqGripper.is_bit_calibrated()
¶
Check whether the gripper is bit calibrated (ie. the gripper know its position in bit when fully open and fully closed).
Returns:
| Type | Description |
|---|---|
bool
|
True if the gripper is bit calibrated, False otherwise. |
RobotiqGripper.is_mm_calibrated()
¶
Check whether the gripper millimeter (mm) calibration is done.
Returns:
| Type | Description |
|---|---|
bool
|
True if the gripper is mm calibrated, False otherwise. |
RobotiqGripper.positioningResolution()
¶
Return the gripper positionning resolution in mm/bit. The number of mm the gripper will move if its position parameter vary of 1 bit.
RobotiqGripper.is_speed_calibrated()
¶
Check whether the gripper speed calibration is done.
Returns:
| Type | Description |
|---|---|
bool
|
True if the gripper speed is calibrated, False otherwise. |
RobotiqGripper.gripper_vmax_bits()
¶
Return the maximum gripper speed in bits per second.
Returns:
| Type | Description |
|---|---|
int
|
Maximum gripper speed in bits per second. |
RobotiqGripper.gripper_vmin_bits()
¶
Return the minimum gripper speed in bits per second.
Returns:
| Type | Description |
|---|---|
int
|
Minimum gripper speed in bits per second. |
RobotiqGripper.minSpeedMmSecond()
¶
Return the minimum gripper speed in mm/s
RobotiqGripper.maxSpeedMmSecond()
¶
Return the maximum gripper speed in mm/s
RobotiqGripper.speedResolutionBit()
¶
Return the speed resultion in gripper position bit/s per gripper speed bit. Correspond to the speed increase if speed parameter vary of 1 bit.
RobotiqGripper.speedResolutionMm()
¶
Return the speed resultion in mm/s per bit. This correspond the speed increase in mm/s if the speed parameter vary of 1 bit
RobotiqGripper.positionCommand()
¶
Return the last commanded position value.
Returns:
| Type | Description |
|---|---|
int | None
|
The last position command value (0-255), or None if the history is empty. |
RobotiqGripper.position(refreshStatus=True)
¶
Return the current position of the gripper in bits.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refreshStatus
|
bool
|
Whether to refresh the gripper status before getting the position. The status information is used to determine the current position. Setting this parameter to False can make the retrieval faster if the gripper status is already up to date. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
int | None
|
Current gripper position in bits (0-255), or None if history is empty. |
RobotiqGripper.position_mm(refreshStatus=True)
¶
Return the current position of the gripper in millimeters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refreshStatus
|
bool
|
Whether to refresh the gripper status before getting the position. The status information is used to determine the current position. Setting this parameter to False can make the retrieval faster if the gripper status is already up to date. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
float
|
Current gripper position in millimeters. |
Note
Calibration is required to use this function. Execute the calibration function at least once before using this function.
RobotiqGripper.lastMoveTime()
¶
Return the time of gripper last move
RobotiqGripper.lastMoveDirection()
¶
Return the last direction of movement of the gripper based gripper position history
Returns:
| Type | Description |
|---|---|
int
|
Last direction of movement. 1 for closing, -1 for opening, 0 if unknown. |
RobotiqGripper.speed()
¶
Return the last set speed parameter value.
Returns:
| Type | Description |
|---|---|
int | None
|
The last speed value set (0-255), or None if history is empty. |
RobotiqGripper.force()
¶
Return the last set force paramater value.
Returns:
| Type | Description |
|---|---|
int | None
|
The last force value set (0-255), or None if the history is empty. |
RobotiqGripper.objectDetection(refreshStatus=True)
¶
Return object detection code gOBJ
Even if the refreshStatus is not requested, it will be done if the status have never been retrieved.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refreshStatus
|
bool
|
Indicate if the object detection status is directly retrieved from the gripper or if it is taken from the last previously read status. |
True
|
Returns:
| Type | Description |
|---|---|
int
|
Object detection status code. - 0: Fingers in motion, no object detected - 1: Fingers stopped while opening, object detected - 2: Fingers stopped while closing, object detected - 3: Fingers at requested position, no object detected or lost/dropped |
RobotiqGripper.printObjectDetection(refreshStatus=True)
¶
Print object detection status in a human readable way
RobotiqGripper.readStatus()
¶
Retrieve gripper output register information and save it in the status history.
RobotiqGripper.lastStatusReadTime()
¶
RobotiqGripper.status(refreshStatus=True)
¶
Return the current gripper status as a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refreshStatus
|
bool
|
Whether to read fresh status from the gripper. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
dict
|
A dictionary containing current status values for all registers. |
RobotiqGripper.printStatus(refreshStatus=True)
¶
Print gripper status info in the Python terminal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refreshStatus
|
bool
|
Whether to read fresh status from the gripper before printing. Defaults to False. If you are sure that the status information is up to date, setting this parameter to False can make the printing faster. |
True
|
Examples:
>>> grip.move(100)
>>> grip.print_status()
Output::
======================================================================
GRIPPER STATUS
======================================================================
gOBJ : 3
└─ Fingers are at requested position. No object detected or object has been lost / dropped.
gSTA : 3
└─ Activation is completed.
gGTO : 1
└─ Go to Position Request.
gACT : 1
└─ Gripper activation.
kFLT : 0
└─ 0
gFLT : 9
└─ Minor faults (LED continuous red). No communication during at least 1 second.
gPR : 100
└─ Echo of the requested position for the Gripper: 100/255
gPO : 100
└─ Actual position of the Gripper obtained via the encoders: 100/255
gCU : 0
└─ The current is read instantaneously from the motor drive, approximate current: 0 mA
======================================================================
RobotiqGripper.commandHistoryPanda()
¶
Return the gripper command history as a pandas DataFrame.
Returns:
| Type | Description |
|---|---|
DataFrame
|
A DataFrame containing the command history with columns for time and various command registers (rARD, rATR, etc.). |
RobotiqGripper.statusHistoryPanda()
¶
Return the gripper status history as a pandas DataFrame.
Returns:
| Type | Description |
|---|---|
DataFrame
|
A DataFrame containing the status history with columns for time and various status registers (gOBJ, gSTA, etc.). |
RobotiqGripper.historyPanda()
¶
Return the merged command and status history as a pandas DataFrame. The first line of the DataFrame corresponds to the odlest command or status entry, the last line corresponds to the most recent command or status entry.
Returns:
| Type | Description |
|---|---|
DataFrame
|
A DataFrame containing the merged history with columns for time, commands, and status values. |
RobotiqGripper.commandHistory()
¶
Return the gripper command history as a numpy array.
Warning
This function keep reference of the commandHistory source array. If you want to edit the value of the return numpy array make a copy of it. commandHistory().copy()
Returns:
| Type | Description |
|---|---|
ndarray
|
A numpy array containing the status history. Columns are 0 -> "time" 1 -> "rARD" 2 -> "rATR" 3 -> "rGTO" 4 -> "rACT" 5 -> "rPR" 6 -> "rSP" 7 -> "rFR" The constant dictionnaries can be use to converter column id into parameter name or column name into column id. COMMAND_HISTORY_COLUMNS_ID_2_NAME COMMAND_HISTORY_COLUMNS_NAME_2_ID |
RobotiqGripper.statusHistoryNumpy()
¶
Return the gripper status history as a numpy array.
Warning
This function keep reference of the statusHistory source array. If you want to edit the value of the return numpy array make a copy of it. statusHistoryNumpy().copy()
Returns:
| Type | Description |
|---|---|
ndarray
|
A numpy array containing the status history. Columns are 0 -> "time" 1 -> "gOBJ" 2 -> "gSTA" 3 -> "gGTO" 4 -> "gACT" 5 -> "kFLT" 6 -> "gFLT" 7 -> "gPR" 8 -> "gPO" 9 -> "gCU" The constant dictionnaries can be use to converter column id into parameter name or column name into column id. STATUS_HISTORY_COLUMNS_ID_2_NAME STATUS_HISTORY_COLUMNS_NAME_2_ID |
RobotiqGripper.historyNumpy()
¶
Return the merged command and status history as a numpy array. The first line of the array corresponds to the odlest command or status entry, the last line corresponds to the most recent command or status entry.
Returns:
| Type | Description |
|---|---|
ndarray
|
A numpy array containing the merged history. Columns are 0 -> "time" 1 -> "rARD" 2 -> "rATR" 3 -> "rGTO" 4 -> "rACT" 5 -> "rPR" 6 -> "rSP" 7 -> "rFR" 8 -> "gOBJ" 9 -> "gSTA" 10 -> "gGTO" 11 -> "gACT" 12 -> "kFLT" 13 -> "gFLT" 14 -> "gPR" 15 -> "gPO" 16 -> "gCU" The constant dictionnaries can be use to converter column id into parameter name or column name into column id. HISTORY_COLUMNS_ID_2_NAME HISTORY_COLUMNS_NAME_2_ID |