Using the Laser Rangefinder simulator in Flat4

Overview

Flat now contains a laser rangefinder simulator, which uses the "perfect sonar" model to calculate the laser values. Flat can simulate either one laser mounted on top of Flat, or two lasers mounted on the right and left sides of Flat. The user specifies various parameters in the configuration file.

Simulated laser rangefinder data

The data produced by the laser rangefinder simulator is an array of 180 integers, specifying millimeter distances to objects in the Flat environment. The 180 readings represent data points taken from a 180-degree scan, one per degree. The user can optionally add noise to the data, however the noise is typically <10mm, which is very small.

Laser Display and Data Collection

See the instructions for the Flat5 Display and the LaserShow program to see how to collect and display laser rangefinder data. Here are some sample laser images.

Laser Configuration

If the user specifies one laser, it is assumed to be mounted at the center of Spot (on top, but since it is 2-D that doesn't matter). The rangefinder faces forward, at an orientation of zero degrees from the robot's orientation. Like the sonar readings, the distances are from the laser device.

If the user specifies two lasers, they are assumed to be mounted on the right and left sides of the robot, 90 degrees from the front. Each laser is symmetrically angled LASER_ANGLE degrees from front center. For example, the left one is angled outward 45 degrees to the left from the front direction. The right one is angled 45 degrees to the right.

The Flat configuration file contains parameters that affect laser operation. The user can turn lasers on and off, specify the error model, and position the lasers on the robot. Below are the relevant parameters:

# USE_LASER
# 0 = NO, 1 = YES 
#
Flat.USE_LASER                    1

# PERFECT_LASER
# 0 = NO and the model generates random gaussian distance errors
# 1 = YES - no errors
Flat.PERFECT_LASER                0

# NUMBER_OF_LASERS
# 1 or 2.
# If 1, the laser is assumed to be on top of Flat.
# If 2, the lasers are mounted on the right and left
#       sides, angled at +/- LASER_ANGLE.
#
Flat.NUMBER_OF_LASERS             2

# LASER_SEPARATION
# Defaults to twice the sonar ring radius of SPOT, 280 mm
# Units are millimeters.
#
Flat.LASER_SEPARATION           280

# LASER_ANGLE
# The outward angle of each laser, if there are 2.
# Units are degrees.
Flat.LASER_ANGLE                 45


[FLAT home]


Author: Micheal S. Hewett
Email: hewett@cs.utexas.edu
Last Updated: Monday, February 15, 1999