Thursday, December 18, 2008

Environment design (2D maps)

The primary consideration of this part is to make a map which can be represented digital with a high accuracy.
We was thinking about taking a picture of the world where the car is driving, and use it as this representation. But we quickly concluded that the picture had to be taken in a very precise angle. So we decided to draw our own maps on a pc, thus the digital representation is made and we have to print it out.

The car have to drive around on the map, so the map have to be larger than a A4. An A1 paper will give some space to drive on and still it is possible to make the map on a plotter. A A1 paper have the dimensions (landscape) 841 times 594.

Properties of the maps
The light sensors only measure the level of reflected light and no colors, thus the map is only read as gray values so the easiest way to make it is with gray values.

In the previous test we saw that the sensors had problems to distinguish the high gray values. So we will only use the following colors on the maps we make:
# - color level
0 - 0 (border)
1 - 20
2 - 40
3 - 60
4 - 80
5 - 100
6 - 120
7 - 140
8 - 160
9 - 180
10 - 200
11 - 220

The robot must know where the border of the map is, so the map have to have a unique gray-level at this border. Thus the black color(0) is only used for the border. The black color is used because it is easy to distinguish it from the other colors.
The border is made 3 cm wide so we are sure that the robot will detect it.

The sensors can't detect high details, so we will only use 1 dot per mm in the maps. Thus the images must have a resolution of 841 x 594 pixels.

This leads to two maps which will be used in the following work. These are named map 2 and map 3 and are described more in the following sections. Map 1 was a discarded because we thought it would not work.

Map 2
Map 2 is mad by drawing a lot of rectangles with the gray levels listed above. The rectangles are of random size and place random. But the map is made by a human, so it will never be total random. The map is made of rectangles with a width of at least some pixels, because the sensors can't detect high details.

In the end the black border was add so it's possible to make the car stay on the map.

This map can have ambiguous points, which is point where the MCL won't be able to distinguish. So this map might be difficult to get the MCL to work on. But when the car is moving it should be possible to distinguish the points because there is no repeated sequence.

Map 3
Map 3 is made with a radial gradient with center in the middle of the map and a black border outside.
In this map each position is unique(when the compass gives the angle), which makes it a easy map to make the MCL work on. An even bigger advantage of the map is that the local maximum of probabilaty is the global maximum, so the longer the robot car are from a point the lower importans it will get.
Map 3 is not very realistic map but it's a good map to start on, because of it's properties.

No comments: