Mapper
----------------------------------------------------

Summary
================

     This service receives both Laser Range Finder scans and the global 
X, Y, Theta position of the robot and creates a map of the environment.



Installing
================

     Extract the service to: 
C:\Microsoft Robotics Studio (1.5)\samples\Mapper.  This service 
requires the SimRobot and RoboticsCommonExtras services.  Extract 
SimRobot to: C:\Microsoft Robotics Studio (1.5)\samples\SimRobot.  
And extract RoboticsCommonExtras to: 
C:\Microsoft Robotics Studio (1.5)\samples\RoboticsCommonExtras.  The 
included Visual Studio solution for the Mapper contains all three 
projects.  Open it, compile and run.



Usage
================

     Run the Mapper service.  This will also start the simulation 
environment with a test room and pioneer robot.  The simple dashboard 
will also start.  Then navigate your browser to: 
http://localhost:50000/mapper or http://localhost:50000/mapper/latest.  
This will display the current laser scan oriented properly in the room.  
The red circle indicates the robot and its heading.  Now drive the robot 
around a bit, being careful not to move any walls.  Then go to: 
http://localhost:50000/mapper/all.  This will show all the saved scans at 
once, and should closely match the room geometry.

     This service can also work with my Logger / Player services.


How it Works
================

     The Mapper service subscribes to the LRF.  About 5 times a second it 
gets a new laser scan.  Once a scan is received, it polls SimplePosition 
for the current global position and orientation of the robot.  Then the 
laser scan is converted from robot relative, to global relative and saved 
to state.  The image of all the scans is drawn on request.  Only every 
10th scan is saved to memory to save memory.  Also, scans are thrown away 
if it is determined that the robot has not moved since the last scan.



Known Issues
================

 * You must refresh the internet pages to see up to date information
 * The Mappers parameters are set up to only work in the provided SimRobot room
 * Old scans are not thrown away, so if the environment moves, the map can get confusing



-----------------------------------------------------------------------
Ben Axelrod 2007 http://benaxelrod.com


