-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending URScript commands for gripper have no effect #77
Comments
I don't see a reason, why this should not be working. Just to make sure:
You could try
|
Hi, |
I just realized the following: Probably the gripper URCap generates script in its installation part of program generation. If you don't have a program running (as in a program coming from the TP), then this code doesn't get injected. Probably this code generation creates the functions that you'd like to call. As soon as you are sending those script commands, any running programs will be stopped and your new script command will be executed as a standalone program. You can try to send the commands as a secondary program. Depending on the actual implementation this could work. Otherwise, you'd have to include the function definitions inside the script that you are sending through the ROS driver. Note, you can extract the generated script code after saving a program on the TP. See here for details. But as far as I can see, there's nothing wrong with the scripting interface. And I currently do not see an option to change this (if the secondary program does not work). If you agree, please close the issue. |
@fmauch: would this be something to add to the FAQ? Or perhaps a more extensive doc that explains why things are the way they are and work the way they work? |
Yes, that seems reasonable. |
Hi, |
@carofel Depending on your use-case this might be the correct attempt, but it might as well not be. If you're unfamiliar with URScript, I suggest you start by reading the URScript manual. You can get it from here: https://www.universal-robots.com/download/ However, please let me quickly note that adapting the URScript file to your needs goes beyond the scope of an issue on this driver. |
Secondary programs may not take any time to execute (https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/secondary-program-17257/) I’ve tried to pass the function definitions for the gripper as a secondary program to the UR5. When trying to pass the external control program as a secondary program it cannot find a connection with the ROS PC. |
I have Robotiq gripper connected to wrist socket. I tried sending the gripper functions through secondary programs but nothing happened. But when I sent the same script file when in remote control mode(through socket), the script executed successfully. This might be a dumb question. Where to keep/call the script function from? Is there a folder where you need to have script files so the urscript looks for? when
called |
With use_tool_communication:=false
|
We use a Robotiq 2F-85 gripper with a UR5 that is connected to the UR controller (not the wrist connector), which we used to control through UR scripts. I can confirm that those scripts do not work as secondary programs, resulting in a hard crash as reported earlier. Our workaround (which has been working fine) is to restart the program through the It would be great if the gripper could be controlled while the robot is moving, but I guess it is not very important for most people. |
Did any other scripts worked for you? Like controlling I/O pins or something like that? |
I haven't tried any other scripts as secondary programs, no. I am not sure what you mean by "sending through a socket program", but I would hope that socket communication and setting I/O would work in a secondary program. |
setting I/Os from a secondary program should definitely work. What you can always do is send arbitrary (working) script code as a primary program and then start the program containing the external control node again using the dashboard client as described by @felixvd above. If you're not able to execute script code at all, that's something we should take care of. I've lost track of all the different discussions going on here with different problems. To get back to the original question:
|
There is one year gone by with this. I'm closing this for now. If anything new arises, feel free to reopen. |
Hi, I am facing a similar issue with controlling the Robotiq end-effector using URScript commands through the ROS interface. Do we have any useful workaround or solution now? |
Hi, |
Regarding remote_control mode, please see https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/README.md#remote-control-mode |
I have written a blog post on our company website on how to send gripper script commands in remote control mode. If you have any questions please let me know! |
@Karthik-Ranga , the link to the blog post does not work. Could you please provide a working link to the blog post? Thanks |
Our company has changed the website. here is the updated link. |
@Karthik-Ranga thanks for sharing the link |
Summary
I am trying to control the Robotiq 2f-85 gripper on the UR5 by sending URScript commands.
I am publishing the commands to the
/ur_hardware_interface/script_command
topicExample:
rostopic pub -1 /ur_hardware_interface/script_command std_msgs/String "rq_open()"
rq_open()
andrq_close()
are used to open and close the gripper. The gripper is activated before executing these commands.The script commands work fine when executing them as separate Script Code nodes on the PolyScope tablet.
Why won't the commands work when publishing them to the
/ur_hardware_interface/script_command
topic?The ROS driver is running on both the robot side and PC side.
I am running ROS Kinetic on Ubuntu 16.04 Xenial natively on a laptop PC.
Versions
Impact
The coupling between the UR5 and the Robotiq gripper will be upgraded soon to a (wireless) interface through the wrist socket, which results in that the gripper cannot be controlled through the official Robotiq driver anymore.
Use Case and Setup
The objective is to control the Robotiq 2F-85 gripper without the need of the Robotiq driver but in a simple way. That is why I want to use the URscript commands.
Steps to Reproduce
Make sure the Robotiq 2F-85 Gripper is installed to the UR5 robot, in case of a USB cable, plug it in the controller.
/ur_hardware_interface/script_command
rq_reset()
->rq_activate()
->rq_open()
->rq_close()
Expected Behavior
I expected the gripper to perform opening and closing operations.
Actual Behavior
The gripper didn't move at all.
Workaround Suggestion
Using the Robotiq driver (http://wiki.ros.org/robotiq), please note that this driver is not compatible with the wireless wrist socket coupling interface for the Robotiq gripper and the UR5.
The text was updated successfully, but these errors were encountered: