Robot Principal 26
Documentation du Club Robot INSA Rennes 2026
Chargement...
Recherche...
Aucune correspondance
Wheeledbase/lib/motors/include/WheelMotor.h
Aller à la documentation de ce fichier.
1
6
7#ifndef MOTORS_WHEELMOTOR_H
8#define MOTORS_WHEELMOTOR_H
9
10#include "AbstractMotors.h"
11
18class WheelMotor : public AbstractMotor
19{
20public:
25 explicit WheelMotor(float maxVelocity = 1.0f);
26
31 [[nodiscard]] float getMaxVelocity() const override;
32
37 void setMaxVelocity(float maxVelocity);
38
40
43 float getConstant() const { return m_constant; }
44
46
49 float getWheelRadius() const { return m_wheelRadius; }
50
52
55 void setWheelRadius(float wheelRadius);
56
58
61 void setVelocity(float velocity) override;
62
63
65
68 void setConstant(float constant);
69
70private:
71 float m_maxVelocity;
72 float m_wheelRadius;
73 float m_constant;
74};
75
76
77#endif //MOTORS_WHEELMOTOR_H
Interface abstraite des moteurs.
Definition motors/include/AbstractMotors.h:14
Implémentation concrète d'un moteur de roue.
Definition motors/include/WheelMotor.h:19
void setVelocity(float velocity) override
Envoie une commande de vitesse au moteur.
float getMaxVelocity() const override
Retourne la vitesse maximale configurée.
void setConstant(float constant)
Paramètre la constante du moteur.
float getConstant() const
Renvoie la constante du moteur paramétrée.
Definition Wheeledbase/lib/motors/include/WheelMotor.h:43
float getWheelRadius() const
Renvoie le rayon de la roue du moteur.
Definition Wheeledbase/lib/motors/include/WheelMotor.h:49
WheelMotor(float maxVelocity=1.0f)
Construit un moteur de roue.
void setMaxVelocity(float maxVelocity)
Modifie la vitesse maximale (limitation logicielle).
void setWheelRadius(float wheelRadius)
Paramètre le rayon de la roue liée au moteur.