User Tools

Site Tools


3. Using a hokuyo LIDAR with ROS

Figure 1. UTM-30LX-EW

Above we are seeing the picture of a Laser range finder(LIDAR). This particular LIDAR model which is called Hokuyo UTM-30LX-EW. It is used in the sensor head designed for the humanoid hubo to perform driving for the DARPA robotics challenge to be held in December 2013. Below is a picture of the sensor head developed by Dr.Rasmussen,University of Delaware for the humanoid hubo. There are other kinds of hokuyo lidar in the market but the one discussed here stands apart from others due to “ Multi-Echo Detection”. Here is the link for other kinds of hokuyo lidar. Scroll down to see the list of lidar available. This tutorial demonstrates how to use the hokuyo LIDAR with ROS(Robot operating system) in Ubuntu,Linux. It will take about 10-15 minutes to complete this tutorial.

Figure 2. Sensor head model for the driving task of DRC.

Motivation and audience

This tutorial’s motivation is to guide user on how to access a hokuyo LIDAR device using ROS. Robot Operating System is a well known term in the modern robotics era. The software for the sensor head(shown in figure 2) is being developed in ROS. Tutorial on how to install ROS and programming ROS is beyond the scope of this tutorial. This tutorial assumes the following from the user side:

  • Should have a basic knowledge in ROS.
  • Desire and patience to learn 3D computer vision concepts and use it in robotics related project.
  • Intermediate knowledge in C/C++.

The rest of the tutorial is presented as follows:

  • Parts and necessary configuration.
  • Getting started.
  • Reading from the Lidar.
  • Setting up RVIZ and viewing the point clouds
  • Final words.
  • References.

Parts and necessary configuration

For completing this tutorial, you’ll need the following items:

Getting Started

Now lets visualize the point clouds from the laser sensor in rviz. This is the package which contains the driver for the hokuyo lidar.

Click the given link and download the file into your ros work-space.

Reading from the Lidar

1. Power up the lidar and connect the lidar to your computer through the Ethernet interface. 2. The Led lights should be blinking. 3. Open up a terminal and enter the following commands one by one:

roscd urgwidget_wrapper
cd bin

4.Open up a new terminal and enter:

rostopic list

you will see a topic called “\scan”.

5.Now enter

rostopic echo \scan

you should see numbers popping up in the screen. These are the intensity values for 270 degree sweep.

Setting up RVIZ and viewing the point clouds

Now we got the lidar working and lets visualize it in rviz.

rosrun rviz rviz

1.Click the add button in the bottom left of the rviz window and search for “LaserScan” in the displayed list.<br> 2.Now LaserScan title will be added to the rviz. Click on the topic option and the topic “\scan” should be present there. Double click on “\scan”.<br> 3. You should be able to see the point clouds in the display window.

Final words

We effectively used ROS for accessing data from the hokuyo lidar. We also how to interface with a hokuyo unit and ones personal computer. In the next tutorial, I will be teaching how to use a dynamixel motor with a lidar to achieve full scan of the environment. For any questions, email

drexel_hokuyo_ros.txt · Last modified: 2016/10/31 21:59 by dwallace