Ask Your Question
0

/etc/network/interfaces configuration for urg node

asked 2015-06-17 00:36:54 -0500

psprox96 gravatar image

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!

edit retag flag offensive close merge delete

Comments

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! :)

SQ gravatar imageSQ ( 2016-03-29 03:02:45 -0500 )edit

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.

psprox96 gravatar imagepsprox96 ( 2016-03-29 10:12:52 -0500 )edit

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.

psprox96 gravatar imagepsprox96 ( 2016-03-29 10:15:59 -0500 )edit

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?

psprox96 gravatar imagepsprox96 ( 2016-03-29 10:58:58 -0500 )edit

Hi thanks for replying! My IP address is 192.168.0.100 for WiFi and 192.168.0.15 for the UST

SQ gravatar imageSQ ( 2016-03-29 21:01:51 -0500 )edit

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.

psprox96 gravatar imagepsprox96 ( 2016-03-29 22:50:22 -0500 )edit

Or is it that you are facing other errors?

psprox96 gravatar imagepsprox96 ( 2016-03-29 22:50:43 -0500 )edit

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

SQ gravatar imageSQ ( 2016-03-30 00:11:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-06-17 01:04:17 -0500

ahendrix gravatar image

What is the IP address range for your Wifi network?

I suspect you have overlapping IP address ranges for your Hokuyo and your Wifi network.

edit flag offensive delete link more

Comments

Hi there! I checked my Wifi's connection information and the IPv4 is 192.168.0.111. My Hokuyo's IP is 192.168.0.10.

psprox96 gravatar imagepsprox96 ( 2015-06-17 02:22:21 -0500 )edit

Yes, your IP address ranges overlap (both are 192.168.0.X). If you can, try changing the IP address of your Hokuyo and the IP of the eth0:0 interface that you use to connect to it. Maybe use 192.168.7.10 and 192.168.7.15 ?

ahendrix gravatar imageahendrix ( 2015-06-17 02:27:03 -0500 )edit

Wow i can try that! Thanks for your help!

psprox96 gravatar imagepsprox96 ( 2015-06-17 02:42:13 -0500 )edit

Hi psprox96. i am also facing same problem. My wifi address is 172.16.x.x and eth0 address is 192.168.x.x but its not working. Could you tell me where am I going wrong?

malgudi gravatar imagemalgudi ( 2018-06-19 02:59:57 -0500 )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

Stats

Asked: 2015-06-17 00:36:54 -0500

Seen: 3,985 times

Last updated: Jun 17 '15