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


Public Types | |
| using | ControlledMotor = IOutputMotor< Output > |
| using | ControlTelemetry = telemetry::ITelemetry< Control > |
| using | IntermediateTelemetry = telemetry::ITelemetry< Intermediate > |
| using | Pid = trap::algorithms::DualModdedPid< Control, Intermediate, Output, Time, MainError, IntermediateError > |
| using | Config = Pid::Config |
| using | MainModder = Pid::MainModder |
| using | IntermediateModder = Pid::IntermediateModder |
Public Member Functions | |
| ModdedCascadeMotor (const Config &config, std::unique_ptr< ControlledMotor > motor, std::unique_ptr< ControlTelemetry > controlTelemetry, std::unique_ptr< IntermediateTelemetry > intermediateTelemetry, std::unique_ptr< MainModder > mainModder=std::make_unique< trap::algorithms::NullPidModder< Intermediate > >(), std::unique_ptr< IntermediateModder > intermediateModder=std::make_unique< trap::algorithms::NullPidModder< Output > >()) | |
| void | initialize () override |
| void | update () override |
| void | update (const Time &delta) |
| void | setTarget (const Control &control) |
This functions exactly as DualCascadeMotor (taking an output motor and applying PID based on the telemetry it recieves)
This has an optional modders for the PID for feedForward.
For example, the output can be modded or the intermediate pid (target speed in most cases) can be given an additoinal speed target ahead of time
Template parameters: Output - the output motor it accepts Control - the type used for controlling and intermediate calculations of Pid Intermediate - the type used in between controlling and outputting (2nd pid)
| using fang::motor::ModdedCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::Config = Pid::Config |
| using fang::motor::ModdedCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::ControlledMotor = IOutputMotor<Output> |
| using fang::motor::ModdedCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::ControlTelemetry = telemetry::ITelemetry<Control> |
| using fang::motor::ModdedCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::IntermediateModder = Pid::IntermediateModder |
| using fang::motor::ModdedCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::IntermediateTelemetry = telemetry::ITelemetry<Intermediate> |
| using fang::motor::ModdedCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::MainModder = Pid::MainModder |
| using fang::motor::ModdedCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::Pid = trap::algorithms::DualModdedPid < Control, Intermediate, Output, Time, MainError, IntermediateError > |
|
inline |
|
inlineoverride |
|
inline |
|
inlineoverride |
|
inline |
Back door function used for testing until we DI chrono based classes, too.