[wpimath] Link to docs on LQR and KF tolerances (#5486)

Fixes #4151.
This commit is contained in:
Tyler Veness
2023-07-31 19:17:44 -07:00
committed by GitHub
parent d814f1d123
commit a01b6467d3
12 changed files with 76 additions and 0 deletions

View File

@@ -55,6 +55,10 @@ public class LTVDifferentialDriveController {
/**
* Constructs a linear time-varying differential drive controller.
*
* <p>See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-intro.html#lqr-tuning
* for how to select the tolerances.
*
* @param plant The differential drive velocity plant.
* @param trackwidth The distance between the differential drive's left and right wheels in
* meters.

View File

@@ -75,6 +75,10 @@ public class LTVUnicycleController {
/**
* Constructs a linear time-varying unicycle controller.
*
* <p>See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-intro.html#lqr-tuning
* for how to select the tolerances.
*
* @param qelems The maximum desired error tolerance for each state.
* @param relems The maximum desired control effort for each input.
* @param dt Discretization timestep in seconds.
@@ -86,6 +90,10 @@ public class LTVUnicycleController {
/**
* Constructs a linear time-varying unicycle controller.
*
* <p>See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-intro.html#lqr-tuning
* for how to select the tolerances.
*
* @param qelems The maximum desired error tolerance for each state.
* @param relems The maximum desired control effort for each input.
* @param dt Discretization timestep in seconds.

View File

@@ -35,6 +35,10 @@ public class LinearQuadraticRegulator<States extends Num, Inputs extends Num, Ou
/**
* Constructs a controller with the given coefficients and plant. Rho is defaulted to 1.
*
* <p>See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-intro.html#lqr-tuning
* for how to select the tolerances.
*
* @param plant The plant being controlled.
* @param qelms The maximum desired error tolerance for each state.
* @param relms The maximum desired control effort for each input.
@@ -57,6 +61,10 @@ public class LinearQuadraticRegulator<States extends Num, Inputs extends Num, Ou
/**
* Constructs a controller with the given coefficients and plant.
*
* <p>See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-intro.html#lqr-tuning
* for how to select the tolerances.
*
* @param A Continuous system matrix of the plant being controlled.
* @param B Continuous input matrix of the plant being controlled.
* @param qelms The maximum desired error tolerance for each state.

View File

@@ -59,6 +59,10 @@ public class ExtendedKalmanFilter<States extends Num, Inputs extends Num, Output
/**
* Constructs an extended Kalman filter.
*
* <p>See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-observers.html#process-and-measurement-noise-covariance-matrices
* for how to select the standard deviations.
*
* @param states a Nat representing the number of states.
* @param inputs a Nat representing the number of inputs.
* @param outputs a Nat representing the number of outputs.
@@ -93,6 +97,10 @@ public class ExtendedKalmanFilter<States extends Num, Inputs extends Num, Output
/**
* Constructs an extended Kalman filter.
*
* <p>See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-observers.html#process-and-measurement-noise-covariance-matrices
* for how to select the standard deviations.
*
* @param states a Nat representing the number of states.
* @param inputs a Nat representing the number of inputs.
* @param outputs a Nat representing the number of outputs.

View File

@@ -43,6 +43,10 @@ public class KalmanFilter<States extends Num, Inputs extends Num, Outputs extend
/**
* Constructs a state-space observer with the given plant.
*
* <p>See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-observers.html#process-and-measurement-noise-covariance-matrices
* for how to select the standard deviations.
*
* @param states A Nat representing the states of the system.
* @param outputs A Nat representing the outputs of the system.
* @param plant The plant used for the prediction step.

View File

@@ -64,6 +64,10 @@ public class UnscentedKalmanFilter<States extends Num, Inputs extends Num, Outpu
/**
* Constructs an Unscented Kalman Filter.
*
* <p>See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-observers.html#process-and-measurement-noise-covariance-matrices
* for how to select the standard deviations.
*
* @param states A Nat representing the number of states.
* @param outputs A Nat representing the number of outputs.
* @param f A vector-valued function of x and u that returns the derivative of the state vector.
@@ -100,6 +104,10 @@ public class UnscentedKalmanFilter<States extends Num, Inputs extends Num, Outpu
* custom functions for arithmetic can be useful if you have angles in the state or measurements,
* because they allow you to correctly account for the modular nature of angle arithmetic.
*
* <p>See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-observers.html#process-and-measurement-noise-covariance-matrices
* for how to select the standard deviations.
*
* @param states A Nat representing the number of states.
* @param outputs A Nat representing the number of outputs.
* @param f A vector-valued function of x and u that returns the derivative of the state vector.