Guillaume Chauvon
/
Asservissment_robot2_v16_05
l
Diff: deplacement.h
- Revision:
- 2:3066e614372f
- Child:
- 3:d38aa400d5e7
diff -r 0d76bc4e1aea -r 3066e614372f deplacement.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deplacement.h Wed May 08 21:19:10 2019 +0000 @@ -0,0 +1,62 @@ +#ifndef DEPLACEMENT_H +#define DEPLACEMENT_H + +#define TAILLE_TAB 250 + +class deplacement{ + public: + deplacement(); + void asservissement(void); + void test_rotation_rel(double angle_vise); + void test_rotation_abs(double angle_vise); + void ligne_droite(long int distance); + void commande_vitesse(float vitesse_G, float vitesse_D); + void vitesse_nulle_D(int zero); + void vitesse_nulle_G(int zero); + void reculer_un_peu(int distance); + void ligne_droite_v2(long int distance); + void printftab(void); + void test(void); + void changement_consigne(int cons_D, int cons_G); + void bouton(); + void poussette(); + + + + private: + float consigne; + int consigne_D; + int consigne_G; + float somme_erreur_D; + float somme_erreur_G; + float erreur_precedente_D; + float erreur_precedente_G; + float erreur_glissee_D[5]; + float erreur_glissee_G[5]; + int compteur_glisse; + float Kp_D; + float Ki_D; + float Kd_D; + float Kp_G; + float Ki_G; + float Kd_G; + long int tick_prec_D; + long int tick_prec_G; + float tab_cmd_D[TAILLE_TAB]; + float tab_cmd_G[TAILLE_TAB]; + float vtab_D[TAILLE_TAB]; + float vtab_G[TAILLE_TAB]; + float erreur_tab_G[TAILLE_TAB]; + float erreur_tab_D[TAILLE_TAB]; + float somme_erreur_tab_G[TAILLE_TAB]; + float somme_erreur_tab_D[TAILLE_TAB]; + float c_D[TAILLE_TAB]; + float c_G[TAILLE_TAB]; + int dix_ms; + int consigne_tab[20][2]; + int compteur_asser; + double somme_y; +}; + + +#endif \ No newline at end of file