CMSC 422

Program 2, due 4/30/02
Map-based Navigation

Note: You will need to use the Khepera robot simulator (from here ) again.

The khephera simulator supports some other capabilities you did not use for the first assignment, you will need to use these in this one. In particular, you will need to use the graphic (right hand side) window to display output, and you will need to use the X,Y, and Alpha values in the robot structure.

Please note, there will be no "bulbs" or "corks" used in this assignment.

Note: You will need to save nothing.world and Project2.world into the WORLD subdirectory in your copy of SIM

In this assignment you will do three things - calibrate some sensors, build a map based on those sensors, and use that map to navigate. Please note that each part is more difficult than the part before, so judge your time wisely.


Part I: Calibration

When using a robot, there is no magic number that tells you how a sensor responds in the real world, and the parameters may vary from case to case.

You will collect the data to determine how far (in simulated millimeters) from an object you get what sensed values from a distance sensor.

Programming:
To do this - write a program in which the robot will start from the default start and will move forward slowly (speed 1,1). Create a world in which there is a wall some distance away, and let the robot move forward towards it. Reading from a single front center, build an array of values (from the sensor) and distance (of the robot to the wall). You can use robot.X and robot.Y to tell where you are. Display this array (or some visualization thereof) in the graphic display panel.

Written:
Answer the following - i. How far from the wall are you before you can sense it. ii. Is the mainly sensing linear or some other function?
a hint: if you average over mutliple tries you are more likely to get the right answer!

Note: You should NOT assume the wall is at a particular location -- when your sensor value is 1023, you will know where the wall is!


Part 2: Mapping

The Load the Project2.world for this part of the assignment.

Programming:
Set the robot to start in the area on the lower left hand side of world. Write a program in which the robot will move forward until it comes to an obstacle, it will then turn 90-degrees to the right (note: use the Robot.Alpha) and continue. This will eventually navigate through the world.

You will write a program that divides the world into a suitable grid-size (I suggest 20 x 20 khepera units) and creates a map based on computing sensor values and filling in the grids. Display the grid array in the graphics window. Have a square get darker as you are more sure there is something there.

written:
Hand in your map of the world. i. Explain discrepancies between your robot and the actual world - why were these caused, what are two ways you could fix it.


Part 3: Map-based navigation

For this part of the assignment you will need to use a map to navigate - This map will be a 50 by 50 matrix (approx 20 millimeter map) which will be provided in a data file.

Programming:
Create a robot that will navigate based on the map. You will write a program that takes as input an X,Y value for the goal and you will write a program to get from wherever the robot starts to that goal. The trick is that you cannot run into any of the obstacles represented in the map -- that is, your robot must get to the goal without using actual sensors (which won't see anything in the actual world), but by using the map. You should try to write a program that finds a decent path to the goal, although we are not testing optimal route planning. You should print the map in the graphics panel, and show where the robot is in the map. You can use the robot's X,Y and Alpha values as you wish.

The following map is different from the original published one. It has one extra line in the beginning to give the goal position. Look at the FAQ for more information.

The map you are to use is HERE

written: Describe the algorithm you use for path planning - are there parts of the space that are harder to reach than others?

Web Accessibility