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.