Hokuyou laser ranger finder
UTM-30LX (sensor for intelligent robots)
- RobotsinSearch is offering the lowest
price for Hokuyo UTM-30LX scanner.
- Suitable for robots with higher moving speed because of
the longer range and fast response.
- 30m and 270° scanning range.
- Long Detection range: 30m
- Wide Angle: 270°
- Hokuyo’s UTM-30LX
detectable range is 100mm to 30,000mm (30m!)
- 25msec/scan
- 12V operating voltage
- 270° area scanning range with 0.25° angular
resolution
- USB2.0 interface
- Outdoor Environment
- Compact and Light: W60xD60xH87mm, 370g
- Lowest Price.
Product Specifications
|
Model No. |
UTM-30LX |
|
Power source |
12VDC±10%(Current consumptlon:Max:1A,Normal:0.7A) |
|
Light source |
Semiconductor laser diode(?=785nm) Laser safety Class
1(FDA)
|
|
Detection Range |
0.1 to 30m(White Square Kent Sheet 500mm or
more),Max.60m 270° |
|
Accuracy |
0.1 to 10m:±30mm, 10 to 30m:±50mm*1 |
|
Angular Resolution |
0.25°(360°/1,440 steps) |
|
Scan Time |
25msec/scan |
|
Sound level |
Less than 25dB |
|
Interface |
USB2.0(Full Speed) |
|
Synchronous output |
NPN open collector |
|
Command system |
Exclusively designed command SCIP Ver.2.0 |
|
Connection |
Power and Synchronous output:2m flying lead wire USB:2m cable with
type-A connector |
|
Amblent(Temperature/Humidity) |
-10 to +50 degrees C, less than 85%RH(without dew and frost) |
|
Vibration Resistance |
Double amplitude 1.5mm 10 to 55Hz, 2 hours each in X, Y and Z
direction |
|
Impact Resistance |
196m/s2, 10 times in X, Y and Z direction |
|
Weight |
Approx. 370g(with cable attachment) |
*1.This accuracy could be less reliable if the sensor receives strong light
such as sun light directly in the outdoor environment.
Note) This sensor is not a safety device/tool.
Note) This
sensor is not for use in military applications.
Downloads
This example shows how to access a HOKUYO laser scanner and retrieve scans.
It makes use of the class hwdrivers::CHokuyoURG, which is in the lib_hwdrivers library.
This program can be found in the MRPT source tree at
/samples/HOKUYO_laser_test/.
This class works for both versions of the device, URG-04 and UTM-30LX
(starting at version MRPT 0.6.0). It will automatically detects the version of
the device, then adapts to query the correct amount of scan points.
Basically, the required steps are (refer to the sample code):
- Setup a serial port connection, using a hwdrivers::CSerialPort object. To create this serial port
object, pass to it the correct serial port name, e.g. COM4 in Windows, or
ttyUSB0 for Linux (names may change for different distributions,...). It may
be also something like ttyACM0. Note that the whole path (e.g. /dev/ttyACM0)
is not required, it will be generated as necessary. The same applies to
Windows serial ports above COM4, you can use the full names (e.g. \.COM14)
but the MRPT library will add the prefix if necessary, so you can always use
the simpler names "COMXX".
- Bind the serial port to the HOKUYO laser interface, using
bindIO()
.
- Setup communications and turn the laser on, with
turnOn() .
- Invoke in a timely fashion the method
doProces(), which
processes incoming bytes, builds frames according to the required format, and
returns scan data.
There are some options that can be loaded before calling "turnOn()":
[supplied_section_name]
COM_port_WIN = COM3
COM_port_LIN = ttyS0
pose_x=0.21 ; Laser range scaner 3D position in the robot (meters)
pose_y=0
pose_z=0.34
pose_yaw=0 ; Angles in degrees
pose_pitch=0
pose_roll=0
HOKUYO_motorSpeed_rpm=600 ; (Optional)
Check also the ready-to-use application RawLogGrabber,
which allows gathering data in rawlog format from any number of devices
simultaneously.
Screenshot of the example (on Windows)
2 Source Code
This example can be found in MRPT/samples/HOKUYO_laser_test/, or
browse it at:
http://babel.isa.uma.es/mrpt-browse-code/mrpt-0.6.5/samples/HOKUYO_laser_test/test.cpp
online
/* +---------------------------------------------------------------------------+
| The Mobile Robot Programming Toolkit (MRPT) C++ library |
| |
| http://mrpt.sourceforge.net/ |
| |
| Copyright (C) 2005-2008 University of Malaga |
| |
| This software was written by the Machine Perception and Intelligent |
| Robotics Lab, University of Malaga (Spain). |
| Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
| |
| This file is part of the MRPT project. |
| |
| MRPT is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
| the Free Software Foundation, either version 3 of the License, or |
| (at your option) any later version. |
| |
| MRPT is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
| |
| You should have received a copy of the GNU General Public License |
| along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
| |
+---------------------------------------------------------------------------+ */
#include <mrpt/core.h>
#include <mrpt/hwdrivers/CHokuyoURG.h>
#include <mrpt/hwdrivers/CSerialPort.h>
#include <mrpt/hwdrivers/CSickLaserUSB.h>
using namespace mrpt;
using namespace mrpt::hwdrivers;
using namespace mrpt::slam;
using namespace mrpt::gui;
using namespace mrpt::utils;
using namespace std;
string SERIAL_NAME; // Name of the serial port to open
// ------------------------------------------------------
// Test_HOKUYO
// ------------------------------------------------------
void Test_HOKUYO()
{
CHokuyoURG laser;
string serName;
cout << "HOKUYO laser range finder test application." << endl << endl;
if (SERIAL_NAME.empty())
{
cout << "Enter the serial port name (e.g. COM1, ttyS0, ttyUSB0): ";
getline(cin,serName);
}
else
{
cout << "Using serial port: " << SERIAL_NAME << endl;
serName = SERIAL_NAME;
}
// Set the laser serial port:
laser.m_com_port = serName;
// Load config:
CConfigFile cfgFile("./LASER_SCAN_TEST.INI");
laser.loadConfig( cfgFile,"HOKUYO#1" );
printf("[TEST] Turning laser ON...n");
if (laser.turnOn())
printf("[TEST] Initialization OK!n");
else
{
printf("[TEST] Initialization failed!n");
return;
}
#if MRPT_HAS_WXWIDGETS
CDisplayWindowPlots win("Laser scans");
#endif
cout << "Press any key to stop capturing..." << endl;
CTicTac tictac;
tictac.Tic();
while (!mrpt::system::os::kbhit())
{
bool thereIsObservation,hardError;
CObservation2DRangeScan obs;
laser.doProcessSimple( thereIsObservation, obs, hardError );
if (hardError)
printf("[TEST] Hardware error=true!!n");
if (thereIsObservation)
{
double FPS = 1.0 / tictac.Tac();
printf("Scan received: %u ranges, FOV: %.02fdeg, %.03fHz: mid rang=%fmn",
(unsigned int)obs.scan.size(),
RAD2DEG(obs.aperture),
FPS,
obs.scan[obs.scan.size()/2]);
obs.sensorPose = CPose3D(0,0,0);
mrpt::slam::CSimplePointsMap theMap;
theMap.insertionOptions.minDistBetweenLaserPoints = 0;
theMap.insertObservation( &obs );
//map.save2D_to_text_file("_out_scan.txt");
/*
COpenGLScene scene3D;
opengl::CPointCloudPtr points = opengl::CPointCloud::Create();
points->loadFromPointsMap(&map);
scene3D.insert(points);
CFileStream("_out_point_cloud.3Dscene",fomWrite) << scene3D;
*/
#if MRPT_HAS_WXWIDGETS
vector_float xs,ys,zs;
theMap.getAllPoints(xs,ys,zs);
win.plot(xs,ys,".b3");
win.axis_equal();
#endif
tictac.Tic();
}
system::sleep(5);
};
laser.turnOff();
}
int main(int argc, char **argv)
{
try
{
if (argc>1)
{
SERIAL_NAME = string(argv[1]);
}
Test_HOKUYO();
return 0;
} catch (std::exception &e)
{
std::cout << "EXCEPCION: " << e.what() << std::endl;
return -1;
}
catch (...)
{
printf("Another exception!!");
return -1;
}
}