0
$\begingroup$

Rosanswers logo

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 " 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


Originally posted by bsk on ROS Answers with karma: 73 on 2016-05-10

Post score: 0


Original comments

Comment by Orhan on 2016-05-10:
Can you connect other USB devices to Virtualbox?

Comment by bsk on 2016-05-10:
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

Comment by Orhan on 2016-05-10:
What are Virtual Computer's and laser scanner's IPs?

Comment by bsk on 2016-05-10:
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?

Comment by Orhan on 2016-05-10:
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>).

Comment by Orhan on 2016-05-10:
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.)

Comment by bsk on 2016-05-10:
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

Comment by Orhan on 2016-05-10:
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 :)

Comment by bsk on 2016-05-10:
i did it and the results are like these...PING 169.254.10.200 (169.254.10.200) 56(84) bytes of data.

^C --- 169.254.10.200 ping statistics --- 9 packets transmitted, 0 received, 100% packet loss, time 7999ms

Comment by Orhan on 2016-05-10:
Alright, You can't ping to device, so there is a network problem. What's your IP adress? Can you write?

Comment by bsk on 2016-05-10:
It was 194.27.66.92 when i run ifconfig code in the terminal.

Comment by cereensare on 2022-03-21:
Hi, I have lms141 laser scanner. I have the ubuntu 20.04 and I use noetic distro on my computer. I can't connect to laser by "rosrun lms1xx LMS1xx_node _host:=192.168.2.74". I took the laser's IP address from SOPAS and set the computer's IP address but it did't work. I checked the rostopic list and it's same as basak's. What should I do? It's really complicated.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Orhan with karma: 856 on 2016-05-10

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by bsk on 2016-05-11:
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 :)

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by bsk with karma: 73 on 2016-05-11

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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