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. .. automodule:: map :members: