34 #ifndef PIDCONTROLLER_HPP 35 #define PIDCONTROLLER_HPP 110 PidController(
double P = 0.0,
double I = 0.0,
double D = 0.0,
double I1 = 0.0,
double I2 = -0.0);
123 double updatePid(
double p_error, boost::posix_time::time_duration dt);
134 void initPid(
double P,
double I,
double D,
double I1,
double I2);
167 void setGains(
double P,
double I,
double D,
double i_max,
double i_min);
177 void getGains(
double &p,
double &i,
double &
d,
double &i_max,
double &i_min);
187 double updatePid(
double error,
double error_dot, boost::posix_time::time_duration dt);
void setGains(double P, double I, double D, double i_max, double i_min)
Set PID gains for the controller.
void setCurrentCmd(double cmd)
Set current command for this PID controller.
double getCurrentCmd()
Return current command for this PID controller.
double updatePid(double p_error, boost::posix_time::time_duration dt)
Update the Pid loop with nonuniform time step size.
void getCurrentPIDErrors(double &pe, double &ie, double &de)
Return PID error terms for the controller.
~PidController()
Destructor of Pid class.
PidController(double P=0.0, double I=0.0, double D=0.0, double I1=0.0, double I2=-0.0)
Constructor, zeros out Pid values when created and initialize Pid-gains and integral term limits:[iMa...
void getGains(double &p, double &i, double &d, double &i_max, double &i_min)
Get PID gains for the controller.
void reset()
Reset the state of this PID controller.
void initPid(double P, double I, double D, double I1, double I2)
Initialize PID-gains and integral term limits:[iMax:iMin]-[I1:I2].
PidController & operator=(const PidController &p)