31template <
int States,
int Inputs>
44 template <
int Outputs>
60 DiscretizeAB<States, Inputs>(A, B, dt, &m_A, &m_B);
78 double Uff(
int i)
const {
return m_uff(i); }
94 double R(
int i)
const {
return m_r(i); }
140 m_uff = m_B.householderQr().solve(nextR - (m_A * r));
149 units::second_t m_dt;
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
Constructs a plant inversion model-based feedforward from a LinearSystem.
Definition: LinearPlantInversionFeedforward.h:32
double R(int i) const
Returns an element of the reference vector r.
Definition: LinearPlantInversionFeedforward.h:94
InputVector Calculate(const StateVector &r, const StateVector &nextR)
Calculate the feedforward with current and future reference vectors.
Definition: LinearPlantInversionFeedforward.h:139
Vectord< Inputs > InputVector
Definition: LinearPlantInversionFeedforward.h:35
const InputVector & Uff() const
Returns the previously calculated feedforward as an input vector.
Definition: LinearPlantInversionFeedforward.h:69
const StateVector & R() const
Returns the current reference vector r.
Definition: LinearPlantInversionFeedforward.h:85
Vectord< States > StateVector
Definition: LinearPlantInversionFeedforward.h:34
void Reset(const StateVector &initialState)
Resets the feedforward with a specified initial state vector.
Definition: LinearPlantInversionFeedforward.h:101
InputVector Calculate(const StateVector &nextR)
Calculate the feedforward with only the desired future reference.
Definition: LinearPlantInversionFeedforward.h:127
void Reset()
Resets the feedforward with a zero initial state vector.
Definition: LinearPlantInversionFeedforward.h:109
LinearPlantInversionFeedforward(const LinearSystem< States, Inputs, Outputs > &plant, units::second_t dt)
Constructs a feedforward with the given plant.
Definition: LinearPlantInversionFeedforward.h:45
double Uff(int i) const
Returns an element of the previously calculated feedforward.
Definition: LinearPlantInversionFeedforward.h:78
LinearPlantInversionFeedforward(const Matrixd< States, States > &A, const Matrixd< States, Inputs > &B, units::second_t dt)
Constructs a feedforward with the given coefficients.
Definition: LinearPlantInversionFeedforward.h:56
A plant defined using state-space notation.
Definition: LinearSystem.h:31
Definition: AprilTagPoseEstimator.h:15
Eigen::Vector< double, Size > Vectord
Definition: EigenCore.h:12