ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can't establish connection to UR5 using ROS-Industrial driver

asked 2016-09-12 14:08:03 -0600

Pawel gravatar image

updated 2016-09-15 07:18:53 -0600

gvdhoorn gravatar image

Hello,

I am currently running on Ubuntu 14.04.5 LTS and UR Software 3.3.0.145. I have gone through the ROS tutorial for installing Indigo and setting up my catkin workspace. Next I cloned the the github repo for the ur_modern_driver into catkin_ws/src and made it with catkin_make. From there I have tried to follow the universal robot getting started with ROS Industrial tutorial...

Universal Robot ROS Industrial Tutorial

I can ping the UR5 and run my own python scripts with URScript commands so the communication appears to be in check.

My problem is with step 3.3 in the tutorial when I try to run

roslaunch ur_bringup ur5_bringup.launch robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]

and

rosrun ur_driver test_move.py

When I run the roslaunch command from the ~/catkin_ws directory I get the error

[ur5_bringup.launch] is neither a launch file in package [ur_bringup] nor is [ur_bringup] a launch file name

However, I have been able to get it to launch once by switching to the ~/catkin_ws/src/ur_modern_driver/launch directory and omitting ur_bringup at the start of the command, but the rosrun command would not do anything on the arm. Coming back after the weekend and trying to run the same thing I get an

Error connecting to get firmware version

So I appear to be back at square one trying to get roslaunch to work.

I'm not sure if this would be an issue, but the computer I am currently running from is not connected to the internet when I run commands because there is only one ethernet port which needs to be connected to the UR5. I have made sure to run source devel/setup.bash before the roslaunch command and have checked that the .launch files do in fact exist in the launch folder.

Any insight / ideas are greatly appreciated!

Cheers,

Pawel

[UPDATE]

After trying the suggested line roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=IP.OF.YOUR.UR I get the same sort of error as before with the Error connecting to get firmware. It appears that it is trying to use the UR3 driver for some reason? Once again I made sure to run source ~/catkin_ws/devel/setup.bash beforehand. I pasted the error below...

auto-starting new master
process[master]: started with pid [4135]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to a2d5b39c-7a9d-11e6-b304-001cc0933a57
process[rosout-1]: started with pid [4148]
started core service [/rosout]
process[robot_state_publisher-2]: started with pid [4151]
process[ur_driver-3]: started with pid [4152]
[FATAL] [1473872815.699936438]: Error connecting to get firmware version
terminate called after throwing an instance of 'std::system_error'
  what():  Invalid argument
[ur_driver-3] process has died [pid 4152, exit code -6, cmd     /home/robots/catkin_ws/devel/lib/ur_modern_driver/ur_driver __name:=ur_driver     __log:=/home/robots/.ros/log/a2d5b39c-7a9d-11e6-b304-001cc0933a57/ur_driver-3.log].
log file: /home/robots/.ros/log/a2d5b39c-7a9d-11e6-b304-001cc0933a57/ur_driver-3*.log
edit retag flag offensive close merge delete

Comments

May I suggest a topic title change? While you mention test_move.py in your question, the real issue seems to be with getting the launch file to start, and getting the driver to communicate with your controller. If that works, then I would start looking at test_move.py.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-12 14:40:46 -0600 )edit

Note btw that the tutorial you linked is for the packages in universal_robotonly. The ur_modern_driver is (currently still) a package separate from that repository. Copy/pasting the commands from the tutorial will not work, as you found out.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-12 14:45:00 -0600 )edit

Thanks, I made the change to the title. I know that the tutorial was for universal_robot, but I remember that the ur_modern_driver git mentioned that it was meant to be a drop-in replacement. I thought that it should have worked the same in that case?

Pawel gravatar image Pawel  ( 2016-09-13 10:06:27 -0600 )edit

It is a drop-in replacement, but not if you try to start a launch file from ur_bringup: those launch files will be using ur_driver, not ur_modern_driver. Hence my comment that you can't (just) copy/paste.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-13 10:25:21 -0600 )edit

It would perhaps be an idea to verify first that ur_modern_driver is compatible with Polyscope version 3.3.0.145: perhaps you could ask that on the ur_modern_driver github issue tracker?

gvdhoorn gravatar image gvdhoorn  ( 2016-09-13 10:26:48 -0600 )edit

Thanks for the idea, I'll get right on that!

Pawel gravatar image Pawel  ( 2016-09-13 10:58:29 -0600 )edit

It appears that it is trying to use the UR3 driver

no, it's not. The filename of the log if just ur_driver-3<and something>.log. That has nothing to do with UR3s.

Besides: there is no such thing as a UR3 driver: the driver is arm agnostic, only the controller matters.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-14 12:51:48 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2016-09-14 10:08:44 -0600

Miguel Prada gravatar image

First of all, If you want to use the ur_modern_driver, which you must if you're running PolyScope 3.X, you should use the launchfiles from that package. Instead of roslaunch ur_bringup ur5.... Try with

roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=IP.OF.YOUR.UR

For testing, I'd say the test_move.py in ur_driver should work fine once the driver is running (i.e. do not kill the driver to run the next command, but do it in a new terminal instead). However, it might make your life easier if you try with the test_move.py script in the modern driver package with

rosrun ur_modern_driver test_move.py

On the second half of your question, you mention several issues (e.g. roslaunch failing to find ur_bringup, the error about failing to get the firmware version, stuff magically behaving differently after the weekend) which suggest you're not being careful enough when trying this. Please, try the two commands I typed for you above, in separate terminals, making sure to run source ~/catkin_ws/devel/setup.bash in each terminal before either the roslaunch or rosrun commands, and report back with any errors you encounter.

edit flag offensive delete link more

Comments

Thanks for the quick reply! I tried that out and seem to be getting the same error. I made an update to the post with the error printout. It appears that it is trying to use the UR3 driver for some reason.

Pawel gravatar image Pawel  ( 2016-09-14 12:26:06 -0600 )edit
0

answered 2016-09-14 12:55:53 -0600

gvdhoorn gravatar image

After trying the suggested line roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=IP.OF.YOUR.UR I get the same sort of error as before with the Error connecting to get firmware

Just to make sure: you are replacing IP.OF.YOUR.UR with the actual IP address of your robot's controller, right?

The ur_modern_driver prints out the error message "Error connecting to get firmware version" if it can't connect to the controller (here). It doesn't actually check the version yet at that point (error message is slightly confusing).

edit flag offensive delete link more

Comments

Yes I am replacing it with the IP of my robot and I can ping it successfully as well.

Pawel gravatar image Pawel  ( 2016-09-14 13:26:12 -0600 )edit
0

answered 2016-09-14 15:52:07 -0600

Pawel gravatar image

So this was a two part problem....

First Miguel Prada's answer was correct that I was running the wrong commands. The issue I mentioned in the update was due to some network settings that had changed after reinstalling ubuntu. After fixing that I can get roslaunch to work. I am still having an issue with rosrun, but I will make a new post about that problem.

Thank you everyone for the help!

edit flag offensive delete link more

Comments

Good to hear you got it to work.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-15 00:46:06 -0600 )edit
1

For the future (and slightly pedantic): roslaunch and rosrun are just general ROS commands. Please refer to things (nodes, launch files, scripts) by their own names, as otherwise your question(s) can be confusing (ie: roslaunch works fine, it was basically user error that caused the problem).

gvdhoorn gravatar image gvdhoorn  ( 2016-09-15 00:46:49 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-09-12 14:08:03 -0600

Seen: 3,339 times

Last updated: Sep 15 '16