|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
#include <smooth_pid.hpp>

Public Types | |
| using | Config = tap::algorithms::SmoothPidConfig |
Public Member Functions | |
| SmoothPid (const Config &config, ErrorType initialLastError=ErrorType{0.0}) | |
| ControlType | runController (ErrorType error) |
| ControlType | runController (const ErrorType &error, const TimeUnit &deltaTime) |
| ControlType | runController (ErrorType error, double errorDerivative, TimeUnit deltaTime) |
This will require the use of units::lenth::meters instead of units::length::meter_t The control unit is the unit that is used to change the system The error unit is the unit that the system takes as an input The time unit is unit for the passage of time
| using trap::algorithms::SmoothPid< ErrorType, ControlType, TimeUnit >::Config = tap::algorithms::SmoothPidConfig |
|
inline |
|
inline |
Manual delta time but with automatic derivative calculation
|
inline |
error - how much error This wrapper automatically calculates how much the error has changed and the amount of time which has passed between calls
|
inline |
Manually include delta time (this is for testing purposes but may bear use to future testers) For implementation purposes, the errorDerivative is stripped of any unit