Ajout de la fonction de maintien de position après un trajet.
This commit is contained in:
		
							parent
							
								
									4fc35d5c1e
								
							
						
					
					
						commit
						30977bb4f1
					
				| @ -5,6 +5,8 @@ | |||||||
| #define GAIN_P_POSITION 100 | #define GAIN_P_POSITION 100 | ||||||
| #define GAIN_P_ORIENTATION 20 | #define GAIN_P_ORIENTATION 20 | ||||||
| 
 | 
 | ||||||
|  | struct position_t position_maintien; | ||||||
|  | 
 | ||||||
| /// @brief Asservissement de la position du robot. Les gains sont déterminés pour des positions très proches du robot
 | /// @brief Asservissement de la position du robot. Les gains sont déterminés pour des positions très proches du robot
 | ||||||
| /// C'est à la consigne d'être défini avant pour être atteignable.
 | /// C'est à la consigne d'être défini avant pour être atteignable.
 | ||||||
| /// Nécessite l'appel des fonctions QEI_update(); Localisation_gestion(); AsserMoteur_Gestion(_step_ms);
 | /// Nécessite l'appel des fonctions QEI_update(); Localisation_gestion(); AsserMoteur_Gestion(_step_ms);
 | ||||||
| @ -39,3 +41,11 @@ void Asser_Position(struct position_t position_consigne){ | |||||||
|      |      | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | void Asser_Position_set_Pos_Maintien(struct position_t position){ | ||||||
|  |     position_maintien=position; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void Asser_Position_maintien(){ | ||||||
|  |     Asser_Position(position_maintien); | ||||||
|  | } | ||||||
| @ -1,2 +1,4 @@ | |||||||
| #include "Geometrie.h" | #include "Geometrie.h" | ||||||
| void Asser_Position(struct position_t position_consigne); | void Asser_Position(struct position_t position_consigne); | ||||||
|  | void Asser_Position_set_Pos_Maintien(struct position_t position); | ||||||
|  | void Asser_Position_maintien(); | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								Trajet.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								Trajet.c
									
									
									
									
									
								
							| @ -67,6 +67,7 @@ enum etat_trajet_t Trajet_avance(double pas_de_temps_s){ | |||||||
|     Asser_Position(position); |     Asser_Position(position); | ||||||
| 
 | 
 | ||||||
|     if(Trajet_terminee(abscisse)){ |     if(Trajet_terminee(abscisse)){ | ||||||
|  |         Asser_Position_set_Pos_Maintien(position); | ||||||
|         trajet_etat = TRAJET_TERMINE; |         trajet_etat = TRAJET_TERMINE; | ||||||
|     } |     } | ||||||
|     return trajet_etat; |     return trajet_etat; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user