@jonlong Not that I'm aware of as those are not "native" features of the robot language. The Robotiq script is loaded into the robot memory at run time when you press play. The way it works on the robot is when you press play the program is compiled and all new script functionality is loaded at that time.
If you try to single step through the program those scripts are not loaded as the program is not actually being executed and therefore you get the error. My understanding is when you press the single step button you are actually compiling a small program for that step and then sending that one step to the controller as a program. To emulate that behavior you'd have to send as your program to the controller the entire Robotiq script file along with the one command you want to execute so that it's loaded in the run environment.
So I had a little spare time today so I sat down and started working on a nodejs library for controlling the 2F-85 gripper. You can find the source code at https://github.com/mbush92/robotiq-node. Its very limited in scope currently as I just started knocking out some code this afternoon but you can activate the gripper and then open and close it. If you're familiar with node you can run a simple script that I wrote called gripper.js in the /lib folder and it will control the gripper through an close and open cycle. I will hopefully be doing some more work on this over the next few days.
Also just as a note, I do not warranty the code to be free from errors or bugs so use at your own risk....had to throw that out there you know
If anyone wants to work on this code as well let me know and I can add you as a contributor
@matthewd92 The addresses of the usb/serial converter are assigned by the OS. So we cannot tell in advance how they will be named. On linux for example, they are named /dev/ttyUSBX or /dev/ttyACMX where X is an integer.
@cgilmer For an external library to control Robotiq devices, have a look at the ros-industrial robotiq package. https://github.com/ros-industrial/robotiq. Use the gripper manual for the communication protocol description.
@cgilmer I took a look at the repo you linked https://github.com/SintefRaufossManufacturing/python-urx/blob/master/urx/robotiq_two_finger_gripper.py. I think that you could directly add the gripper preamble in that file and use rq_* functions directly instead of socket_set_var.
@cgilmer I always use spaces.
@cgilmer take a look at this fork, I appended the preamble.
Hi Pierre and Matthew et al,
The link as step 1 of the setup for this project seems broken, is there any other source for the driver, as it seems like a great project?
SETUP
|
| You must install the driver first and then power on the gripper from the
| gripper UI. The driver can be found here:
|
| http://support.robotiq.com/pages/viewpage.action?pageId=5963876
|
| FAQ
Also @Pierre, as we are newbies with URX, is yours a fork of this https://github.com/SintefRaufossManufacturing/python-urx and which is the best for us to start with?
Yes it is a fork of this repository. The Step 1 refer to which project?
I have a Robotiq 85 2-finger gripper that I'm using with a UR5 running version 3.3.2.266, and would like to control remotely (presumably via URScript).
Perhaps I have missed something basic, but this does not seem to be working, and behaves in ways I would not expect.
When I run "gripper_tutorial.urp" from the pendant, that does work. But when I single-step through any of the rq_* commands (using the >| button on the bottom of the pendant display), I get a compile error, e.g., "Compile error: name 'rq_close' is not defined". Likewise, sending rq_* commands over a socket does not work; there does not seem to be any effect.
I can control the gripper remotely using raw socket commands from URScript, e.g., socket_set_var("POS", 255, "gripper_socket"). But that does not seem to work reliably, and does not seem like the right way to do things given the presence of the rq_* commands.
Any idea what might cause this behavior? Have I missed some initialization step? Shouldn't I be able to send "rq_close()" (e.g.) over a URScript socket?