[upstream_utils] Upgrade Sleipnir and use wpi::SmallVector (#6748)

This commit is contained in:
Tyler Veness
2024-06-21 11:14:19 -07:00
committed by GitHub
parent e2893fc1a3
commit 25865759f4
29 changed files with 780 additions and 596 deletions

View File

@@ -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;