]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/pathplan/test/testpathplan.c
src: raw code a changes
[eurobot/public.git] / src / pathplan / test / testpathplan.c
index 012c28bfbea96ca1e62ab0955f7826a44caa04f9..8c6f2708b08efa65f79225f6e620750890a9979a 100644 (file)
@@ -12,7 +12,7 @@
 #define USEC2SEC(T)    (MSEC2SEC(T/1000.0))
 #define PERCENT(X,N)   (((double) X/ (double) N )* 100.0)
 
-#define TEST_COUNT 5
+#define TEST_COUNT 10000
 
 #define HIST_COUNT (4*6+2)
 #define HIST_MIN 0.000001
@@ -81,6 +81,7 @@ int main(int argc, char *argv[])
        
        // Init Shared Map Memory
        ShmapInit(1);
+       init_aalgorithm();
        
        // Create some obstacles
        ShmapSetRectangleFlag(0.0, 0.0, 0.2, 2.1, MAP_FLAG_WALL, 0);
@@ -105,7 +106,7 @@ int main(int argc, char *argv[])
                } while (!ShmapIsFreePoint(goalx, goaly));
                
                gettimeofday(&tv_start, NULL);
-
+               
                val = path_planner(startx, starty, goalx, goaly , &path, &angle, &angle);
                
                gettimeofday(&tv_finish, NULL);
@@ -140,7 +141,8 @@ int main(int argc, char *argv[])
                }
        }
        // Free Memory
-       //ShmapFree();
+       freemem_aalgorithm();
+       ShmapFree();
        return 0;
 }