|
HoloLib
High-performance holonomic (X-Drive) control library for VEX V5
|
A scheduler that interpolates and selects PID gains based on the current error. More...
#include <GainScheduler.hpp>
Public Member Functions | |
| void | addStep (float threshold, float kP, float kI, float kD, float slew=0.0f) |
| Add a scheduling step. | |
| PIDGains | getGains (float error) const |
| Compute the correct gains based on the current error distance. | |
| void | clear () |
| Clears the current schedules. | |
| void | setGains (std::vector< ScheduledGain > newSchedules) |
A scheduler that interpolates and selects PID gains based on the current error.
Definition at line 19 of file GainScheduler.hpp.
| void hololib::GainScheduler::addStep | ( | float | threshold, |
| float | kP, | ||
| float | kI, | ||
| float | kD, | ||
| float | slew = 0.0f |
||
| ) |
Add a scheduling step.
| threshold | Max error for this step. |
| kP | Proportional gain. |
| kI | Integral gain. |
| kD | Derivative gain. |
| slew | Slew rate. |
| PIDGains hololib::GainScheduler::getGains | ( | float | error | ) | const |
Compute the correct gains based on the current error distance.
| error | The current positional or rotational error. |
| void hololib::GainScheduler::clear | ( | ) |
Clears the current schedules.
| void hololib::GainScheduler::setGains | ( | std::vector< ScheduledGain > | newSchedules | ) |