You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug atGoal requires 2 things to return true
The setpoint and goal equal each other
atSetpoint to return true
atSetpoint requires 4 things to return true
The Position error is within the Position Tolerance
The Velocity Error is within the Velocity Tolerance
The underlying PIDController property m_haveMeasurement is true
The underlying PIDController property m_haveSetpoint is true
The only way for m_haveSetpoint to be true, is if setSetpoint is called on the underlying PIDController. But ProfiledPIDController only calls calculate, so m_haveSetpoint will never be true, thus ProfilePIDController.atGoal/atSetpoint() will never be true. PIDController needs to set m_haveSetpoint to true inside of the calculate function.
To Reproduce
Steps to reproduce the behavior:
Create a ProfiledPIDController
Call calculate
Call atGoal or atSetpoint
Expected behavior
Should return true when the ProfiledPIDController has reached its goal
Desktop (please complete the following information):
WPILib Version: 2023.2.1
OS: OS X 13.1
Java version: 17
The text was updated successfully, but these errors were encountered:
Describe the bug
atGoal
requires 2 things to return trueatSetpoint
to return trueatSetpoint
requires 4 things to return truem_haveMeasurement
is truem_haveSetpoint
is trueThe only way for
m_haveSetpoint
to be true, is ifsetSetpoint
is called on the underlying PIDController. But ProfiledPIDController only callscalculate
, som_haveSetpoint
will never be true, thusProfilePIDController.atGoal/atSetpoint()
will never be true. PIDController needs to setm_haveSetpoint
to true inside of thecalculate
function.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should return true when the ProfiledPIDController has reached its goal
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: