Map

The ultimate goal in the SEGA project is to create a map of the environment. To create the map, it uses the combined sensor output from the Laser, Sonar and Odometry sensor. It uses RANSAC (Random Sample And Consensus) and corner detection algorithmes to detect landmarks and calculates the robot’s relative position from these landmarks, and from the sensor data given by the odometry sensor.

Corner Detection Algorithmes

There are two different approaches used for detecting corners. The first is the spike method for incomplete (outer) corners and the vector method for both inner and outer corners.

Spike method

The spike method is able to recognize outer corners, even when not all data is available. It uses the laser sensor data property that measurements returned are returned in consecutive order. If two consecutive points have a distance of more than, lets say, 30 centimeters, and the points are within 2 meters away from the robot (to rule out false positives), then the point closest to the robot is a corner.

Vector Method

The vector method is very usefull in detecting corners when both sides of the corners are seen by the laser range finder. Like the spike method, it uses the property of the laser range finder that measurements are returned in consecutive order. For every three consecutive points, it calculates the angle between these three points. If the angle is around 90 (inner) or 270 (outer) degrees, than it is recognized as a corner.

Detecting Movement with the Laser Range Finder

Using the corners detected by the spike and vector method, it is possible to calculate the relative movement if two or more reference points are known. It calculates the translations made by the points to detect a change in position and direction. For reasons of reliability, it uses as many points as possible and calculates the average translation made by this point to determine the new location and direction.

Map Component

The map component collects laser points and position data and plots it on a 2D bitmap. It attempts to correlate the laser points and position using the time stamps included with the data. Interpolation and extrapolation of position data is currently only partially implemented and untested. Corner detection for landmark extraction is currently also performed here, but should ideally be moved to the position component.

Commands

The map component accepts the following commands:
  • LASER: Data points from the laser component.
  • SONAR: Data points from the sonar component.
  • POS: Position and orientation from position component.
  • GETMAP: Request for the bitmap image.
The map component sends the following commands:
  • MAP: The current map as a triple of (width, height, bitmap). The bitmap is a black and white image with 1 bit per pixel. Sent only on request via GETMAP.
class map.Map

Implements the map component.

command(client, command, params)
Handles the different commands and dispatches the right params to the corresponding functions
setup()
Sets up the communication to receive data from sensors and initializes class variables
updateMap(points, location, rotation)
points: relative location/rotation: absolute

Table Of Contents

Previous topic

High level components

Next topic

Position

This Page