mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[upstream_utils] Upgrade to Sleipnir 0.3.2 (#8323)
Also includes a C++ benchmark, which has a Java counterpart in #8236.
This commit is contained in:
@@ -19,7 +19,7 @@ wpi::units::volt_t ArmFeedforward::Calculate(
|
||||
wpi::units::unit_t<Angle> currentAngle,
|
||||
wpi::units::unit_t<Velocity> currentVelocity,
|
||||
wpi::units::unit_t<Velocity> nextVelocity) const {
|
||||
using VarMat = slp::VariableMatrix;
|
||||
using VarMat = slp::VariableMatrix<double>;
|
||||
|
||||
// Small kₐ values make the solver ill-conditioned
|
||||
if (kA < wpi::units::unit_t<ka_unit>{1e-1}) {
|
||||
@@ -40,7 +40,7 @@ wpi::units::volt_t ArmFeedforward::Calculate(
|
||||
|
||||
Vectord<2> r_k{currentAngle.value(), currentVelocity.value()};
|
||||
|
||||
slp::Variable u_k;
|
||||
slp::Variable<double> u_k;
|
||||
|
||||
// Initial guess
|
||||
auto acceleration = (nextVelocity - currentVelocity) / m_dt;
|
||||
|
||||
@@ -20,7 +20,7 @@ Translation2d Ellipse2d::Nearest(const Translation2d& point) const {
|
||||
|
||||
// Find nearest point
|
||||
{
|
||||
slp::Problem problem;
|
||||
slp::Problem<double> problem;
|
||||
|
||||
// Point on ellipse
|
||||
auto x = problem.decision_variable();
|
||||
|
||||
Reference in New Issue
Block a user