11#define ENCODER_LIMIT 4000.0f
13typedef pair<int, float>
pif;
Encoder class with helper functions, derived from QEI.
Definition: encoder.h:28
Proportional-integral-derivative controller.
Definition: PID.h:57
Controller class to handle speed and steering of the buggy.
Definition: wheelcontrol.h:18
void m_setProcessValue(float left_val, float right_val)
Set process value for left controller and right controller.
void setTargetSpeed(float speed)
Set the target speed in m/s.
PID m_linecontroller
PID controller for line position.
Definition: wheelcontrol.h:27
vector< pif > computeSpeed(float position, const Encoder &left_encoder, const Encoder &right_encoder)
Compute the speed in pps for the left and right motors.
void setSpeedController(float Kc, float tauI, float tauD)
Set the speed controller tuning parameters.
PID m_rightcontroller
PID controller for right speed.
Definition: wheelcontrol.h:24
void setLineController(float Kc, float tauI, float tauD)
Set the line controller tuning parameters.
float m_target
PID output for line controller.
Definition: wheelcontrol.h:30
void m_setSetPoint(float left_val, float right_val)
Set setpoint for left controller and right controller.
void reset()
Reset the PID controllers to initial state.
void setPWMLimits(float low, float high)
Set the PWM controller output limits.
PID m_leftcontroller
PID controller for left speed.
Definition: wheelcontrol.h:21
void setLineLimits(float low, float high)
Set the line controller input limits.
WheelControl()
Constructor.
pair< int, float > pif
Pair<int,float> as pair<direction,PWMOut>.
Definition: wheelcontrol.h:13