WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
frc::detail Namespace Reference

Classes

class  ListenerExecutor
 An executor for running listener tasks posted by Sendable listeners synchronously from the main application thread. More...
 
class  RecordingController
 
class  ShuffleboardInstance
 

Functions

std::shared_ptr< SendableCameraWrapper > & GetSendableCameraWrapper (std::string_view cameraName)
 
void AddToSendableRegistry (wpi::Sendable *sendable, std::string_view name)
 
constexpr ct_matrix3d RotationVectorToMatrix (const ct_vector3d &rotation)
 Applies the hat operator to a rotation vector.
 
constexpr Eigen::Matrix3d RotationVectorToMatrix (const Eigen::Vector3d &rotation)
 Applies the hat operator to a rotation vector.
 
const char * GetStringForWidgetType (BuiltInWidgets type)
 
template<int States, int Inputs>
Eigen::Matrix< double, States, States > DARE (const Eigen::Matrix< double, States, States > &A, const Eigen::Matrix< double, States, Inputs > &B, const Eigen::Matrix< double, States, States > &Q, const Eigen::LLT< Eigen::Matrix< double, Inputs, Inputs > > &R_llt)
 Computes the unique stabilizing solution X to the discrete-time algebraic Riccati equation:
 
WPILIB_DLLEXPORT int IncrementAndGetProfiledPIDControllerInstances ()
 

Variables

constexpr const char * kProtocol = "camera_server://"
 

Function Documentation

◆ AddToSendableRegistry()

void frc::detail::AddToSendableRegistry ( wpi::Sendable * sendable,
std::string_view name )

◆ DARE()

template<int States, int Inputs>
Eigen::Matrix< double, States, States > frc::detail::DARE ( const Eigen::Matrix< double, States, States > & A,
const Eigen::Matrix< double, States, Inputs > & B,
const Eigen::Matrix< double, States, States > & Q,
const Eigen::LLT< Eigen::Matrix< double, Inputs, Inputs > > & R_llt )

Computes the unique stabilizing solution X to the discrete-time algebraic Riccati equation:

AᵀXA − X − AᵀXB(BᵀXB + R)⁻¹BᵀXA + Q = 0

This internal function skips expensive precondition checks for increased performance. The solver may hang if any of the following occur:

  • Q isn't symmetric positive semidefinite
  • R isn't symmetric positive definite
  • The (A, B) pair isn't stabilizable
  • The (A, C) pair where Q = CᵀC isn't detectable

Only use this function if you're sure the preconditions are met.

Template Parameters
StatesNumber of states.
InputsNumber of inputs.
Parameters
AThe system matrix.
BThe input matrix.
QThe state cost matrix.
R_lltThe LLT decomposition of the input cost matrix.
Returns
Solution to the DARE.

◆ GetSendableCameraWrapper()

std::shared_ptr< SendableCameraWrapper > & frc::detail::GetSendableCameraWrapper ( std::string_view cameraName)

◆ GetStringForWidgetType()

const char * frc::detail::GetStringForWidgetType ( BuiltInWidgets type)

◆ IncrementAndGetProfiledPIDControllerInstances()

WPILIB_DLLEXPORT int frc::detail::IncrementAndGetProfiledPIDControllerInstances ( )

◆ RotationVectorToMatrix() [1/2]

ct_matrix3d frc::detail::RotationVectorToMatrix ( const ct_vector3d & rotation)
constexpr

Applies the hat operator to a rotation vector.

It takes a rotation vector and returns the corresponding matrix representation of the Lie algebra element (a 3x3 rotation matrix).

Parameters
rotationThe rotation vector.
Returns
The rotation vector as a 3x3 rotation matrix.

◆ RotationVectorToMatrix() [2/2]

Eigen::Matrix3d frc::detail::RotationVectorToMatrix ( const Eigen::Vector3d & rotation)
constexpr

Applies the hat operator to a rotation vector.

It takes a rotation vector and returns the corresponding matrix representation of the Lie algebra element (a 3x3 rotation matrix).

Parameters
rotationThe rotation vector.
Returns
The rotation vector as a 3x3 rotation matrix.

Variable Documentation

◆ kProtocol

const char* frc::detail::kProtocol = "camera_server://"
constexpr