[wpimath] Check LTV controller max velocity precondition (#5142)

This commit is contained in:
Tyler Veness
2023-02-26 15:05:41 -08:00
committed by GitHub
parent 4b0eecaee0
commit ce3686b80d
6 changed files with 27 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ class WPILIB_DLLEXPORT LTVUnicycleController {
* @param dt Discretization timestep.
* @param maxVelocity The maximum velocity for the controller gain lookup
* table.
* @throws std::domain_error if maxVelocity <= 0.
*/
explicit LTVUnicycleController(
units::second_t dt, units::meters_per_second_t maxVelocity = 9_mps);
@@ -48,6 +49,7 @@ class WPILIB_DLLEXPORT LTVUnicycleController {
* @param dt Discretization timestep.
* @param maxVelocity The maximum velocity for the controller gain lookup
* table.
* @throws std::domain_error if maxVelocity <= 0.
*/
LTVUnicycleController(const wpi::array<double, 3>& Qelems,
const wpi::array<double, 2>& Relems, units::second_t dt,