53 lines
1.4 KiB
C
53 lines
1.4 KiB
C
|
|
|
|
//#define ROBOT_PROPULSION_2026
|
|
#define ROBOT_TYPE_PAMI
|
|
|
|
#ifndef ROBOT_PROPULSION_2026
|
|
#ifndef ROBOT_TYPE_PAMI
|
|
#error "Vous devez choisir un type de robot"
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef ROBOT_PROPULSION_2026
|
|
#ifdef ROBOT_TYPE_PAMI
|
|
#error "Vous devez choisir un seul type de robot"
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
// Paramètres pour PAMI
|
|
#ifdef ROBOT_TYPE_PAMI
|
|
// Asservissement des moteurs
|
|
#define ASSERMOTEUR_GAIN_P 30000.f
|
|
#define ASSERMOTEUR_GAIN_I 3000.f
|
|
// Commande en vitesse / Rotation
|
|
#define DISTANCE_ROUES_CENTRE_MM 52.
|
|
// Codeurs
|
|
#define PIN_QEI_CODEUR_A 11
|
|
#define PIN_QEI_CODEUR_B 2
|
|
#define IMPULSION_PAR_MM_50_1 (12.45f)
|
|
#define IMPULSION_PAR_MM_30_1 (7.47f)
|
|
#define IMPULSION_PAR_MM IMPULSION_PAR_MM_50_1
|
|
// Asservissement en position
|
|
#define ASSER_POSITION_GAIN_P_POSITION 5
|
|
#define ASSER_POSITION_GAIN_P_ORIENTATION 5
|
|
#define ASSER_POSITION_MAX_ERREUR_ANGLE (30 * DEGRE_EN_RADIAN)
|
|
#endif
|
|
|
|
// Paramètre Robot 2026
|
|
#ifdef ROBOT_PROPULSION_2026
|
|
#define ASSERMOTEUR_GAIN_P 150.f
|
|
#define ASSERMOTEUR_GAIN_I 1.f
|
|
// Commande en vitesse / Rotation
|
|
#define DISTANCE_ROUES_CENTRE_MM 103.
|
|
// Codeurs
|
|
#define PIN_QEI_CODEUR_A 14
|
|
#define PIN_QEI_CODEUR_B 10
|
|
#define IMPULSION_PAR_MM (7.57f)
|
|
// Asservissement en position
|
|
#define ASSER_POSITION_GAIN_P_POSITION 5
|
|
#define ASSER_POSITION_GAIN_P_ORIENTATION 5
|
|
#define ASSER_POSITION_MAX_ERREUR_ANGLE (30 * DEGRE_EN_RADIAN)
|
|
#endif |