MSRS Code Page Home      MSRS Explorer Program

ExplorerSim Program

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! (If somebody wants to try it with a real Pioneer robot and let me know, that would be great. I can't afford a Pioneer 3DX with LRF!)

IMPORTANT NOTE: This program requires an updated version of the Simulated Differential Drive that supports the DriveDistance and RotateDegrees APIs. Consequently, it also needs a slightly modified version of the Maze Simulator. The manifest specifies my modified version of the Dashboard, although this can be changed to use the Simple Dashboard included in the MSRS distribution.

Background

Microsoft provides a program called Explorer in the directory <MSRS>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 on this page. If you mix older versions of these projects then the Explorer will not work. To make it easier to install, all of these projects are supplied in a single ZIP file.

What it does

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 not ideal. (I did not write it, so don't blame me! I will provide better algorithms in later programs.) 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.

Available Resources

Documentation

A Documentation page is provided with instructions on how to install and run the program. These web pages are also included in the ZIP file so you don't have to go back to the Internet all the time. You should also read the readme.txt which is included in the ZIP file.

Tutorial

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.

Software

IMPORTANT NOTE:

The code for the Maze Simulator and ExplorerSim has been updated for a book written by myself and Kyle Johns. The new code is available from the book web site:
http://www.promrds.com/

The old version of the software is available from the link below. This version was built with V1.5 it will not work with other versions.
QUT MSRS Apps 18-Jul-2007

You must unzip the file into your MSRS root directory. It will not overwrite any of the Microsoft code. All the services are located in the Apps\QUT directory under the MSRS root. Please read the installation instructions on the Documentation page carefully.

Obviously, you need the Microsoft Robotics Studio software as well. At present this must be version 1.5.

Legal Stuff

This code is based very heavily on the Microsoft Explorer sample program. It is not warranted to be suitable for any purpose other than playing around with MSRS. 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!

[ Documentation ] | [ Tutorial ]