Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError > Class Template Reference

#include <dual_cascade_motor.hpp>

Inheritance diagram for fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >:
Collaboration diagram for fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >:

Public Types

using ControlledMotor = IOutputMotor< Output >
 
using ControlTelemetry = telemetry::ITelemetry< Control >
 
using IntermediateTelemetry = telemetry::ITelemetry< Intermediate >
 
using Pid = trap::algorithms::DualCascadePid< Control, Intermediate, Output, Time, MainError, IntermediateError >
 
using Config = Pid::Config
 

Public Member Functions

 DualCascadeMotor (const Config &config, std::unique_ptr< ControlledMotor > motor, std::unique_ptr< ControlTelemetry > controlTelemetry, std::unique_ptr< IntermediateTelemetry > intermediateTelemetry)
 
void initialize () override
 
void update () override
 
void update (const Time &delta)
 
void setTarget (const Control &control)
 

Detailed Description

template<typename Output, typename Control, typename Intermediate, typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
class fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >

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)

Member Typedef Documentation

◆ Config

template<typename Output , typename Control , typename Intermediate , typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
using fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::Config = Pid::Config

◆ ControlledMotor

template<typename Output , typename Control , typename Intermediate , typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
using fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::ControlledMotor = IOutputMotor<Output>

◆ ControlTelemetry

template<typename Output , typename Control , typename Intermediate , typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
using fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::ControlTelemetry = telemetry::ITelemetry<Control>

◆ IntermediateTelemetry

template<typename Output , typename Control , typename Intermediate , typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
using fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::IntermediateTelemetry = telemetry::ITelemetry<Intermediate>

◆ Pid

template<typename Output , typename Control , typename Intermediate , typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
using fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::Pid = trap::algorithms::DualCascadePid < Control, Intermediate, Output, Time, MainError, IntermediateError >

Constructor & Destructor Documentation

◆ DualCascadeMotor()

template<typename Output , typename Control , typename Intermediate , typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::DualCascadeMotor ( const Config config,
std::unique_ptr< ControlledMotor motor,
std::unique_ptr< ControlTelemetry controlTelemetry,
std::unique_ptr< IntermediateTelemetry intermediateTelemetry 
)
inline

Member Function Documentation

◆ initialize()

template<typename Output , typename Control , typename Intermediate , typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
void fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::initialize ( )
inlineoverride

◆ setTarget()

template<typename Output , typename Control , typename Intermediate , typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
void fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::setTarget ( const Control &  control)
inline

◆ update() [1/2]

template<typename Output , typename Control , typename Intermediate , typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
void fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::update ( )
inlineoverride

◆ update() [2/2]

template<typename Output , typename Control , typename Intermediate , typename Time = Seconds, typename MainError = Control, typename IntermediateError = Intermediate>
void fang::motor::DualCascadeMotor< Output, Control, Intermediate, Time, MainError, IntermediateError >::update ( const Time &  delta)
inline

Back door function used for testing until we DI chrono based classes, too.


The documentation for this class was generated from the following file: