/etc/network/interfaces configuration for urg node
Hi guys. I got problem with the network when im using urg_node for Hokuyo Laser Scan.
After running roscore, I start up urg_node with:
rosrun urg_node urg_node _ip_address:="192.168.0.10"
However im getting an error that states:
[ERROR] [1434516842.963885543]: Error connecting to Hokuyo: Could not open network Hokuyo:
192.168.0.10:10940
could not open ethernet port.
I looked this up at Google and many of them said to configure the IP address to 192.168.0.15.
So I edit /etc/network/interfaces with:
sudo nano /etc/network/interfaces
and replace the text with:
auto eth0:0
iface eth0:0 inet static
address 192.168.0.15
netmask 255.255.255.0
I tested the urg_node already and it's running.
However, another problem came up. I could not connect to internet. My wifi speed stucked at 1mb/s (using ubuntu now).
I came out with another solution by editing the interfaces file to:
auto eth0
iface eth0 inet dhcp
auto eth0:0
iface eth0:0 inet static
address 192.168.0.15
netmask 255.255.255.0
In this case, I can change to use eth0 (able to connect to WIFI but cannot run urg_node) and eth0:0 (cannot connect to WIFI but able to run urg_node) by using this two command:
sudo ifup eth0:0
(Set eth0:0)
sudo ifdown eth0:0
(Return back to eth0)
I was wondering whether there is a way I can combine these two function together, that is able to connect to WIFI and run urg_node.
Thanks for any help!
Hi i have the exact same issue here. I tried your method but it did not help. I'm using a UST 20LX. Any help? Thanks! :)
Hi there! Its been quite some time back since I did this project. However, I hope I can help you. I am using UST-20LX too. First of all, you can actually connect the laser to your computer through wired network. If im not wrong, you cant use internet too.
In order for you to connect to internet, you need to disconnect the wired network and connect to wireless. Thats a bit time consuming so I decided to do the above method. Hokuyo UST-20LX static IP is 192.168.0.10 while my WiFi connection is 192.168.0.10x. Therefore it clashes.
Thats why I need to create a new static ip of 192.168.0.15, leaving aside the wifi connection of 192.168.0.10x. May I know your internet connection IP?
Hi thanks for replying! My IP address is 192.168.0.100 for WiFi and 192.168.0.15 for the UST
If you follow this: auto eth0 iface eth0 inet dhcp
auto eth0:0 iface eth0:0 inet static address 192.168.0.15 netmask 255.255.255.0
there should be no problem.
After setting this network interface, you need to type sudo ifup eth0:0 to use laser and sudo ifdown eth0:0 to use WiFi.
Or is it that you are facing other errors?
Sorry i tried ur method and i got this: Cannot find device "eth0:0" Failed to bring up eth0:0. i realised my eth port is eth3 so i changed it accordingly and i still get the same results