Ask Your Question

Communication with UR5

asked 2015-01-09 01:08:58 -0600

arennuit gravatar image

updated 2015-01-09 03:06:03 -0600

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?



edit retag flag offensive close merge delete



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.

gvdhoorn gravatar image gvdhoorn  ( 2015-01-09 02:06:22 -0600 )edit

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

arennuit gravatar image arennuit  ( 2015-01-09 03:06:57 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-01-09 05:39:05 -0600

updated 2015-01-09 07:08:30 -0600

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)

edit flag offensive delete link 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

Thomas Timm Andersen gravatar image Thomas Timm Andersen  ( 2015-01-09 07:13:21 -0600 )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.

gvdhoorn gravatar image gvdhoorn  ( 2015-01-09 08:16:45 -0600 )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

Thomas Timm Andersen gravatar image Thomas Timm Andersen  ( 2015-01-09 08:49:53 -0600 )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...

arennuit gravatar image arennuit  ( 2015-01-09 09:01:53 -0600 )edit 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 ;)

arennuit gravatar image arennuit  ( 2015-01-09 09:04:47 -0600 )edit

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

renil93 gravatar image renil93  ( 2018-10-02 10:16:18 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-01-09 01:08:58 -0600

Seen: 2,319 times

Last updated: Jan 09 '15