| |
Methods defined here:
- __init__(self, kp, ki, kd)
- Creates a PIDController.
Args:
kp: Integer. The constant term.
ki: Integer. The integrator term.
kd: Integer. The differential term.
- get_output(self, error)
- Does a PID calculation and returns the new output value.
Args:
error: Float. The current error value.
Returns:
Float. The output of the PID controller for the current error.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- Worker = <class 'pyparts.logic.pid_controller.Worker'>
- A worker for a PIDController to allow background processing.
PIDController.Worker can be used to run a PID controller loop in a
background thread. The worker calls the input function to get the current
error value. It then computes the output value using the PID controller and
calls the output function with that value.
Attributes:
_controller: PIDController. The PIDController used to calculate output
values.
_input_func: Function. Function called to determine error.
_output_func: Function. Function called with the output of the PID.
_set_point: Float. The desired value.
_stop: Boolean. Set to true to disable the controller.
|