Time is good

Dependencies:   RoboClaw mbed

Fork of Robot2016_2-0 by ARES

Committer:
IceTeam
Date:
Thu May 05 05:36:01 2016 +0200
Revision:
72:b628daa54f3c
Parent:
68:d19988565dfd
Child:
75:195dd2bb13a3
Commit pr? changement odometrie

Who changed what in which revision?

UserRevisionLine numberNew contents of line
IceTeam 47:be4eebf40568 1 #ifndef MAP_H
IceTeam 47:be4eebf40568 2 #define MAP_H
IceTeam 47:be4eebf40568 3
IceTeam 64:24e1057a97f7 4 /* Dernier Changement : Romain 0h20
IceTeam 57:86f491f5b25d 5 Inclu dans : main.cpp
IceTeam 57:86f491f5b25d 6 Il faut encore gerer les formations de coquillage */
IceTeam 57:86f491f5b25d 7
IceTeam 47:be4eebf40568 8 #include "obsCarr.h"
IceTeam 47:be4eebf40568 9 #include "pointParcours.h"
IceTeam 47:be4eebf40568 10 #include "nVector.h"
IceTeam 47:be4eebf40568 11 #include "controle.h"
IceTeam 57:86f491f5b25d 12 #include "Objectif/objectif.h"
IceTeam 57:86f491f5b25d 13 #include "../Odometry/Odometry.h"
IceTeam 63:176d04975f06 14 #include "../Functions/defines.h"
IceTeam 56:4fd9636dfb36 15 #include "../AX12/AX12.h"
IceTeam 57:86f491f5b25d 16 #include "../../StepperMotor/Stepper.h"
IceTeam 47:be4eebf40568 17
IceTeam 64:24e1057a97f7 18 #define X_START_VERT 110
IceTeam 68:d19988565dfd 19 #define X_START_VIOLET 2890
IceTeam 64:24e1057a97f7 20 #define Y_START 1000
IceTeam 52:98f8a6ccb6ae 21
IceTeam 47:be4eebf40568 22 class map {
IceTeam 47:be4eebf40568 23 public:
IceTeam 64:24e1057a97f7 24 map (Odometry* nodo, AX12 * np, ControlleurPince * npince, int ncouleur, int nformation);
IceTeam 47:be4eebf40568 25 void addObs (obsCarr nobs);
IceTeam 60:8d2320a54a32 26 void addObj (objectif nobj);
IceTeam 47:be4eebf40568 27 void FindWay (point dep, point arr);
IceTeam 47:be4eebf40568 28 void FindWay (float depX, float depY, float arrX, float arrY);
IceTeam 57:86f491f5b25d 29 void Execute (int obj);
IceTeam 64:24e1057a97f7 30 void Execute ();
IceTeam 47:be4eebf40568 31 void Execute (float XObjectif, float YObjectif);
IceTeam 64:24e1057a97f7 32 void Build();
IceTeam 47:be4eebf40568 33 nVector<pointParcours>& getParc () { return path; }
IceTeam 47:be4eebf40568 34 bool& getEnded () { return endedParc; }
IceTeam 47:be4eebf40568 35
IceTeam 47:be4eebf40568 36 protected:
IceTeam 47:be4eebf40568 37 nVector<obsCarr> obs;
IceTeam 47:be4eebf40568 38 nVector<pointParcours> path;
IceTeam 63:176d04975f06 39 nVector<objectif> objectifs;
IceTeam 57:86f491f5b25d 40
IceTeam 47:be4eebf40568 41 bool endedParc; // Definit s'il existe un chemin parcourable dans le dernier FindWay
IceTeam 64:24e1057a97f7 42 int couleur, formation;
IceTeam 47:be4eebf40568 43 Odometry* Codo;
IceTeam 64:24e1057a97f7 44 AX12 * Parasol;
IceTeam 64:24e1057a97f7 45 ControlleurPince * pince;
IceTeam 56:4fd9636dfb36 46
IceTeam 56:4fd9636dfb36 47 float min_x_table, min_y_table, max_x_table, max_y_table;
IceTeam 60:8d2320a54a32 48
IceTeam 60:8d2320a54a32 49 void Build_formation_1 (int couleur);
IceTeam 63:176d04975f06 50 void Build_formation_2 (int couleur);
IceTeam 72:b628daa54f3c 51 void Build_formation_3 (int couleur);
IceTeam 72:b628daa54f3c 52
IceTeam 64:24e1057a97f7 53 void Build_Objectives ();
IceTeam 47:be4eebf40568 54 };
IceTeam 47:be4eebf40568 55
IceTeam 47:be4eebf40568 56 #endif