PIDController¶
- class commands1.PIDController(*args, **kwargs)¶
Bases:
commands1._impl._commands_v1.command.PIDBase
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.
This class is provided by the OldCommands VendorDep
- Deprecated
Use frc2::PIDController class instead.
Overloaded function.
__init__(self: commands1._impl._commands_v1.command.PIDController, p: float, i: float, d: float, source: commands1._impl._commands_v1.command.PIDSource, output: commands1._impl._commands_v1.command.PIDOutput, period: float = 0.05) -> None
__init__(self: commands1._impl._commands_v1.command.PIDController, p: float, i: float, d: float, f: float, source: commands1._impl._commands_v1.command.PIDSource, output: commands1._impl._commands_v1.command.PIDOutput, period: float = 0.05) -> None
- disable() None ¶
Stop running the PIDController, this sets the output to zero before stopping.
- enable() None ¶
Begin running the PIDController.
- initSendable(builder: wpiutil._wpiutil.SendableBuilder) None ¶
- isEnabled() bool ¶
Return true if PIDController is enabled.
- reset() None ¶
Reset the previous error, the integral term, and disable the controller.
- setEnabled(enable: bool) None ¶
Set the enabled state of the PIDController.