0
$\begingroup$

Rosanswers logo

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!


Originally posted by psprox96 on ROS Answers with karma: 97 on 2015-06-17

Post score: 0


Original comments

Comment by SQ on 2016-03-29:
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! :)

Comment by psprox96 on 2016-03-29:
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.

Comment by psprox96 on 2016-03-29:
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.

Comment by psprox96 on 2016-03-29:
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?

Comment by SQ on 2016-03-29:
Hi thanks for replying! My IP address is 192.168.0.100 for WiFi and 192.168.0.15 for the UST

Comment by psprox96 on 2016-03-29:
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.

Comment by psprox96 on 2016-03-29:
Or is it that you are facing other errors?

Comment by SQ on 2016-03-30:
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

Comment by psprox96 on 2016-03-30:
Can you type sudo nano /etc/network/interfaces and verify the interface? Are you still able to connect to WiFi?

Comment by psprox96 on 2016-03-30:
If you check and everything is identical to mine, try: sudo ifconfig eth0:0 192.168.0.15 up

this will disable your internet connection. Try connecting to hokuyo now.

To enable internet: sudo ifconfig eth0:0 192.168.0.15 down

Comment by SQ on 2016-03-30:
ok my project supervisor did something similar to that and it solved the problem. Thank u so much for your help!

Comment by psprox96 on 2016-03-30:
Thats great. Wish you all the best!

Comment by AutoCar on 2018-07-20:
Does you method enable us to use laser and WIFI at the same time? Sounds like it does not

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by ahendrix with karma: 47576 on 2015-06-17

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by psprox96 on 2015-06-17:
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.

Comment by ahendrix on 2015-06-17:
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 ?

Comment by psprox96 on 2015-06-17:
Wow i can try that! Thanks for your help!

Comment by malgudi on 2018-06-19:
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?

$\endgroup$

Your Answer

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