mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpimath] Disallow LTV controller max velocities above 15 m/s (#5495)
15 m/s is about 50 ft/s, which is way above what FRC robots should be able to achieve. This limit lets us catch user errors from bad unit conversions immediately instead of the LUT generation in the LTV controllers hanging for a really long time. Fixes #5027.
This commit is contained in:
@@ -45,7 +45,8 @@ class WPILIB_DLLEXPORT LTVDifferentialDriveController {
|
||||
* @param Qelems The maximum desired error tolerance for each state.
|
||||
* @param Relems The maximum desired control effort for each input.
|
||||
* @param dt Discretization timestep.
|
||||
* @throws std::domain_error if max velocity of plant with 12 V input <= 0.
|
||||
* @throws std::domain_error if max velocity of plant with 12 V input <= 0 m/s
|
||||
* or >= 15 m/s.
|
||||
*/
|
||||
LTVDifferentialDriveController(const frc::LinearSystem<2, 2, 2>& plant,
|
||||
units::meter_t trackwidth,
|
||||
|
||||
@@ -53,7 +53,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.
|
||||
* @throws std::domain_error if maxVelocity <= 0 m/s or >= 15 m/s.
|
||||
*/
|
||||
LTVUnicycleController(const wpi::array<double, 3>& Qelems,
|
||||
const wpi::array<double, 2>& Relems, units::second_t dt,
|
||||
|
||||
Reference in New Issue
Block a user