File Exchange

image thumbnail

Hokuyo URG-04LX LIDAR Driver for MATLAB

version 1.1 (3.84 KB) by

This a simple driver for the Hokuyo URG-04LX USB LIDAR for MATLAB.

11 Downloads

Updated

View License

The files establish a serial comm link with Lidar with the required settings. The function LidarScan.m is called with serial communication object as argument to return a range vector consisting of decoded Lidar Scan data.

It returns the data after a full scan (-120 to +120 degrees) with 682 points.

Edit SetupLidar.m with the correct COM Port to use this file.

The file is a quick and easy way to stream range data from a Hokuyo Lidar in the MATLAB environment.

It works well for the URG-04LX as the decoder function supports only two and three bit encoding.

Comments and Ratings (4)

AlxGeek

I am trying to use this matlab 2012a but it gives some warnings. I set the COM port properly and run the setupLidar program.

this is the output:

 SetupLidar

   Serial Port Object : Serial-COM4

   Communication Settings
      Port: COM4
      BaudRate: 9600
      Terminator: 'LF'

   Communication State
      Status: closed
      RecordStatus: off

   Read/Write State
      TransferStatus: idle
      BytesAvailable: 0
      ValuesReceived: 0
      ValuesSent: 0
 
Warning: Unsuccessful read: A timeout occurred before the Terminator was
reached.

ans =

SCIP2.0
0Ee

Warning: Unsuccessful read: A timeout occurred before the Terminator was
reached.

ans =

VV
00P
VEND:Hokuyo Automatic Co.,Ltd.;[
PROD:SOKUIKI Sensor URG-04LX;[
FIRM:3.3.00(16/Apr./2008);k
PROT:SCIP 2.0;N
SERI:H0611590;K

Warning: Unsuccessful read: A timeout occurred before the Terminator was
reached.

ans =

BM
02R

Can anyone give me the solution for this problem and instruction to print all scanned data points.

Thanking you.

Jong-Hwan Kim

Jong-Hwan Kim (view profile)

Awesome~! Could you make it for Hokuyo UTM-30LX as well?

Updates

1.1

Corrected a typo in the Lidar name. The Lidar is from Hokuyo and not Hokuyu.

MATLAB Release
MATLAB 7.10 (R2010a)
Acknowledgements

Inspired: MATLAB Driver for Hokuyu URG family

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Hokuyu URG-04LX driver for MATLAB/Hokuyu Lidar driver/