1) Applicable version of the Robotiq Gripper

 

2) Connection method of the Robotiq Gripper and the xArm 

●  Connector of the Robotiq Gripper

●  The tool/end connector of the xArm

●  Connection method of the Robotiq Gripper and xArm

The following table shows the corresponding connection between the connector of the robotiq gripper and the end/tool connector of the xArm:

3) Control the Robotiq Gripper through xArm-Python-SDK

Example:
Example of controlling the Robotiq Gripper ( 2F-85 / 2F-140 ) by sending commands through xArm-Python-SDK.

https://github.com/xArm-Developer/xArm-Python-SDK/blob/master/example/wrapper/thridparty/set_robotiq_gripper.py

#!/usr/bin/env python3  
# Software License Agreement (BSD License)  
#
# Copyright (c) 2019, UFACTORY, Inc.
# All rights reserved.  
#  
# Author: Vinman      

"""  
Example: Robotiq Gripper Control  Please make sure that the gripper is attached to the end.
"""    
import os  
import sys  
import time  
sys.path.append(os.path.join(os.path.dirname(__file__), '../../..'))
   
from xarm.wrapper import XArmAPI  
from configparser import ConfigParser  
parser = ConfigParser()  
parser.read('../robot.conf')  
try:      
    ip = parser.get('xArm', 'ip')  
except:      
    ip = input('Please input the xArm ip address[192.168.1.194]:')      
    if not ip:          
        ip = '192.168.1.194'      

arm = XArmAPI(ip)  
time.sleep(0.5)  

if arm.warn_code != 0:      
    arm.clean_warn()  
if arm.error_code != 0:      
    arm.clean_error()    

ret = arm.core.set_modbus_timeout(5)  
print('set modbus timeout, ret = %d' % (ret[0]))    
ret = arm.core.set_modbus_baudrate(115200)  
print('set modbus baudrate, ret = %d' % (ret[0]))    

# robotiq open/close test  
data_frame = [0x09, 0x10, 0x03, 0xE8, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]  
ret = arm.core.tgpio_set_modbus(data_frame, len(data_frame))  
print('set modbus, ret = %d' % (ret[0]))  
time.sleep(0.1)    

data_frame = [0x09, 0x10, 0x03, 0xE8, 0x00, 0x03, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00]  
ret = arm.core.tgpio_set_modbus(data_frame, len(data_frame))
print('set modbus, ret = %d' % (ret[0]))    

arm.disconnect() 

4) Control the Robotiq Gripper through xArm-Studio

Steps to set up the Robotiq Gripper:

● Enter the "Settings" - "End Effector"

● Select the type of Robotiq Gripper

● Click the button of the "Save"

Note:

1. The opening and closing speed of the gripper can be adjusted.

2. The self-collision prevention model of the gripper can be turned on by clicking the button.

3. When "TCP payload compensation" is turned on, the default TCP payload will be changed to the TCP payload parameter of the gripper.

Blockly Example

The role of this program:

execute this program to control the gripper to grip the target object at the specified position, and then place the target object at the target position.

Did this answer your question?