mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[upstream_utils] Upgrade Sleipnir and use wpi::SmallVector (#6748)
This commit is contained in:
@@ -74,14 +74,12 @@ units::volt_t ArmFeedforward::Calculate(units::unit_t<Angle> currentAngle,
|
||||
double trial_x = x + α * p_x;
|
||||
|
||||
xAD.SetValue(trial_x);
|
||||
cost.Update();
|
||||
|
||||
while (cost.Value() > oldCost) {
|
||||
α *= 0.5;
|
||||
trial_x = x + α * p_x;
|
||||
|
||||
xAD.SetValue(trial_x);
|
||||
cost.Update();
|
||||
}
|
||||
|
||||
x = trial_x;
|
||||
|
||||
Reference in New Issue
Block a user