hi, I have a UR 10 and robotiq 2f-85 gripper.
I followed the tutorial of ’ Send URScript to Controller with TCP/IP’ (Use the Primary, Secondary, and Realtime Interface to send URScript commands — PolyScope 5 Tutorials documentation) to use python to control the robot.
s.sendall(b"movej(p[0.3219, -0.13942, 0.62208, 2.22144, 2.22144, 0], a=3.1416, v=0.3)" + b"\n") # it works
But in the meantime, I want to control the gripper by the method, it doesn’t work.
s.sendall(b"rq_close()" + b"\n") #it doesn’t work
So I want to ask how to use python to control robotiq 2f-85 gripper?
I have no more experience about the robot. I really appreciate it if you can give me some guidances or example files. Thank you very much.
Hello
I control the robotiq 2F gripper with python through the USB port of the PC, which is where I connect the gripper.
The library I use is the one in the following code:
#from pyRobotiqGripper import RobotiqGripper as gripper
import pyRobotiqGripper
import time
gripper = pyRobotiqGripper.RobotiqGripper()
gripper.activate()
time.sleep (0.2)
gripper.close()
time.sleep (0.25)
gripper.open()
time.sleep (0.22)
gripper.goTo(150)
time.sleep (0.2)
gripper.goTo(100)
time.sleep (0.2)
gripper.goTo(50)
position_in_bit = gripper.getPosition()
print(position_in_bit)
gripper.printInfo()