![]() |
FancySafeBot 0.0.1
A safe robotics library
|
PID Controller.
#include <fsb_pid.h>

Public Member Functions | |
| void | initialize (Real step_size, Real gain_kp, Real gain_ki, Real gain_kd, Real filter_tf, PidType type=PidType::TRAPEZOIDAL) |
| Initialize PID. | |
| void | reset (Real command, Real measured) |
| Reset PID to given command and measure. | |
| Real | evaluate (Real command, Real measured) |
| Evalaute PID. | |
| Real fsb::PidController::evaluate | ( | Real | command, |
| Real | measured | ||
| ) |
Evalaute PID.
| command | Input command |
| measured | Measured feedback |
| void fsb::PidController::initialize | ( | Real | step_size, |
| Real | gain_kp, | ||
| Real | gain_ki, | ||
| Real | gain_kd, | ||
| Real | filter_tf, | ||
| PidType | type = PidType::TRAPEZOIDAL |
||
| ) |
Initialize PID.
| step_size | Step size in seconds |
| gain_kp | Proportional gain |
| gain_ki | Integral gain |
| gain_kd | Derivative gain |
| filter_tf | Derivative filter time constant |
| type | Type of discretization |
| void fsb::PidController::reset | ( | Real | command, |
| Real | measured | ||
| ) |
Reset PID to given command and measure.
The integral and derivative components of the internal state will be set to 0
| command | Command value at reset |
| measured | Measured value at reset |