|
| PIDController (double p, double i, double d, PIDSource *source, PIDOutput *output, double period=0.05) |
| Allocate a PID object with the given constants for P, I, D. More...
|
|
| PIDController (double p, double i, double d, double f, PIDSource *source, PIDOutput *output, double period=0.05) |
| Allocate a PID object with the given constants for P, I, D. More...
|
|
| PIDController (double p, double i, double d, PIDSource &source, PIDOutput &output, double period=0.05) |
| Allocate a PID object with the given constants for P, I, D. More...
|
|
| PIDController (double p, double i, double d, double f, PIDSource &source, PIDOutput &output, double period=0.05) |
| Allocate a PID object with the given constants for P, I, D. More...
|
|
| PIDController (PIDController &&)=default |
|
PIDController & | operator= (PIDController &&)=default |
|
void | Enable () override |
| Begin running the PIDController.
|
|
void | Disable () override |
| Stop running the PIDController, this sets the output to zero before stopping.
|
|
void | SetEnabled (bool enable) |
| Set the enabled state of the PIDController.
|
|
bool | IsEnabled () const |
| Return true if PIDController is enabled.
|
|
void | Reset () override |
| Reset the previous error, the integral term, and disable the controller.
|
|
void | InitSendable (SendableBuilder &builder) override |
| Initializes this Sendable object. More...
|
|
| PIDBase (double p, double i, double d, PIDSource &source, PIDOutput &output) |
| Allocate a PID object with the given constants for P, I, D. More...
|
|
| PIDBase (double p, double i, double d, double f, PIDSource &source, PIDOutput &output) |
| Allocate a PID object with the given constants for P, I, D. More...
|
|
| PIDBase (PIDBase &&)=default |
|
PIDBase & | operator= (PIDBase &&)=default |
|
virtual double | Get () const |
| Return the current PID result. More...
|
|
virtual void | SetContinuous (bool continuous=true) |
| Set the PID controller to consider the input to be continuous,. More...
|
|
virtual void | SetInputRange (double minimumInput, double maximumInput) |
| Sets the maximum and minimum values expected from the input. More...
|
|
virtual void | SetOutputRange (double minimumOutput, double maximumOutput) |
| Sets the minimum and maximum values to write. More...
|
|
void | SetPID (double p, double i, double d) override |
| Set the PID Controller gain parameters. More...
|
|
virtual void | SetPID (double p, double i, double d, double f) |
| Set the PID Controller gain parameters. More...
|
|
void | SetP (double p) |
| Set the Proportional coefficient of the PID controller gain. More...
|
|
void | SetI (double i) |
| Set the Integral coefficient of the PID controller gain. More...
|
|
void | SetD (double d) |
| Set the Differential coefficient of the PID controller gain. More...
|
|
void | SetF (double f) |
| Get the Feed forward coefficient of the PID controller gain. More...
|
|
double | GetP () const override |
| Get the Proportional coefficient. More...
|
|
double | GetI () const override |
| Get the Integral coefficient. More...
|
|
double | GetD () const override |
| Get the Differential coefficient. More...
|
|
virtual double | GetF () const |
| Get the Feed forward coefficient. More...
|
|
void | SetSetpoint (double setpoint) override |
| Set the setpoint for the PIDBase. More...
|
|
double | GetSetpoint () const override |
| Returns the current setpoint of the PIDBase. More...
|
|
double | GetDeltaSetpoint () const |
| Returns the change in setpoint over time of the PIDBase. More...
|
|
virtual double | GetError () const |
| Returns the current difference of the input from the setpoint. More...
|
|
virtual double | GetAvgError () const |
| Returns the current average of the error over the past few iterations. More...
|
|
virtual void | SetPIDSourceType (PIDSourceType pidSource) |
| Sets what type of input the PID controller will use.
|
|
virtual PIDSourceType | GetPIDSourceType () const |
| Returns the type of input the PID controller is using. More...
|
|
virtual void | SetTolerance (double percent) |
| Set the percentage error which is considered tolerable for use with OnTarget. More...
|
|
virtual void | SetAbsoluteTolerance (double absValue) |
| Set the absolute error which is considered tolerable for use with OnTarget. More...
|
|
virtual void | SetPercentTolerance (double percentValue) |
| Set the percentage error which is considered tolerable for use with OnTarget. More...
|
|
virtual void | SetToleranceBuffer (int buf=1) |
| Set the number of previous error samples to average for tolerancing. More...
|
|
virtual bool | OnTarget () const |
| Return true if the error is within the percentage of the total input range, determined by SetTolerance. More...
|
|
void | Reset () override |
| Reset the previous error, the integral term, and disable the controller.
|
|
void | PIDWrite (double output) override |
| Passes the output directly to SetSetpoint(). More...
|
|
void | InitSendable (SendableBuilder &builder) override |
| Initializes this Sendable object. More...
|
|
| SendableBase (bool addLiveWindow=true) |
| Creates an instance of the sensor base. More...
|
|
| SendableBase (SendableBase &&rhs) |
|
SendableBase & | operator= (SendableBase &&rhs) |
|
std::string | GetName () const final |
| Gets the name of this Sendable object. More...
|
|
void | SetName (const wpi::Twine &name) final |
| Sets the name of this Sendable object. More...
|
|
std::string | GetSubsystem () const final |
| Gets the subsystem name of this Sendable object. More...
|
|
void | SetSubsystem (const wpi::Twine &subsystem) final |
| Sets the subsystem name of this Sendable object. More...
|
|
| Sendable (Sendable &&)=default |
|
Sendable & | operator= (Sendable &&)=default |
|
void | SetName (const wpi::Twine &subsystem, const wpi::Twine &name) |
| Sets both the subsystem name and device name of this Sendable object. More...
|
|
| PIDInterface (PIDInterface &&)=default |
|
PIDInterface & | operator= (PIDInterface &&)=default |
|
| Controller (Controller &&)=default |
|
Controller & | operator= (Controller &&)=default |
|
Class implements a PID Control Loop.
Creates a separate thread which reads the given PIDSource and takes care of the integral calculations, as well as writing the given PIDOutput.
This feedback controller runs in discrete time, so time deltas are not used in the integral and derivative calculations. Therefore, the sample rate affects the controller's behavior for a given set of PID constants.