P1
Controller Class Reference
This class implements a controller that regulates the speed of the two motors of the ROME2 mobile robot. More...
#include <Controller.h>
Public Member Functions | |
| Controller (PwmOut &pwmLeft, PwmOut &pwmRight, EncoderCounter &counterLeft, EncoderCounter &counterRight) | |
| Creates and initialises the robot controller. | |
| virtual | ~Controller () |
| Deletes this Controller object. | |
| void | setDesiredSpeedLeft (float desiredSpeedLeft) |
| Sets the desired speed of the left motor. | |
| void | setDesiredSpeedRight (float desiredSpeedRight) |
| Sets the desired speed of the right motor. | |
Detailed Description
This class implements a controller that regulates the speed of the two motors of the ROME2 mobile robot.
Definition at line 19 of file Controller.h.
Constructor & Destructor Documentation
| Controller | ( | PwmOut & | pwmLeft, |
| PwmOut & | pwmRight, | ||
| EncoderCounter & | counterLeft, | ||
| EncoderCounter & | counterRight | ||
| ) |
Creates and initialises the robot controller.
- Parameters:
-
pwmLeft a reference to the pwm output for the left motor. pwmRight a reference to the pwm output for the right motor. counterLeft a reference to the encoder counter of the left motor. counterRight a reference to the encoder counter of the right motor.
Definition at line 27 of file Controller.cpp.
| ~Controller | ( | ) | [virtual] |
Deletes this Controller object.
Definition at line 62 of file Controller.cpp.
Member Function Documentation
| void setDesiredSpeedLeft | ( | float | desiredSpeedLeft ) |
Sets the desired speed of the left motor.
- Parameters:
-
desiredSpeedLeft desired speed given in [rpm].
Definition at line 71 of file Controller.cpp.
| void setDesiredSpeedRight | ( | float | desiredSpeedRight ) |
Sets the desired speed of the right motor.
- Parameters:
-
desiredSpeedRight desired speed given in [rpm].
Definition at line 80 of file Controller.cpp.
Generated on Wed Jul 20 2022 10:34:32 by
1.7.2