# Communication with UR5

Hi all,

I plan to use the ROS-Industrial universal-robot package (found here) with a real UR5. Though as I do not have the arm at hands currently, I am not sure how the communication is intended to be handled between the ROS machine and the UR controller. So I have a few questions related to this:

• How is the information physically transported from the ROS machine to the UR controller?
• Is this Ethernet? Modbus? GPIO? USB?
• What type of information is sent to the controller?
• Is this a desired FollowJointTrajectoryGoal? It is not clear to me from these slides...
• So does that mean there is a ROS node on the UR controller?
• If not, what kind of information is sent? And how is it received by the UR controller?
• What happens if the robot cannot reach its desired trajectory? (e.g. it collides with something unexpected or so...)
• Is the ROS machine notified?

I am mainly interested by the C-API version found in branch hydro-devel-c-api as it looks most advanced, though I am also interested to know whether things work the same way when using UR script.

Anyone has a better understanding than me on the above questions?

Thanks,

Antoine.

edit retag close merge delete

1

I'm assuming you are, but if you are intending to use the ROS-Industrial universal_robot package, I think you should mention that explicitly in your question. Also, URScript or C-API version? There are some more pkgs out there for UR robots, so being explicit helps.

( 2015-01-09 02:06:22 -0500 )edit

You are right. I have updated the post accordingly. Thanks.

( 2015-01-09 03:06:57 -0500 )edit

Sort by » oldest newest most voted

The communication between the robot and ROS is via Ethernet

When the ROS node connects to the UR5 (and UR10), it uploads a script written in URScript (very similar to Python). This script parses the commands sent from the ROS node to the robot, as well as transmitting the robot's joints status back to the ROS node. The commands are afair byte encoded using a protocol made for that particular driver. No ROS messages are sent from the computer to the robot, and the robot does not run ROS. Using this package (as opposed to the C-API version) thus does not require installation of anything on the robot.

The driver does not detect if anything is hit during execution. The streaming of position is completely open loop, so the driver does not know if the goal has actually been reached. The program running on the UR handles collisions the same way as if you were moving the arm without ROS (i.e. emergency stop, and need for re-initialization of the joints)

more

Note that the above answer is concerned with the python-based ur_driver. The C-API is more advanced (more data is exchanged, less delay between commands are sent and the robot executes them), but requires installing the driver on the robot controller itself, and disables the robot's touch screen

( 2015-01-09 07:13:21 -0500 )edit

The streaming of position is completely open loop, so the driver does not know if the goal has actually been reached.

This is not actually completely true: there is no direct feedback from the urscript, but the python side does check incoming joint states (pos & vel) for goal completion.

( 2015-01-09 08:16:45 -0500 )edit

True, some rospy.logwarn is issued if the robot does not end up in time at the goal within some given tolerances. But the part in the code that should notify the calling ActionClient about the failure is commented out (line 838 - 843 in driver.py)

( 2015-01-09 08:49:53 -0500 )edit

Thanks for your feedbacks. I understand that with the python/urscript you send a full script (or say a full trajectory) at once to the UR arm and can get feedback on the precision of tracking but do not get called back in case of unexpected event. Now the C-API version seems very much different...

( 2015-01-09 09:01:53 -0500 )edit

...now do you know how it is different? Like what kind of message type is exchanged (it seems the C-API version actually has the ROS machine perform some control instead of the UR control box), you know how things work? And can you be notified about unexpected events? Thanks ;)

( 2015-01-09 09:04:47 -0500 )edit

Hi, my UR5 hit something while executing test_move.py from ur_modern driver. After that, this error pops up all the time when I try to run the same code test_move.py. "Goal start doesnt match current pose". How do I resolve this ? If reinitialize the joints needed, please tell me how to do that

( 2018-10-02 10:16:18 -0500 )edit