]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robofsm/robot.c
robot: Add wall flag to the map for known obsatcles = start block, protected area.
[eurobot/public.git] / src / robofsm / robot.c
index 077703de5110d78e4baf45e417d7c6cb05d8327c..7e5ebcab13dcda6c30c7b588048f45ef8f308977 100644 (file)
@@ -64,22 +64,30 @@ void fill_in_known_areas_in_map()
        //ShmapSetRectangleFlag(0.0, 1.84, 3.0, 2.1, MAP_FLAG_WALL, 0); /* top */
        //ShmapSetRectangleFlag(2.74, 0.0, 3.0, 2.1, MAP_FLAG_WALL, 0); /* right */
 
-       /* Container surroundings */
-       ShmapSetRectangleFlag(0.0, 0.0, 0.4, 0.2, 0, MAP_FLAG_WALL); /* left container */
-       ShmapSetRectangleFlag(3.0, 0.0, 2.6, 0.2, 0, MAP_FLAG_WALL); /* right container */
-
-       /* Ignore other obstacles at edges */
-       ShmapSetRectangleFlag(0.0, 0.0, 0.09, 2.1, MAP_FLAG_IGNORE_OBST, 0); /* left */
-       ShmapSetRectangleFlag(0.0, 0.0, 3.0, 0.09, MAP_FLAG_IGNORE_OBST, 0); /* bottom */
-       ShmapSetRectangleFlag(0.0, 2.01, 3.0, 2.1, MAP_FLAG_IGNORE_OBST, 0); /* top */
-       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 */
-
-       ShmapSetRectangleFlag(0.6, 1.45, 2.45, 1.55, MAP_FLAG_WALL, 0); /* plateau, slopes */
-       ShmapSetRectangleFlag(1.46, PLAYGROUND_HEIGHT_M - 0.5, 1.57, PLAYGROUND_HEIGHT_M, MAP_FLAG_WALL, 0); /* plateau, slopes */
-       
-       ShmapSetRectangleFlag(0.32, 0.25, 0.38, 0.55, 0, MAP_FLAG_WALL); /* destination position near blue container */
-       ShmapSetRectangleFlag(2.62, 0.25, 2.68, 0.55, 0, MAP_FLAG_WALL); /* destination position near yellow container */
+//     /* Container surroundings */
+//     ShmapSetRectangleFlag(0.0, 0.0, 0.4, 0.2, 0, MAP_FLAG_WALL); /* left container */
+//     ShmapSetRectangleFlag(3.0, 0.0, 2.6, 0.2, 0, MAP_FLAG_WALL); /* right container */
+
+//     /* Ignore other obstacles at edges */
+//     ShmapSetRectangleFlag(0.0, 0.0, 0.09, 2.1, MAP_FLAG_IGNORE_OBST, 0); /* left */
+//     ShmapSetRectangleFlag(0.0, 0.0, 3.0, 0.09, MAP_FLAG_IGNORE_OBST, 0); /* bottom */
+//     ShmapSetRectangleFlag(0.0, 2.01, 3.0, 2.1, MAP_FLAG_IGNORE_OBST, 0); /* top */
+//     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);
+
+       /* protected bloc left */
+       ShmapSetRectangleFlag(0.45, 0, 1.15, 0.12, MAP_FLAG_WALL, 0);
+       ShmapSetRectangleFlag(0.45, 0.12, 0.472, 0.25, MAP_FLAG_WALL, 0);
+       ShmapSetRectangleFlag(1.128, 0.12, 1.15, 0.25, MAP_FLAG_WALL, 0);
+
+       /* protected bloc right */
+       ShmapSetRectangleFlag(1.85, 0, 2.55, 0.12, MAP_FLAG_WALL, 0);
+       ShmapSetRectangleFlag(1.85, 0.12, 1.872, 0.25, MAP_FLAG_WALL, 0);
+       ShmapSetRectangleFlag(2.528, 0.12, 2.55, 0.25, MAP_FLAG_WALL, 0);
 }
 
 static void trans_callback(struct robo_fsm *fsm)