-
Notifications
You must be signed in to change notification settings - Fork 110
Remove legacy and deprecated PID parameters #436
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: ros2-master
Are you sure you want to change the base?
Conversation
Remove legacy and deprecated PID parameters from the control_toolbox package.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ros2-master #436 +/- ##
===============================================
- Coverage 77.75% 77.55% -0.20%
===============================================
Files 30 30
Lines 2009 1764 -245
Branches 125 120 -5
===============================================
- Hits 1562 1368 -194
+ Misses 379 331 -48
+ Partials 68 65 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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 a lot, I made some comments in the code.
Please also remove the default constructor of the Gains struct, I think it's a good time now.
Could you please also open follow-up PRs for the ros2_controllers? (see failing downstream tests).
I had a couple of comments:
|
See the discussion above about forward and backward integration of the integral action.
I've already cited the Matlab/Simulink implementation above, and it also has an I_max/I_min limit. Maybe we should add this again, @ViktorCVS what do you think? |
It’s not a problem to add this feature again, but I really can’t see any utility in it since the controller is digital and, as I mentioned, it’s a form of conditional integration that is less effective and harder to tune (according to various sources). Since MATLAB implemented it and we would still have it without this PR, it could be an option to remove it as a strategy and treat it the same way as the output clamp: on by default with default limits at infinity. |
yes please, no additional parameter but setting i_limits to infinity. |
Oh sorry. I didn't see the discussion on forward and backward integration. So the plan is to change it to forward integration in another PR - is that correct? And I agree, adding a simple clamp for imax/imin is fine with default set to infinity. I assume you will then maintain the i_clamp_min/max ros parameters in PidROS. |
@ViktorCVS Please also see related issue I just opened: #442 |
Overview
This PR removes legacy and deprecated PID parameters from the
control_toolbox
package.What was added/changed in this PR
Question
I don't know whether I should remove this block now, so I'll link it here for further discussion until the end of this PR.
https://github.com/ros-controls/control_toolbox/blob/ros2-master/control_toolbox/include/control_toolbox/pid.hpp#L416
About tests
The packages compile correctly and have passed the pre‑commit and colcon tests.
About change in tests
Three test files were modified. In addition to the updates required by the removal of the legacy anti‑windup strategy, some tests were deleted and some assertions were swapped, so I think it is relevant to list them here.
Tests ITermBadIBoundsTestConstructor, ITermBadIBoundsTest, integrationClampTest, integrationClampZeroGainTest, integrationAntiwindupTest and negativeIntegrationAntiwindupTest were removed because they covered only the legacy anti‑windup strategy.
pid_ros_parameters_tests.cpp:
Because the legacy anti‑windup strategy was the only feature that caused
initialize_from_ros_parameters()
to returnfalse
with the default values, the expectation was changed toASSERT_TRUE
.https://github.com/ros-controls/control_toolbox/blob/ros2-master/control_toolbox/test/pid_ros_parameters_tests.cpp#L611
Test InitPidTestBadParameter was removed because it covered only the legacy anti‑windup strategy.
Related PR's
Final notes
I'm very open to any recommendations to improve this code.