WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
StateSpaceUtil.hpp File Reference
#include <algorithm>
#include <array>
#include <concepts>
#include <limits>
#include <span>
#include <Eigen/Core>
#include "wpi/util/Algorithm.hpp"
#include "wpi/util/SymbolExports.hpp"

Go to the source code of this file.

Namespaces

namespace  wpi
namespace  wpi::math

Functions

template<std::same_as< double >... Ts>
constexpr Eigen::Matrix< double, sizeof...(Ts), sizeof...(Ts)> wpi::math::CostMatrix (Ts... tolerances)
 Creates a cost matrix from the given vector for use with LQR.
template<size_t N>
constexpr Eigen::Matrix< double, N, N > wpi::math::CostMatrix (const std::array< double, N > &costs)
 Creates a cost matrix from the given vector for use with LQR.
WPILIB_DLLEXPORT Eigen::MatrixXd wpi::math::CostMatrix (const std::span< const double > costs)
 Creates a cost matrix from the given vector for use with LQR.
template<std::same_as< double >... Ts>
constexpr Eigen::Matrix< double, sizeof...(Ts), sizeof...(Ts)> wpi::math::CovarianceMatrix (Ts... stdDevs)
 Creates a covariance matrix from the given vector for use with Kalman filters.
template<size_t N>
constexpr Eigen::Matrix< double, N, N > wpi::math::CovarianceMatrix (const std::array< double, N > &stdDevs)
 Creates a covariance matrix from the given vector for use with Kalman filters.
WPILIB_DLLEXPORT Eigen::MatrixXd wpi::math::CovarianceMatrix (const std::span< const double > stdDevs)
 Creates a covariance matrix from the given vector for use with Kalman filters.
template<int Inputs>
Eigen::Vector< double, Inputs > wpi::math::DesaturateInputVector (const Eigen::Vector< double, Inputs > &u, double maxMagnitude)
 Renormalize all inputs if any exceeds the maximum magnitude.
template WPILIB_DLLEXPORT Eigen::VectorXd wpi::math::DesaturateInputVector< Eigen::Dynamic > (const Eigen::VectorXd &u, double maxMagnitude)