Robot's source code
Dependencies: mbed
Asserv_Plan_B/planB.h@79:d97090bb6470, 2015-04-14 (annotated)
- Committer:
- sype
- Date:
- Tue Apr 14 18:27:53 2015 +0000
- Revision:
- 79:d97090bb6470
- Parent:
- 71:95d76c181b22
- Child:
- 84:24d727006218
PID posey
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sype | 59:67e0d6ed44b6 | 1 | #include "mbed.h" |
Jagang | 71:95d76c181b22 | 2 | #include "Odometry2.h" |
Jagang | 62:454cd844fe1e | 3 | #include "Motor.h" |
sype | 59:67e0d6ed44b6 | 4 | |
Jagang | 62:454cd844fe1e | 5 | class aserv_planB |
Jagang | 62:454cd844fe1e | 6 | { |
sype | 64:6489bcfc1173 | 7 | public: |
Jagang | 71:95d76c181b22 | 8 | aserv_planB(Odometry2 &odometry,Motor &motorL,Motor &motorR); |
Jagang | 62:454cd844fe1e | 9 | void update(float dt); |
sype | 64:6489bcfc1173 | 10 | void control_speed(); |
Jagang | 71:95d76c181b22 | 11 | void setGoal(float x, float y, float theta); |
sype | 70:56086a37f31f | 12 | float Kp, Ki, Kd; |
sype | 64:6489bcfc1173 | 13 | |
sype | 64:6489bcfc1173 | 14 | private: |
Jagang | 71:95d76c181b22 | 15 | Odometry2 &m_odometry; |
Jagang | 62:454cd844fe1e | 16 | Motor &m_motorL; |
Jagang | 62:454cd844fe1e | 17 | Motor &m_motorR; |
sype | 64:6489bcfc1173 | 18 | |
sype | 64:6489bcfc1173 | 19 | float erreur_g, vitesse_g; |
sype | 64:6489bcfc1173 | 20 | float erreur_d, vitesse_d; |
sype | 64:6489bcfc1173 | 21 | float cmd_g, cmd_d; |
sype | 64:6489bcfc1173 | 22 | float consigne_g, consigne_d; |
sype | 79:d97090bb6470 | 23 | float somme_erreur, somme_erreur_d; |
sype | 79:d97090bb6470 | 24 | float delta_erreur; |
sype | 79:d97090bb6470 | 25 | float erreur_precedente; |
Jagang | 71:95d76c181b22 | 26 | float m_goalX, m_goalY, m_goalTheta; |
sype | 79:d97090bb6470 | 27 | bool done; |
sype | 79:d97090bb6470 | 28 | int N; |
sype | 79:d97090bb6470 | 29 | float moyenne; |
sype | 79:d97090bb6470 | 30 | float limite; |
Jagang | 71:95d76c181b22 | 31 | |
Jagang | 71:95d76c181b22 | 32 | char state; |
sype | 79:d97090bb6470 | 33 | //char etat_angle; |
Jagang | 71:95d76c181b22 | 34 | |
sype | 79:d97090bb6470 | 35 | float cmd; |
sype | 70:56086a37f31f | 36 | float erreur_position_g, position_g; |
sype | 70:56086a37f31f | 37 | float erreur_position_d, position_d; |
sype | 70:56086a37f31f | 38 | float consigne_position_g, consigne_position_d; |
sype | 64:6489bcfc1173 | 39 | |
Jagang | 62:454cd844fe1e | 40 | }; |