]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/pathplan/test/testbitmaps.c
pathplan: Changed approach to problem solving non-holomic problem, removed redundant...
[eurobot/public.git] / src / pathplan / test / testbitmaps.c
diff --git a/src/pathplan/test/testbitmaps.c b/src/pathplan/test/testbitmaps.c
deleted file mode 100644 (file)
index 73dadfc..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-#define _ISOC99_SOURCE
-#include <stdio.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include "path_planner.h"
-#include <time.h>
-#include <sys/time.h>
-#include <math.h>
-#include <shist.h>
-#include "aalgorithm.h"
-
-#define OBST_COUNT 4
-// #define POINT
-
-void print_map(char *label)
-{
-       int x, y;
-       struct map *map = ShmapIsMapInit();
-
-       if (label)
-               printf("%s\n", label);
-       
-       for (y=MAP_HEIGHT-1; y>=0; y--) {
-               for (x=0; x<MAP_WIDTH; x++) {
-                       char c;
-                       if (ShmapIsFreeCell(x, y)) {
-                               c = '.';
-                               if (map->cells[y][x].flags & MAP_FLAG_PLAN_MASK) {
-                                       c = 's';
-                               }
-                               if (map->cells[y][x].flags & MAP_FLAG_PATH) {
-                                       c = 'p';
-                               }
-                               
-                       } else{
-                         c = '#';
-                       }
-                       if ((x==0) && (y==0)){
-                         c = 'O';
-                       }       
-                       if ((x==119) && (y==83)){
-                         c = 'X';
-                       }
-                       putchar(c);
-               }
-               putchar('\n');
-       }
-}
-
-
-int main(int argc, char *argv[])
-{
-
-       
-       bitmap_dim bitmap_par[4];
-       
-       init_bitmap(bitmap_par, BITMAP_AB_ACROSS, BITMAP_AF_ACROSS, BITMAP_W2_ACROSS);
-       
-       // Init Shared Map Memory
-       ShmapInit(1);
-       
-       // Create some obstacles
-       ShmapSetRectangleFlag(0.0, 0.0, 0.020, 2.1, MAP_FLAG_WALL, 0);
-       ShmapSetRectangleFlag(0.0, 0.0, 3.0, 0.025, MAP_FLAG_WALL, 0);
-       ShmapSetRectangleFlag(0.0, 2.08, 3.0, 2.1, MAP_FLAG_WALL, 0);
-       ShmapSetRectangleFlag(2.975, 0.0, 3.0, 2.1, MAP_FLAG_WALL, 0);
-       
-//     check_bot_position_straight(20,20,bitmap_par,0);
-//     check_bot_position_straight(40,20,bitmap_par,90);
-//     check_bot_position_straight(20,40,bitmap_par,180);
-//     check_bot_position_straight(40,40,bitmap_par,270);
-// //  
-//     ShmapSetCellFlag(20,20,MAP_FLAG_PATH);
-//     ShmapSetCellFlag(40,20,MAP_FLAG_PATH);
-//     ShmapSetCellFlag(20,40,MAP_FLAG_PATH);
-//     ShmapSetCellFlag(40,40,MAP_FLAG_PATH);
-       
-       check_bot_position_across(30,30,bitmap_par,45);
-       check_bot_position_across(30,60,bitmap_par,135);
-       check_bot_position_across(60,30,bitmap_par,225);
-       check_bot_position_across(60,60,bitmap_par,315);
-       
-       ShmapSetCellFlag(30,30,MAP_FLAG_PATH);
-       ShmapSetCellFlag(30,60,MAP_FLAG_PATH);
-       ShmapSetCellFlag(60,30,MAP_FLAG_PATH);
-       ShmapSetCellFlag(60,60,MAP_FLAG_PATH);
-       
-       print_map("BITMAPS:"); 
-       
-       // Free Memory
-       //ShmapFree();
-       return 0;
-}
-
-