next up previous contents
Next: 6.17 localize Up: 6. Device Interfaces Previous: 6.15 ir   Contents

Subsections


6.16 laser

Synopsis

The laser interface provides access to a single-origin scanning range sensor, such as a SICK laser range-finder.

Constants

#define PLAYER_LASER_MAX_SAMPLES 401
The maximum number of laser range values

#define PLAYER_LASER_GET_GEOM 0x01
#define PLAYER_LASER_SET_CONFIG 0x02
#define PLAYER_LASER_GET_CONFIG 0x03
#define PLAYER_LASER_POWER_CONFIG 0x04
Laser request subtypes.

Data

Devices supporting the laser interface can be configured to scan at different angles and resolutions. As such, the data returned by the laser interface can take different forms. To make interpretation of the data simple, the laser data packet contains some extra fields before the actual range data. These fields tell the client the starting and ending angles of the scan, the angular resolution of the scan, and the number of range readings included. Scans proceed counterclockwise about the laser, and 0o is forward. The laser can return a maximum of 401 readings; this limits the valid combinations of scan width and angular resolution.



struct player_laser_data : The laser data packet.

int16_t min_angle, max_angle;
Start and end angles for the laser scan (in units of 0.01 degrees).

uint16_t resolution;
Angular resolution (in units of 0.01 degrees).

uint16_t range_res;
range resolution. ranges should be multipled by this.

uint16_t range_count;
Number of range/intensity readings.

uint16_t ranges[PLAYER_LASER_MAX_SAMPLES];
Range readings (mm).

uint8_t intensity[PLAYER_LASER_MAX_SAMPLES];
Intensity readings.

Command

This device accepts no commands.

Configuration: get geometry

The laser geometry (position and size) can be queried using the PLAYER_LASER_GET_GEOM request. The request and reply packets have the same format.



struct player_laser_geom : Request/reply packet for getting laser geometry.

uint8_t subtype;
The packet subtype. Must be PLAYER_LASER_GET_GEOM.

int16_t pose[3];
Laser pose, in robot cs (mm, mm, degrees).

int16_t size[2];
Laser dimensions (mm, mm).

Configuration: get/set scan properties

The scan configuration can be queried using the PLAYER_LASER_GET_CONFIG request and modified using the PLAYER_LASER_SET_CONFIG request.

The sicklms200 driver, for example, is usually configured to scan a swath of 180o with a resolution of 0.5o, to generate a total of 361 readings. At this aperture, the laser generates a new scan every 200ms or so, for a data rate of 5Hz. This rate can be raised by reducing the aperture to encompass less than the full 180o, or by lowering the resolution to 1o.

Read the documentation for your driver to determine what configuration values are permissible.



struct player_laser_config : Request/reply packet for getting and setting the laser configuration.

uint8_t subtype;
The packet subtype. Set this to PLAYER_LASER_SET_CONFIG to set the laser configuration; or set to PLAYER_LASER_GET_CONFIG to get the laser configuration.

int16_t min_angle, max_angle;
Start and end angles for the laser scan (in units of 0.01 degrees). Valid range is -9000 to +9000.

uint16_t resolution;
Scan resolution (in units of 0.01 degrees). Valid resolutions are 25, 50, 100.

uint16_t range_res;
Range Resolution. Valid: 1, 10, 100 (For mm, cm, dm).

uint8_t intensity;
Enable reflection intensity data.



struct player_laser_power_config : Turn the laser power on or off.

uint8_t subtype;
Must be PLAYER_LASER_POWER_CONFIG.

uint8_t value;
0 to turn laser off, 1 to turn laser on


next up previous contents
Next: 6.17 localize Up: 6. Device Interfaces Previous: 6.15 ir   Contents
2004-06-02