-
Notifications
You must be signed in to change notification settings - Fork 345
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_controller] Fix logic for feedforward_mode with single reference interface #1520
base: master
Are you sure you want to change the base?
[pid_controller] Fix logic for feedforward_mode with single reference interface #1520
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1520 +/- ##
==========================================
+ Coverage 84.26% 84.27% +0.01%
==========================================
Files 123 123
Lines 11358 11380 +22
Branches 961 964 +3
==========================================
+ Hits 9571 9591 +20
- Misses 1471 1473 +2
Partials 316 316
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.
TBH, I don't understand the use-case for the set_feedforward_control
service, but your change looks correct. Thanks for fixing this.
Would you mind writing a test for both branches, with a non-zero feedforward_gain?
I added a test case to cover the single interface. For the use case of two reference interfaces, I need some time to review the current code especially around |
@catcracker, this is to address the suggestions you made in #1260 (comment). If you have some bandwidth, could you review and give it a spin? |
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.
Would you mind writing a test for both branches, with a non-zero feedforward_gain?
I added a test case to cover the single interface. For the use case of two reference interfaces, I need some time to review the current code especially around
measured_state_values_
handling. I would also like to update some of the existing tests with more validation steps. I can do these in a follow up PR.
sure, let's do that. A simple request for testing the actual command value without feedforward. (or is there another existing test, but I can't find it now).
controller_interface::return_type::OK); | ||
|
||
// check on result from update | ||
ASSERT_EQ(controller_->command_interfaces_[0].get_value(), exepected_command_value); |
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.
should we add a test with feedforward_mode_type::OFF
as well?
Address #1270. The scope of the fix only covers single reference interface. The changes for two reference interfaces will be covered in different PR.
Testing of the code changes was done with ros-controls/ros2_control_demos#710.