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

Public Member Functions | |
| void | initialize (real_t step_size, real_t gain_kp, real_t gain_ki, real_t gain_kd, real_t filter_tf, PidType type=PidType::TRAPEZOIDAL) |
| Initialize PID. | |
| void | reset (real_t command, real_t measured) |
| Reset PID to given command and measure. | |
| real_t | evaluate (real_t command, real_t measured) |
| Evalaute PID. | |
| real_t fsb::PidController::evaluate | ( | real_t | command, |
| real_t | measured | ||
| ) |
Evalaute PID.
| command | Input command |
| measured | Measured feedback |
| void fsb::PidController::initialize | ( | real_t | step_size, |
| real_t | gain_kp, | ||
| real_t | gain_ki, | ||
| real_t | gain_kd, | ||
| real_t | 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_t | command, |
| real_t | 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 |