YAMS
Yet Another Mechanism System
Loading...
Searching...
No Matches
yams::math::LQRConfig::LoopBundle< States > Struct Template Reference

#include <LQRConfig.hpp>

Public Member Functions

 LoopBundle (const wpi::math::LinearSystem< States, 1, 1 > &system, const wpi::util::array< double, States > &qElems, const wpi::util::array< double, 1 > &rElems, const wpi::util::array< double, States > &stateStdDevs, const wpi::util::array< double, 1 > &measStdDevs, wpi::units::volt_t maxV, wpi::units::second_t dt)
 LoopBundle (const LoopBundle &)=delete
LoopBundle & operator= (const LoopBundle &)=delete
 LoopBundle (LoopBundle &&)=delete
LoopBundle & operator= (LoopBundle &&)=delete

Public Attributes

wpi::math::LinearSystem< States, 1, 1 > plant
 The plant the filter points to.
wpi::math::LinearQuadraticRegulator< States, 1 > controller
 The LQR the loop points to.
wpi::math::KalmanFilter< States, 1, 1 > observer
 The Kalman filter the loop points to.
wpi::math::LinearSystemLoop< States, 1, 1 > loop
 The loop to run.

Detailed Description

template<int States>
struct yams::math::LQRConfig::LoopBundle< States >

A LinearSystemLoop with everything it points to. wpi::math::LinearSystemLoop keeps raw pointers to its LQR and Kalman filter, and wpi::math::KalmanFilter keeps a raw pointer to its plant, so all four live together here, on the heap, the plant first. Neither copyable nor movable, so the pointers never dangle.

Template Parameters
StatesNumber of modeled states: 1 for a flywheel, 2 for an arm or elevator.

Constructor & Destructor Documentation

◆ LoopBundle() [1/3]

template<int States>
yams::math::LQRConfig::LoopBundle< States >::LoopBundle ( const wpi::math::LinearSystem< States, 1, 1 > & system,
const wpi::util::array< double, States > & qElems,
const wpi::util::array< double, 1 > & rElems,
const wpi::util::array< double, States > & stateStdDevs,
const wpi::util::array< double, 1 > & measStdDevs,
wpi::units::volt_t maxV,
wpi::units::second_t dt )
inline

Build the loop.

Parameters
systemPlant.
qElemsState error tolerances.
rElemsControl effort tolerance.
stateStdDevsModel standard deviations.
measStdDevsEncoder standard deviation.
maxVMaximum output voltage.
dtLoop period.

◆ LoopBundle() [2/3]

template<int States>
yams::math::LQRConfig::LoopBundle< States >::LoopBundle ( const LoopBundle< States > & )
delete

◆ LoopBundle() [3/3]

template<int States>
yams::math::LQRConfig::LoopBundle< States >::LoopBundle ( LoopBundle< States > && )
delete

Member Function Documentation

◆ operator=() [1/2]

template<int States>
LoopBundle & yams::math::LQRConfig::LoopBundle< States >::operator= ( const LoopBundle< States > & )
delete

◆ operator=() [2/2]

template<int States>
LoopBundle & yams::math::LQRConfig::LoopBundle< States >::operator= ( LoopBundle< States > && )
delete

Member Data Documentation

◆ controller

template<int States>
wpi::math::LinearQuadraticRegulator<States, 1> yams::math::LQRConfig::LoopBundle< States >::controller

The LQR the loop points to.

◆ loop

template<int States>
wpi::math::LinearSystemLoop<States, 1, 1> yams::math::LQRConfig::LoopBundle< States >::loop

The loop to run.

◆ observer

template<int States>
wpi::math::KalmanFilter<States, 1, 1> yams::math::LQRConfig::LoopBundle< States >::observer

The Kalman filter the loop points to.

◆ plant

template<int States>
wpi::math::LinearSystem<States, 1, 1> yams::math::LQRConfig::LoopBundle< States >::plant

The plant the filter points to.


The documentation for this struct was generated from the following file:
  • /home/runner/work/YAMS/YAMS/yams/cpp/include/yams/math/LQRConfig.hpp