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


Public Types | |
| using | IModder = IPidModder< ControlType > |
| using | BasePid = SmoothPid< ErrorType, ControlType, TimeUnit > |
| using | Config = BasePid::Config |
Public Types inherited from trap::algorithms::SmoothPid< ErrorType, ControlType, TimeUnit > | |
| using | Config = tap::algorithms::SmoothPidConfig |
Public Member Functions | |
| ModdedPid (const Config &config, std::unique_ptr< IModder > modder=std::make_unique< NullPidModder< ControlType > >(), ErrorType initialLastError=ErrorType{0.0}) | |
| ControlType | runController (ErrorType error) |
| ControlType | runController (const ErrorType &error, const TimeUnit &deltaTime) |
Public Member Functions inherited from trap::algorithms::SmoothPid< ErrorType, ControlType, TimeUnit > | |
| 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 This allows different feedfoward "modders" to change the pid output in a bundle
| using trap::algorithms::ModdedPid< ErrorType, ControlType, TimeUnit >::BasePid = SmoothPid<ErrorType, ControlType, TimeUnit> |
| using trap::algorithms::ModdedPid< ErrorType, ControlType, TimeUnit >::Config = BasePid::Config |
| using trap::algorithms::ModdedPid< ErrorType, ControlType, TimeUnit >::IModder = IPidModder<ControlType> |
|
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