]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm: Map flag walls tuning.
authorMichal Vokac <vokac.m@gmail.com>
Tue, 24 May 2011 00:28:30 +0000 (02:28 +0200)
committerMichal Vokac <vokac.m@gmail.com>
Tue, 24 May 2011 00:28:30 +0000 (02:28 +0200)
It is better put bigger walls to green, start and protected areas and do not plan trajectory here.

src/robofsm/robot.c

index 9f1c93850804825e3fccf0bb670262b7e7976e9b..a95057d3be4f5ca3772b4929b204d335484c217a 100644 (file)
@@ -75,22 +75,12 @@ void fill_in_known_areas_in_map()
 //     ShmapSetRectangleFlag(2.91, 0.0, 3.0, 2.1, MAP_FLAG_IGNORE_OBST, 0); /* right */
 //     ShmapSetRectangleFlag(1.0, 1.5, 1.95, 2.1, MAP_FLAG_IGNORE_OBST, 0); /* rised area */
 
-       /* start blocs */
-       ShmapSetRectangleFlag(0, 1.7, 0.4, 1.678, MAP_FLAG_WALL, 0);
-       ShmapSetRectangleFlag(2.55, 1.7, 3, 1.678, MAP_FLAG_WALL, 0);
+       /* start blocs + green area */
+       ShmapSetRectangleFlag(0, 0, 0.45, PLAYGROUND_HEIGHT_M, MAP_FLAG_WALL, 0);
+       ShmapSetRectangleFlag(2.55, 0, PLAYGROUND_WIDTH_M, PLAYGROUND_HEIGHT_M, MAP_FLAG_WALL, 0);
 
-       /* opponent start area */
-       if (robot.team_color == RED) {
-               ShmapSetRectangleFlag(PLAYGROUND_WIDTH_M, PLAYGROUND_HEIGHT_M, PLAYGROUND_WIDTH_M - 0.4 - 0.05 - 0.35, PLAYGROUND_HEIGHT_M - 0.4, MAP_FLAG_WALL, 0);
-       } else {
-               ShmapSetRectangleFlag(0, PLAYGROUND_HEIGHT_M, 0.8, PLAYGROUND_HEIGHT_M - 0.4, MAP_FLAG_WALL, 0);
-       }
-
-       /* protected bloc left */
-       ShmapSetRectangleFlag(0, 0, 1.15, 0.35, MAP_FLAG_WALL, 0);
-
-       /* protected bloc right */
-       ShmapSetRectangleFlag(1.85, 0, PLAYGROUND_WIDTH_M, 0.35, MAP_FLAG_WALL, 0);
+       /* protected blocs */
+       ShmapSetRectangleFlag(0, 0, PLAYGROUND_WIDTH_M, 0.4, MAP_FLAG_WALL, 0);
 
        /* plan trajectory on */