mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpimath] Remove rho overload from LinearQuadraticRegulator constructors (#2687)
It was added as part of Bryson's rule described in https://file.tavsys.net/control/controls-engineering-in-frc.pdf. It doesn't really simplify usage though, and the same thing can be replicated by multiplying the elements of Q by rho manually. It's easier to do it that way, it's how 3512 has been doing controller debugging for a while, and it's probably what other teams will do as well instead of using the "more structured" way. Removing these unhelpful overloads also simplifies the LQR interface.
This commit is contained in:
@@ -78,10 +78,6 @@ public class Robot extends TimedRobot {
|
||||
// to more heavily penalize state excursion, or make the controller behave more
|
||||
// aggressively. In this example we weight position much more highly than velocity, but this
|
||||
// can be tuned to balance the two.
|
||||
1.0, // rho balances Q and R, or velocity and voltage weights. Increasing this
|
||||
// will penalize state excursion more heavily, while decreasing this will penalize control
|
||||
// effort more heavily. Useful for balancing weights for systems with more states such
|
||||
// as drivetrains.
|
||||
VecBuilder.fill(12.0), // relms. Control effort (voltage) tolerance. Decrease this to more
|
||||
// heavily penalize control effort, or make the controller less aggressive. 12 is a good
|
||||
// starting point because that is the (approximate) maximum voltage of a battery.
|
||||
|
||||
@@ -80,10 +80,6 @@ public class Robot extends TimedRobot {
|
||||
// heavily penalize state excursion, or make the controller behave more aggressively. In
|
||||
// this example we weight position much more highly than velocity, but this can be
|
||||
// tuned to balance the two.
|
||||
1.0, // rho balances Q and R, or velocity and voltage weights. Increasing this
|
||||
// will penalize state excursion more heavily, while decreasing this will penalize control
|
||||
// effort more heavily. Useful for balancing weights for systems with more states such
|
||||
// as drivetrains.
|
||||
VecBuilder.fill(12.0), // relms. Control effort (voltage) tolerance. Decrease this to more
|
||||
// heavily penalize control effort, or make the controller less aggressive. 12 is a good
|
||||
// starting point because that is the (approximate) maximum voltage of a battery.
|
||||
|
||||
@@ -65,10 +65,6 @@ public class Robot extends TimedRobot {
|
||||
VecBuilder.fill(8.0), // qelms. Velocity error tolerance, in radians per second. Decrease
|
||||
// this to more heavily penalize state excursion, or make the controller behave more
|
||||
// aggressively.
|
||||
1.0, // rho balances Q and R, or velocity and voltage weights. Increasing this
|
||||
// will penalize state excursion more heavily, while decreasing this will penalize control
|
||||
// effort more heavily. Useful for balancing weights for systems with more states such
|
||||
// as drivetrains.
|
||||
VecBuilder.fill(12.0), // relms. Control effort (voltage) tolerance. Decrease this to more
|
||||
// heavily penalize control effort, or make the controller less aggressive. 12 is a good
|
||||
// starting point because that is the (approximate) maximum voltage of a battery.
|
||||
|
||||
Reference in New Issue
Block a user