Ask Your Question
0

connecting to laser too long and nothing happens (after reinstallation virtualbox & ubuntu)

asked 2016-05-10 05:45:44 -0600

bsk gravatar image

updated 2016-05-10 15:08:00 -0600

hi everyone,

i have lms100 laser scanner, a few days ago i can connect with laser by "rosrun lms1xx LMS1xx_node" code. yesterday i decided to delete everything like ubuntu in virtualbox and virtualbox itself ( because i have not enough space and didnt manage to expand actual size). Then i installed everything again (vitualbox, ubuntu, ros and ofcourse lms1xx). Everything was ok, but when i try to connect laser by the same way, it said "connecting to laser at <ip of="" laser="">" but nothings happen, the process is sooo long, after ~5 min it says [ WARN] [1462876612.290873681]: Unable to connect, retrying.

i dont know what's wrong, what did i forget to do?

update: i checked in "rostopic list" in another terminal, and it responds like

/rosout /rosout_agg /scan

so i tried "rostopic info /scan" and respond was

Type: sensor_msgs/LaserScan

Publishers: * /lms1xx ( http://basak-VirtualBox:43812/ )

Subscribers: None

Thanks, Basak

edit retag flag offensive close merge delete

Comments

Can you connect other USB devices to Virtualbox?

Orhan gravatar imageOrhan ( 2016-05-10 05:53:09 -0600 )edit

I didnt try before because i didnt need it. I connect laser sensor via ethernet...but now i tried to connect usb and it can connect

bsk gravatar imagebsk ( 2016-05-10 06:06:48 -0600 )edit

What are Virtual Computer's and laser scanner's IPs?

Orhan gravatar imageOrhan ( 2016-05-10 06:59:44 -0600 )edit

I know the IP's of laser scanner and when i made a connection with laser scanner in ros i wrote the IP of laser but i dont know what is the IP of virtual computer...you think my problem is because of IP's?

bsk gravatar imagebsk ( 2016-05-10 10:08:59 -0600 )edit

May be. You can see your ip via ifconfig command. You should probably see the eth0 section. Also You don't need port number if you are using port in your launch file. (for ex: 192.168.0.1:<PORT_NUMBER>).

Orhan gravatar imageOrhan ( 2016-05-10 10:40:48 -0600 )edit

And be sure your laser and computer on the same network (Both IPs are 192.168.1.x or Both 192.168.0.x etc.)

Orhan gravatar imageOrhan ( 2016-05-10 10:41:53 -0600 )edit

is "inet addr" my virtual computer's IP? if so, they are different...but i'm sure the IP of LMS100, i checked from its own program SOPAS...what should i do? kafayı yemek üzereyim :D

bsk gravatar imagebsk ( 2016-05-10 10:58:17 -0600 )edit

Yes, it is your ip adress. And it's be same without last part of it(192.168.1.x). Try ping command to your laser for finding what's going on, just open terminal on ubuntu and type: ping <ip of laser>. And Forum's language is English, We must use English only :)

Orhan gravatar imageOrhan ( 2016-05-10 11:12:21 -0600 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2016-05-11 01:36:13 -0600

bsk gravatar image

I solved this. When i was rethinking what did i do differently in this installation and i found it. It was my mistake which i made in reinstallation. When i reinstall virtualbox and ubuntu by watching a tutorial video, i chose "bridged adaptor" in network section by following that tutorial and it leads me into this problem. So i changed bridged adaptor to original version which is NAT, the problem is solved. Now i can ping the laser's IP and i can connect with it.

edit flag offensive delete link more
1

answered 2016-05-10 16:03:40 -0600

Orhan gravatar image

updated 2016-05-10 16:05:02 -0600

To setup eth0 to static, open /etc/network/interfaces via gedit or nano in command line:

nano /etc/network/interfaces

Then, edit file with these informations (I assigned 3, You can select 1-254 and different from laser, 200):

auto eth0
iface eth0 inet static
address 192.254.10.3 
netmask 255.255.255.0
gateway 192.254.1.254

Then save file with Ctrl + X with nano, and type this commands on terminal,

sudo service network-manager restart

The Computer may not be connect to internet after doing this, Try changes above, Try ping to laser:

ping 192.254.10.200

If it will / won't works, change the file to

auto eth0
iface eth0 inet dhcp

And also sudo service network-manager to restart network, then Internet will be up. Write here If it works or not.

edit flag offensive delete link more

Comments

1

you were right it was network problem...i didn't have a chance to try your solution but thanks to you i realize what was the problem. thank you a lot for your help :)

bsk gravatar imagebsk ( 2016-05-11 01:42:35 -0600 )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

Stats

Asked: 2016-05-10 05:45:44 -0600

Seen: 123 times

Last updated: May 11 '16