-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create PID helper class for running PID loops in a Mechanism's run method #50
base: main
Are you sure you want to change the base?
Conversation
// changed, set the setpoint. | ||
if (first | ||
|| prevSetPoint != currentSetPoint | ||
|| prevArbitraryFeedForward != currentArbitraryFeedForward |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, for arbitraryFeedForward strategies based on sensors (e.g. cosineArbitraryFeedForward
), the value will likely change on every evaluation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx! q - wouldn't it stop once the mechanism stopped moving? or would there be unintended micromovements, eg from vibrations, etc.
in that case, wdyt of using a minimum change threshold?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. in addition, many sensors will have signal noise that results in different measurements, even if the mechanism is perfectly still.
a change threshold is probably fine. i would think at most 0.01, unless you want to make it configurable
…method. update RevA's Shoulder to use this, as an example.
Description
Thought exercise to simplify running PID loops in a Mechanism's
run
method.PIDRunner
handles:set
method iff this is the first call, if the setpoint, slot, or feedforward have changed.How Has This Been Tested?
Needs to be tested. Sending for early feedback.