-
Notifications
You must be signed in to change notification settings - Fork 430
Add derivative filter and discretization methods #1909
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1909 +/- ##
=======================================
Coverage 85.25% 85.25%
=======================================
Files 143 143
Lines 13790 13797 +7
Branches 1197 1198 +1
=======================================
+ Hits 11756 11763 +7
Misses 1636 1636
Partials 398 398
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christophfroehlich
left a comment
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.
Thanks for the follow-up. But this feature is not yet included in the PID class, right?
still not, I'll add a warning in the PR description |
|
This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete. |
Overview
Add a first-order derivative filter and selectable discretization methods for the I and D paths, keeping previous behavior as the default.
What was added/changed in this PR
Derivative filter (D path): added
derivative_filter_time(seconds) ingains.__map_dof_names.Continuous form:
C_D(s) = D * s / (1 + s * derivative_filter_time). Default0.0preserves the prior (unfiltered) behavior; non-negative validation.Discretization methods: added per-DOF options
integration_method:forward_euler(default),backward_euler,trapezoidal(Tustin).derivative_method:forward_euler(default),backward_euler,trapezoidal(Tustin).Defaults match the previous implicit scheme, so existing setups remain unchanged unless these parameters are set.
About tests
Builds cleanly and passes pre-commit and
colcon test.About change in tests
Added
PidControllerTest.all_parameters_set_configure_success_full_gains, which loadstest_pid_controller_full_gains, asserts successfulon_configure(...), and verifies parsing/mapping of all standard fields plus the newderivative_filter_time,integration_method, andderivative_methodvalues.Related PR's
Final notes
I'm very open to any recommendations to improve this code.