-
Notifications
You must be signed in to change notification settings - Fork 97
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
PID: Improve the API docs and change default value of antiwindup #202
Conversation
christophfroehlich
commented
May 24, 2024
- improve function docs
- add [[nodiscard]] to computeCommand
include/control_toolbox/pid.hpp
Outdated
Gains(double p, double i, double d, double i_max, double i_min) | ||
: p_gain_(p), i_gain_(i), d_gain_(d), i_max_(i_max), i_min_(i_min), antiwindup_(false) | ||
{ | ||
} |
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.
does this constructor make sense at all? shouldn't be andiwindup_ set to true? Otherwise i_max and i_min doesn't have any effect.
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.
I think it is good to change it to true as well by default
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.
done
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## ros2-master #202 +/- ##
============================================
Coverage 50.41% 50.41%
============================================
Files 9 9
Lines 486 486
Branches 63 62 -1
============================================
Hits 245 245
Misses 215 215
Partials 26 26
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
The rest looks spot on!
include/control_toolbox/pid.hpp
Outdated
Gains(double p, double i, double d, double i_max, double i_min) | ||
: p_gain_(p), i_gain_(i), d_gain_(d), i_max_(i_max), i_min_(i_min), antiwindup_(false) | ||
{ | ||
} |
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.
I think it is good to change it to true as well by default
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.
Awesome. Thanks for the change!