Robot's source code
Dependencies: mbed
Diff: Asserv_Plan_B/planB.h
- Revision:
- 106:05096985d1b2
- Parent:
- 93:4d5664e9188a
- Child:
- 108:890094ee202a
--- a/Asserv_Plan_B/planB.h Mon May 04 13:00:28 2015 +0000 +++ b/Asserv_Plan_B/planB.h Tue May 05 05:05:07 2015 +0000 @@ -1,3 +1,6 @@ +#ifndef PLANB_H +#define PLANB_H + #include "mbed.h" #include "Odometry2.h" #include "Motor.h" @@ -9,9 +12,10 @@ void update(float dt); void control_speed(); void setGoal(float x, float y, float theta); + void setGoal(float x, float y); bool isArrived(void) {return done;} 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: @@ -25,11 +29,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 done, squip; int N; char state; @@ -40,4 +44,6 @@ float erreur_position_d, position_d; float consigne_position_g, consigne_position_d; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file