0
$\begingroup$

Rosanswers logo

Hi,

I am having some trouble trying to use UR3 with ROS-Kinetic. I was hopping I can get a little help.

I followed the instructions posted here.

My software setup is as follows:

  • Ubuntu 16.04 (Native Machine)
  • ROS Kinetic
  • UR_Software and Polyscope 3.4.0
  • ur_modern_driver on the kinetic-devel branch

For the hardware side, I followed this instructions. here

I am directly connecting the UR3 to my Linux PC through a Ethernet port located in the bottom of the UR3 control box.

I have enabled the network and set it up as static address as follows:

  • ip address 192.168.0.254
  • net mask 255.255.255.0
  • gateway 192.168.0.2

In my Linux PC I added a new profile for the UR3 connection, I set the method to manual and used the information posted above.

I than pinged the ip and I got a response.

ping 192.168.0.254

In the UR3 controller, the network had a "connected to network" message so I assumed I did this step correctly.

I than continued the instructions and ran:

$ sudo apt install ros-kinetic-ur-description

roslaunch ur_modern_driver ur3_bringup.launch robot_ip:=192.168.0.254

This is where I am receiving the error message I put in the title of this ticket.

ROS_MASTER_URI=http://localhost:11311
process[robot_state_publisher-1]: started with pid [3706]
process[ur_driver-2]: started with pid [3707]
[ INFO] [1559898682.404748254]: Setting up connection: 192.168.0.254:30003
[ERROR] [1559898682.404906903]: Connection setup failed for 192.168.0.254:30003
[ INFO] [1559898682.404926848]: Setting up connection: 192.168.0.254:30001
[ERROR] [1559898682.405033532]: Connection setup failed for 192.168.0.254:30001
[ WARN] [1559898682.405060387]: Failed to read from stream, reconnecting in 1 seconds...

I was hopping I could get some assistance. I know I am doing something wrong but I do not know what it is.

Any tips or help will be highly appreciated.


Originally posted by Robotics123z on ROS Answers with karma: 26 on 2019-06-07

Post score: 0


Original comments

Comment by gvdhoorn on 2019-06-07:
First thing to check: is 192.168.0.254 the IP of the robot or the IP of your own PC?

Comment by Robotics123z on 2019-06-09:
That is the IP I set for the robot in its teach pendant. I set it as static.

Am I supposed to set my PC's IP address?

Comment by gvdhoorn on 2019-06-10:\

Am I supposed to set my PC's IP address?

no, and I also don't believe I implied that. The .launch arg's name is even robot_ip.

Comment by gvdhoorn on 2019-06-10:
What is the output of:

nc 192.168.0.254 30003 > /dev/null

or

nc 192.168.0.254 30002 > /dev/null

also:

I than pinged the ip and I got a response.

can you show that response?

Please edit your original question using the edit link/button. Do not post comments with console output.

Comment by Robotics123z on 2019-06-10:
Hi gvdhoorn, thank you for your reply. I have found out the cause of the error message I had posted.

It was a simple and dumb mistake on my part. I will give more detail in the answer I will post following this comment. I apologize if I wasted your time.

Comment by gvdhoorn on 2019-06-10:\

I apologize if I wasted your time.

no need to apologise.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

When setting up the 1 to 1 connection from the UR3 to the PC, I made the mistake of setting both of them to the same IP address.

Since both devices had the same IP address, I would get the error message mentioned above.

Changing the IP address of my PC to 192.168.0.253 solved the issue.


Originally posted by Robotics123z with karma: 26 on 2019-06-10

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2019-06-10:
So can you explain how you were able to ping 192.168.0.254 before?

Comment by Robotics123z on 2019-06-10:
Sure, created a new network connection profile in my PC. I set the IP address manually and I used the IP address I set in my Robots teach pendant. After I did this I was able to connect to the robot. Using ping 192.168.0.254 I received 64 bytes from 192.168.0.254: icmp_seq=1 ttl=64 time=0.129 ms

Comment by Robotics123z on 2019-06-10:
I tried using the command you mentioned nc 192.168.0.254 30003 > /dev/null but in the terminal nothing was being outputted. I checked the file generated in /dev/null and it mentioned that I could not open it in gedit as it was not a regular file. Did I make a mistake here?

Comment by gvdhoorn on 2019-06-10:\

Sure, created a new network connection profile in my PC. I set the IP address manually and I used the IP address I set in my Robots teach pendant.

So why would you need to use sudo ifconfig now then?

re: nc: it's not supposed to generate any output. Unless something is wrong. Then it will print an error.

Comment by Robotics123z on 2019-06-10:\

So why would you need to use sudo ifconfig now then

When researching about this problem, I went through many tutorials like this one to check if I was missing a step somewhere. In the tutorial it mentioned

Select the IP Address entry box and put in an IP address. The first 3 sets of numbers should match the IP address you have on your computer

I understood it as my PC needed to have a different IP address then that of my robot but, it still needed to be under 192.168.1.

Comment by Robotics123z on 2019-06-10:
To be honest, I am not sure why this fixed my issue and I do not understand what the original issue was. All I understood that using sudo ifconfig fixed it. Should I change my answer?

Comment by gvdhoorn on 2019-06-10:
sudo ifconfig should not be necessary. You should be able to configure your network configuration normally and not need to run a command line tool every time you start your computer (as that is going to be needed afaict).

If you can provide some more information on your network configuration (ie: how many network cards, if a single one: is it also used for internet access, etc), then perhaps we can provide you with a more convenient setup.

But do understand this has nothing to do with either ROS or the ur_modern_driver. It's basic networking.

Comment by Robotics123z on 2019-06-10:
It is just a normal tower and the Ethernet cable is being directly connected to the motherboard as well as UR3's Ethernet port located in the bottom of the control box.

But do understand this has nothing to do with either ROS or the ur_modern_driver. It's basic networking.

I think this is the case. Before, I was not sure if it was an issue with ur_modern_driver, UR3 itself, or just an error on my part. I tried reading the manuals as well as forums but I lack to much knowledge in all parts needed to use UR3 with ROS. I am sorry for troubling you.

Comment by Robotics123z on 2019-06-10:
I forgot to mention this but the PC (tower) has no internet access. It is directly being connected to the robot.

Comment by gvdhoorn on 2019-06-10:
Please stop apologising. There is no need.

If this is a direct 1-to-1 connection with no need for internet connectivity over the same link, then just configure a static IP on your PC as well using the network manager in Ubuntu. There would be no need for ifconfig.

Make sure both the PC and the CB3 of the UR are in the same subnet (ie: "under 192.168.1"). You already have a candidate IP (192.168.1.253), so you could use that. Set Subnet Mask to 255.255.255.0. You can leave the gateway empty. Remove the gateway setting on the CB3.

If you want to lookup further information on networking, don't restrict yourself to the UR controller. As far as the network is concerned, it acts just like any other host on a TCP/IP network.

Comment by Robotics123z on 2019-06-10:\

then just configure a static IP on your PC as well using the network manager in Ubuntu.

Understood. Thank you very much. It seems the step I was missing was to set the Static IP of my PC.

You can leave the gateway empty. Remove the gateway setting on the CB3.

I will make sure to do this. I will also study up on networking.

Again thank you for your support.

Comment by gvdhoorn on 2019-06-11:
Could you please update your answer once/if you get everything to work without needing ifconfig?

Note: there is a legitimate use-case for ifconfig: if you want to keep your network connection on automatic but also need to add a static IP to the same connection. That is not the case here, hence my suggestion to not use ifconfig.

Comment by Robotics123z on 2019-06-11:\

Could you please update your answer once/if you get everything to work without needing ifconfig?

Sure. I updated it for now stating what the issue was and how I was able to solve it. I have not yet updated to tell how exactly I did this though, as I am still learning about networking.

I will update the answer again once I have a step by step process on how I managed to do this.

Comment by gvdhoorn on 2019-06-11:\

I will update the answer again once I have a step by step process on how I managed to do this.

This is not very difficult. See HowtoForge/Setting a static IP on Ubuntu: a beginner's guide: Configuring IP address using the Desktop Application for one page showing you how to do this.

Comment by Robotics123z on 2019-06-11:\

This is not very difficult. See

I finally understood what I was doing wrong. When setting the connection (Configuring IP address using the Desktop Application), I was using the Robot's IP address rather then setting up my PC's address.

I originally thought that if I wanted to connect to the robot, I needed to tell the PC which IP the robot was using.

So basically both the Robot and my PC had the same IP address hence why the Robot could not connect.

Hopefully my understanding is correct now.

Comment by gvdhoorn on 2019-06-12:
Ok. This was actually exactly why I asked:

First thing to check: is 192.168.0.254 the IP of the robot or the IP of your own PC?

in my first comment.

Good to hear you have solved it.

Comment by Robotics123z on 2019-06-12:
Yea I did not understand your first comment at first but now I get it.

Thank you for all your help and support. I appreciate it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.