LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
okapi::PIDTuner Class Reference

#include <pidTuner.hpp>

Classes

struct  Output
 
struct  Particle
 
struct  ParticleSet
 

Public Member Functions

 PIDTuner (const std::shared_ptr< ControllerInput< double > > &iinput, const std::shared_ptr< ControllerOutput< double > > &ioutput, const TimeUtil &itimeUtil, QTime itimeout, std::int32_t igoal, double ikPMin, double ikPMax, double ikIMin, double ikIMax, double ikDMin, double ikDMax, std::size_t inumIterations=5, std::size_t inumParticles=16, double ikSettle=1, double ikITAE=2, const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger())
 
virtual ~PIDTuner ()
 
virtual Output autotune ()
 

Protected Attributes

std::shared_ptr< Loggerlogger
 
TimeUtil timeUtil
 
std::shared_ptr< ControllerInput< double > > input
 
std::shared_ptr< ControllerOutput< double > > output
 
const QTime timeout
 
const std::int32_t goal
 
const double kPMin
 
const double kPMax
 
const double kIMin
 
const double kIMax
 
const double kDMin
 
const double kDMax
 
const std::size_t numIterations
 
const std::size_t numParticles
 
const double kSettle
 
const double kITAE
 

Static Protected Attributes

static constexpr double inertia = 0.5
 
static constexpr double confSelf = 1.1
 
static constexpr double confSwarm = 1.2
 
static constexpr int increment = 5
 
static constexpr int divisor = 5
 
static constexpr QTime loopDelta = 10_ms
 

Detailed Description

Definition at line 18 of file pidTuner.hpp.

Constructor & Destructor Documentation

◆ PIDTuner()

okapi::PIDTuner::PIDTuner ( const std::shared_ptr< ControllerInput< double > > &  iinput,
const std::shared_ptr< ControllerOutput< double > > &  ioutput,
const TimeUtil itimeUtil,
QTime  itimeout,
std::int32_t  igoal,
double  ikPMin,
double  ikPMax,
double  ikIMin,
double  ikIMax,
double  ikDMin,
double  ikDMax,
std::size_t  inumIterations = 5,
std::size_t  inumParticles = 16,
double  ikSettle = 1,
double  ikITAE = 2,
const std::shared_ptr< Logger > &  ilogger = Logger::getDefaultLogger() 
)

◆ ~PIDTuner()

virtual okapi::PIDTuner::~PIDTuner ( )
virtual

Member Function Documentation

◆ autotune()

virtual Output okapi::PIDTuner::autotune ( )
virtual

Member Data Documentation

◆ confSelf

constexpr double okapi::PIDTuner::confSelf = 1.1
staticconstexprprotected

Definition at line 47 of file pidTuner.hpp.

◆ confSwarm

constexpr double okapi::PIDTuner::confSwarm = 1.2
staticconstexprprotected

Definition at line 48 of file pidTuner.hpp.

◆ divisor

constexpr int okapi::PIDTuner::divisor = 5
staticconstexprprotected

Definition at line 50 of file pidTuner.hpp.

◆ goal

const std::int32_t okapi::PIDTuner::goal
protected

Definition at line 68 of file pidTuner.hpp.

◆ increment

constexpr int okapi::PIDTuner::increment = 5
staticconstexprprotected

Definition at line 49 of file pidTuner.hpp.

◆ inertia

constexpr double okapi::PIDTuner::inertia = 0.5
staticconstexprprotected

Definition at line 46 of file pidTuner.hpp.

◆ input

std::shared_ptr<ControllerInput<double> > okapi::PIDTuner::input
protected

Definition at line 64 of file pidTuner.hpp.

◆ kDMax

const double okapi::PIDTuner::kDMax
protected

Definition at line 74 of file pidTuner.hpp.

◆ kDMin

const double okapi::PIDTuner::kDMin
protected

Definition at line 73 of file pidTuner.hpp.

◆ kIMax

const double okapi::PIDTuner::kIMax
protected

Definition at line 72 of file pidTuner.hpp.

◆ kIMin

const double okapi::PIDTuner::kIMin
protected

Definition at line 71 of file pidTuner.hpp.

◆ kITAE

const double okapi::PIDTuner::kITAE
protected

Definition at line 78 of file pidTuner.hpp.

◆ kPMax

const double okapi::PIDTuner::kPMax
protected

Definition at line 70 of file pidTuner.hpp.

◆ kPMin

const double okapi::PIDTuner::kPMin
protected

Definition at line 69 of file pidTuner.hpp.

◆ kSettle

const double okapi::PIDTuner::kSettle
protected

Definition at line 77 of file pidTuner.hpp.

◆ logger

std::shared_ptr<Logger> okapi::PIDTuner::logger
protected

Definition at line 62 of file pidTuner.hpp.

◆ loopDelta

constexpr QTime okapi::PIDTuner::loopDelta = 10_ms
staticconstexprprotected

Definition at line 51 of file pidTuner.hpp.

◆ numIterations

const std::size_t okapi::PIDTuner::numIterations
protected

Definition at line 75 of file pidTuner.hpp.

◆ numParticles

const std::size_t okapi::PIDTuner::numParticles
protected

Definition at line 76 of file pidTuner.hpp.

◆ output

std::shared_ptr<ControllerOutput<double> > okapi::PIDTuner::output
protected

Definition at line 65 of file pidTuner.hpp.

◆ timeout

const QTime okapi::PIDTuner::timeout
protected

Definition at line 67 of file pidTuner.hpp.

◆ timeUtil

TimeUtil okapi::PIDTuner::timeUtil
protected

Definition at line 63 of file pidTuner.hpp.


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