NAOqi Sensors - Overview | API | Tutorial
See also
ALLaser Module retrieves data sent by the Laser head (optional device) and stores it in an ALMemory key named: Device/Laser/Value.
This module is fully autonomous.
Laser resolution is 0.0063 rad (0.36 degree). This means 683 laser points.
Laser data is refreshed every 100ms.
Limitations
Warning
The electrical drive of the laser scanning produces a significant level of noise close to the front microphone, which reduces the robot voice recognition performance when the laser is active. We recommend that you switch off the laser if voice recognition is required.
Due to mass differences between a standard head and a laser head be careful when running:
Warning
The fall hazard for these behaviors is high and could damage the laser head.
Checking hardware
If you want to check if the laser module works or if you need to know the effective efficiency of the hokuyo product, you can run the Laser Viewer for Monitor.
Data acquisition
To retrieve data, use a proxy to ALMemory and call the getData method with Device/Laser/Value as the parameter. If you are not familiar with this please consult getData function of ALMemory API.
The data stored in Device/Laser/Value is a 2 dimensional array, i by 4, where i is the index of measurement (maximum index i depends on the way we set ALLaser parameters).
For each index i :
Data | Meaning |
---|---|
Length and Angle | Obstacle position in polar coordinates. Length: Distance between laser and obstacles Angle: Computed value based on the index and urg device configuration |
X and Y | Obstacle coordinates in Cartesian space. x: abscissa y: ordinate |
Laser can be used for example to avoid obstacles or for SLAM (Simultaneous Localization And Mapping).
How to turn on/off laser?
It is possible to turn off the laser in order to free the cpu. The laserOff function of ALLaser turns off the laser light only, the motor will keep on turning.
How does the laser connect?
It connects via an URG-SCIP protocol on the USB-native (/dev/ttyACM0), then on the USB-serial (/dev/ttyUSB0). At the robot’s system start-up the URG device serial port is configured at 19200 baud or 115200 baud by laser_speed utility software, based on URG scip_handler library.
What version of URG is used in ALLaser?
URG official library 0.2. Available on the robot’s system: libc_system.so, libc_urg.so, libc_connection.so.
Where can I find URG example
Source code available on the hokuyo web site.
Can I plug the laser directly into my PC?
Yes, if you want to do some tests with your own computer, you have an access to its mini USB connector on the right side of the laser. If you do so, you have to write the connection and retrieve data code on your own.