Voili voilou

Dependencies:   RoboClaw StepperMotor mbed

Fork of Robot2016_2-0 by ARES

Revision:
12:5355aed288b0
Parent:
10:ae3178aa94e9
Child:
13:a394e27b8cb2
--- a/main.cpp	Tue Jan 05 15:48:25 2016 +0100
+++ b/main.cpp	Tue Jan 05 17:08:15 2016 +0000
@@ -1,4 +1,5 @@
 #include "Odometry.h"
+#include "Map/Map.h"
 
 #define dt 10000
 #define ATTENTE 0
@@ -26,10 +27,18 @@
 {
     double angle_v = 2*PI/5;
     double distance_v = 200.0;
+    std::vector<SimplePoint> path;
+    Map map;
+    
+    map.build();
     init();
 
-    odo.GotoXYT(500, 100, 0);
-    odo.GotoXYT(500, 50, 0);
+    path = map.Astar(0, 1000, 2000, 1000, 1);
+
+    for(int i=0; i<path.size();i++)
+        odo.GotoXYT(path[i].x, path[i].y, 0);
+        
+    //odo.GotoXYT(500, 50, 0);
     //odo.GotoXYT(200, 0, 0);
     //odo.GotoXYT(0, 0, 0);