Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: RoboClaw mbed StepperMotor
Fork of RoboClaw by
Revision 27:ae68960316f1, committed 2016-01-21
- Comitter:
- IceTeam
- Date:
- Thu Jan 21 14:25:03 2016 +0000
- Parent:
- 25:6c5c453602ff
- Child:
- 28:142ebc5410f3
- Commit message:
- Test robot aller-retour avec un obstacle et mpc=75
Changed in this revision
| Map/Obstacles/Obs_circle.h | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Map/Obstacles/Obs_circle.h Wed Jan 20 17:14:29 2016 +0100
+++ b/Map/Obstacles/Obs_circle.h Thu Jan 21 14:25:03 2016 +0000
@@ -7,7 +7,7 @@
{
public:
/** Definit un obstacle de la forme d'un cercle
- * @param
+ * @param */
Obs_circle(float robotRadius, int id, float x, float y, float size);
virtual int height(float x, float y);
--- a/main.cpp Wed Jan 20 17:14:29 2016 +0100
+++ b/main.cpp Thu Jan 21 14:25:03 2016 +0000
@@ -44,13 +44,20 @@
init();
//Construction des obstacles
map.build();
- map.AStar(0, 1000, 2000, 1000, 100);
+ map.AStar(0, 1000, 1400, 1000, 75);
path = map.path;
for(int i=0; i<path.size();i++) {
odo.GotoXYT(path[i].x, path[i].y, 0);
}
-
+
+ map.AStar(0, 1000, 0, 1000, 75);
+ 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 +74,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);
