![]() |
![]() |
Professional
Microsoft Robotics Developer Studio
This is a modified version of the sample Explorer program provided by Microsoft. It demonstrates how to make a robot explore its environment using a laser range finder (LRF) and build a map as it goes. The code has been changed so that it will work with the simulated Pioneer 3DX robot. NO HARDWARE IS REQUIRED!
IMPORTANT NOTE: This program requires an updated version of the Simulated Differential Drive that supports the DriveDistance and RotateDegrees APIs. It also needs the Maze Simulator. The manifest specifies the modified version of the Dashboard from Chapter 4, although this can be changed to use the Simple Dashboard included in the MRDS distribution.
Microsoft provides a program called Explorer in the directory <MRDS>samples\Misc\Explorer. However, it uses two functions that were not supported in the Simulated Differential Drive until V1.5 and therefore it could not be run in the simulator. This was a serious disadvantage for beginners hoping to learn about laser range finders and autonomous exploration.
I therefore updated the Simulated Differential Drive code so that to implement the DriveDistance and RotateDegrees functions. However, you should note that these functions do not produce exact motions because in the simulator the robot moves in small steps that depend on the motor speed. It therefore tends to step past the desired position, i.e. turn too far and drive too far. (In the real world, robots never do exactly what you tell them, so in a sense this is realistic.)
A screen shot of the program in operation is shown below. Notice that you can view the robot's camera in a separate window and the Dashboard shows a top-down map based on the laser range data. The Global Map window is not shown in this diagram.
In order to get the Explorer program to work, you have to use several different projects:
This is an integrated set of programs. You must use only the versions available with this book. Most of this code has been available on the Internet in the past. If you mix older versions of these projects with the newer ones, then ExplorerSim will not work.
Basically, the ExplorerSim program controls a simulated Pioneer 3DX robot which has a laser range finder on top of it. The laser range finder is used to determine the direction of the most free space, and the robot heads off in this direction. You will see it stop and "look around" from time to time.
Unfortunately, the exploration algorithm is basically random. The robot will often return to areas it has previously explored (because it does not use the map that it builds) and sometimes it will oscillate from side to side trying to decide where to go next. Much more work would need to be done to use this program for real exploration. However, it does illustrate many points about exploring and how to use a laser range finder. It is certainly better than my basic Intro program which relies on bumpers because in the Explorer the robot does not run into walls!
As the robot wanders around, it builds a map of what it sees
with the LRF. This is displayed in a separate window:
Note that the map is not used for exploration in this version
of the program. A future program will demonstrate how to
incorporate the map into an exploration algorithm.
Three different methods have been implemented for constructing the map: Overwrite, Counting and Bayes Rule. The results however are very similar. See the Documentation page for more details.
Note that this is a simulation, so the robot always knows exactly where it is. Therefore it creates quite good maps. This is not the case in the real world because the robot has to estimate its position.
A Documentation page is provided with instructions on how to install and run the program. These web pages are also included in the package so you don't have to go back to the Internet all the time.
There is a brief Tutorial. However, it does not explain the program in detail. You can use the software without having to make any changes to the code. You should try the Microsoft Simulation Tutorials on which this program is based.
This software might be developed further.
This version was built with V1.5 of MRDS.
It will not
overwrite any of the Microsoft code. All the services are located
under the ProMRDS\Chapter9 directory under the MRDS root. Please read the
installation instructions on the Documentation page carefully.
This code is based on the Microsoft Explorer sample program. It is not warranted to be suitable for any purpose other than playing around with MRDS. There are known bugs, and it is not intended as a definitive example of how to write robotic systems. If you use it on a real Pioneer robot and your robot crashes into walls, that's too bad -- change the code!