LIDAR interfacing in ROS!

Hey guys! Its been time since the last post.  I have been busy in some studies and other projects.  But yeah I have got another cool project this time and it is related to Robotics!

Yeah, Robotics, this is the first time I am starting with robotics.  Trying to make out a Turtle bot thing.

Collecting the material and resources for such autonomous body(I am inserting a few of my things), I got a LIDAR,  the lidar is hokoyu URG04lx.  The lidar is working on a lot of data and the processing is also very fast.  The inbuilt controller in the lidar actually takes care of the laser thing and finally gives us the distance via serial communication.  The Serial port is hidden as the Lidar is made USB compatible with a driver in there lidar itself.  So it becomes a direct USB plug n play thing.

In linux, the device may appear as /dev/ACM0 or something.

The documents says : The light source of the sensor is infrared laser of wavelength 785nm with laser class 1 safety. Scan area is 240 degrees semicircle with maximum radius 4000mm. Pitch angle is 0.36 degree and sensor outputs the distance measured at every point (683 steps). Laser beam diameter is less than 20mm at 2000mm with maximum divergence 40mm at 4000mm.
Principle of distance measurement is based on calculation of the phase difference, due to which
it is possible to obtain stable measurement with minimum influence from object’s color and


And also, as per the specifications the document on the “” says,
this lidar will take 500mA of current or less and on start 800mA.
But I really find this data wrong, as my multimeter showed current values upto 700-800mA for continous.  So I tried powering it with standard 7805 but it started to trip and as usual heatup.

So, I am using any other supply having or giving 5V as output where the driver is capable of giving a little more than 1A of current regular.  A 2576 based supply is used here.

Pinout of the lidar was


The device will respond as Communication Device Class if tried interfacing with some microcontroller with USB HOST drivers.  The rest of the communication protocol is pretty self explanatory.   If your device is with older firmware version or with the later the interfacing protocol is more or less the same.

Here is the sample data packet in between the ROS and hokuyo_lidar

seq: 3355
secs: 1378068609
nsecs: 934898000
frame_id: laser
angle_min: -1.57079637051
angle_max: 1.56466042995
angle_increment: 0.00613592332229
time_increment: 9.76562514552e-05
scan_time: 0.10000000149
range_min: 0.019999999553
range_max: 5.59999990463
ranges: [0.0, 0.0, 0.13199999928474426, 0.13199999928474426, 0.13199999928474426, 0.13199999928474426,……………………………………………………………………………………..(this conatins a lot of data)

The full file is here along with the other documents:

This is video that I made for the sole purpose of displaying the steps for bringing up the lidar.  Once you  initiallises the lidar via the hokuyo_node, it starts throwing data on scan and laser topics.



About Beyond

an electronics hobbyst, 8 bit microcontroller(8051/AVR/Arduino) programmer, Linux lover, in love with Embedded Linux systems ... TGL: just push it "BEYOND THE LIMITS"..

Posted on October 25, 2013, in Embedded Linux, Embedded Systems and tagged , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s