# How to connect ethernet based Hokuyo scanner?

This is a very basic beginner question, I know, but I am having trouble connecting to the Hokuyo UST-10LX sensor and haven't really found much in terms of helpful documentation online.

I tried connecting the Hokuyo UST-10LX directly to the ethernet port of a Lubuntu 15.04 machine. The default settings of the Hokuyo UST-10LX are apparently: ip addr: 192.168.0.10 netmask: 255.255.255.0 gateway: 192.168.0.1

So, I tried going to the network manager and setting IPv4 settings manually, to have the ip addr be 192.168.0.9, netmask of 255.255.255.0, and gateway to 192.168.0.1. I also have a route set up to the settings of the scanner.

I then go into the terminal and run:

rosrun urg_node urg_node _ip_address:=192.168.0.10


and get this output:

[ERROR] [1444754011.353035050]: [setParam] Failed to contact master at [localhost:11311].  Retrying...


How might I fix this? I figure it's just a simple misunderstanding on my end, but through all my searching I couldn't find anything to get me up and running :(

Thank you for the help! :)

EDIT:

HighVoltage pointed out to me that I wasn't running roscore which was indeed the case. I was actually running into problems before that when I still had roscore up, and when I tried it again, this was the output of the rosrun command:

[ERROR] [1444828808.364581810]: Error connecting to Hokuyo: Could not open network Hokuyo:
192.168.0.10:10940
could not open ethernet port.


Thanks again!

• Can you ping the scanner? Does it have power? Oct 13 '15 at 20:41
• It doesn't respond when I ping it. The blue light is on, so I think it has proper power. I am sending 12V and 0V to V+ and V- respectively. Should I be sending 12V and -12V instead? Oct 13 '15 at 20:43
• Never mind, the label on the side of the sensor says 12/24V DC and gnd, so I should be okay. The sensor is also vibrating which implies that the motor is spinning properly. Oct 13 '15 at 20:51
• Are you plugged directly into the unit or are you using a switch/router? If it's powered on and you can't ping it I would say it's a networking problem. How does the manufacturer suggest you change the IP settings? Oct 13 '15 at 21:11
• You could also go to your router admin panel and check if scanner is visible from there or not. Oct 14 '15 at 10:45

Are you sure roscore is running? "Failed to contact master" is usually an issue with roscore not initializing.

If roscore indeed is running but you are still getting the message, check if ROS_MASTER_URI is set to something other than the default. Or run "rosnode list" and paste the output here.

• Thank you, you're right, that is why I ran into that problem; I forgot to run roscore before posting the question... I also should have mentioned that I don't see anything when I ping the scanner. I've updated the question with the output I get when I am running roscore. Oct 14 '15 at 13:23
• Okay, turns out I was just being silly.. As you say, roscore was critical. After doing that, I realized that my network settings were still off. Thanks again for the help. Oct 14 '15 at 14:23

You can also try Snark: https://github.com/acfr/snark which requires https://github.com/acfr/comma.

The name of the application is called hokuyo-to-csv. See --help -v for details.