
Robot's source code
Dependencies: mbed
Diff: Asserv_Plan_B/planB.h
- Revision:
- 110:7e71e5cd8197
- Parent:
- 109:53918ba98306
- Parent:
- 108:890094ee202a
- Child:
- 113:a30ae31795e8
--- a/Asserv_Plan_B/planB.h Tue May 05 16:35:53 2015 +0000 +++ b/Asserv_Plan_B/planB.h Tue May 05 16:52:09 2015 +0000 @@ -1,5 +1,5 @@ -#ifndef PLAN_H -#define PLAN_H +#ifndef PLANB_H +#define PLANB_H #include "mbed.h" #include "Odometry2.h" @@ -12,9 +12,11 @@ void update(float dt); void control_speed(); void setGoal(float x, float y, float theta); - bool isArrived(void) {return done;} + void setGoal(float x, float y); + void aserv_planB::stop(void); + bool isArrived(void) {return arrived;} float carre(float x) {return x*x;} - float Kp_angle, Kd_angle; + float Kp_angle, Kd_angle, Ki_angle; float Kp_distance, Ki_distance, Kd_distance; private: @@ -28,11 +30,11 @@ float consigne_g, consigne_d; float somme_erreur, somme_erreur_d; float erreur_precedente; - float m_goalX, m_goalY, m_goalTheta; - float distance_g, distance_d; + float m_goalX, m_goalY, m_goalPhi; + float distanceGoal, distance; float thetaGoal; float memo_g, memo_d; - bool done; + bool arrived, squip; int N; char state; @@ -45,4 +47,5 @@ }; + #endif