ARES
/
TestMyPathFind
Test du path finding
Fork of TestMyPathFind by
Diff: main.cpp
- Revision:
- 24:b6e59194efba
- Parent:
- 23:3a34b8b70da6
--- a/main.cpp Wed Jan 20 16:06:36 2016 +0000 +++ b/main.cpp Wed Jan 20 18:39:31 2016 +0000 @@ -44,13 +44,21 @@ init(); //Construction des obstacles map.build(); - map.AStar(0, 1000, 2000, 1000, 100); + map.AStar(odo.getX(), odo.getY(), 1400, 1000, 100); path = map.path; for(int i=0; i<path.size();i++) { odo.GotoXYT(path[i].x, path[i].y, 0); } + + map.AStar(odo.getX(), odo.getY(), 200, 1000, 100); + path = map.path; + + for(int i=0; i<path.size();i++) { + odo.GotoXYT(path[i].x, path[i].y, PI); + } + //odo.GotoXYT(500, 50, 0); //odo.GotoXYT(200, 0, 0); //odo.GotoXYT(0, 0, 0); @@ -67,7 +75,7 @@ pc.printf("Hello from main !\n\r"); wait_ms(500); - odo.setPos(0, 0, 0); + odo.setPos(0, 1000, 0); roboclaw.ForwardM1(ADR, 0); roboclaw.ForwardM2(ADR, 0);