
Robot's source code
Dependencies: mbed
Asserv_Plan_B/planB.h@71:95d76c181b22, 2015-04-10 (annotated)
- Committer:
- Jagang
- Date:
- Fri Apr 10 18:01:54 2015 +0000
- Revision:
- 71:95d76c181b22
- Parent:
- 70:56086a37f31f
- Child:
- 79:d97090bb6470
asservB angle
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(); |
sype | 70:56086a37f31f | 11 | void control_position(); |
Jagang | 71:95d76c181b22 | 12 | void setGoal(float x, float y, float theta); |
sype | 70:56086a37f31f | 13 | float Kp, Ki, Kd; |
sype | 64:6489bcfc1173 | 14 | |
sype | 64:6489bcfc1173 | 15 | private: |
Jagang | 71:95d76c181b22 | 16 | Odometry2 &m_odometry; |
Jagang | 62:454cd844fe1e | 17 | Motor &m_motorL; |
Jagang | 62:454cd844fe1e | 18 | Motor &m_motorR; |
sype | 64:6489bcfc1173 | 19 | |
sype | 64:6489bcfc1173 | 20 | float erreur_g, vitesse_g; |
sype | 64:6489bcfc1173 | 21 | float erreur_d, vitesse_d; |
sype | 64:6489bcfc1173 | 22 | float cmd_g, cmd_d; |
sype | 64:6489bcfc1173 | 23 | float consigne_g, consigne_d; |
sype | 70:56086a37f31f | 24 | float somme_erreur_g, somme_erreur_d; |
sype | 70:56086a37f31f | 25 | |
Jagang | 71:95d76c181b22 | 26 | float m_goalX, m_goalY, m_goalTheta; |
Jagang | 71:95d76c181b22 | 27 | |
Jagang | 71:95d76c181b22 | 28 | char state; |
Jagang | 71:95d76c181b22 | 29 | |
sype | 70:56086a37f31f | 30 | float erreur_position_g, position_g; |
sype | 70:56086a37f31f | 31 | float erreur_position_d, position_d; |
sype | 70:56086a37f31f | 32 | float consigne_position_g, consigne_position_d; |
sype | 64:6489bcfc1173 | 33 | |
Jagang | 62:454cd844fe1e | 34 | }; |