[wpimath] Fully discretized ElevatorFF and ArmFF (#7024)

Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
Nicholas Armstrong
2024-10-11 01:10:45 -04:00
committed by GitHub
parent 5d9a553104
commit 4adfa8bf64
31 changed files with 1004 additions and 425 deletions

View File

@@ -48,7 +48,7 @@ void Elevator::ReachGoal(units::meter_t goal) {
auto pidOutput = m_controller.Calculate(m_encoder.GetDistance(),
m_setpoint.position / 1_m);
auto feedforwardOutput =
m_feedforward.Calculate(m_setpoint.velocity, next.velocity, 20_ms);
m_feedforward.Calculate(m_setpoint.velocity, next.velocity);
m_motor.SetVoltage(units::volt_t{pidOutput} + feedforwardOutput);