-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add enable_feedforward parameter #1553
base: master
Are you sure you want to change the base?
Conversation
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.
First of all, thanks for your contribution.
With the current implementation, the parameter is only used at configure() transition. But from the naming and the fact that it is not read_only, I can imagine that a user wants to use this parameter to change the behavior while the controller is active. (what would be easily possible, but would make the service set_feedforward_control
obsolete).
I agree and I also think it would make sense to change this parameter to affect the controller during operation which would make tuning with dynamic_reconfigure or similar tools much nicer. Also setting a parameter already is a service call so it would be fairly similar with respect to |
I'll bring that to tomorrow's WG meeting, let's see what the original author @destogl thinks about that |
I updated it so it can be changed during runtime. After the WG meeting you can tell me which option should be merged and if the underlying variable type can also be changed or not. |
We came to the conclusion that we can simplify this and remove the service at all. But we shouldn't do that on jazzy maybe, so we have to do that in two steps:
|
How exactly should I add the deprecation warning?
Are there any other ways I am missing? Since the interaction of the user is via the service call there are no functions that can be marked deprecated. |
I added deprecation warnings as outlined and also removed the enum |
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. My suggestions:
- If we remove the
feedforward_mode_type
enum, then we should rename thecontrol_mode_
variable to be more descriptive.feedforward_mode_enabled_
for example. - We should not use the
enable_feedforward
parameter later than on_configure. In the future, we want to remove this as well and just set the behavior by setting thefeedforward_gain
to zero or nonzero. If we use this parameter as suggested now, then we again have to deprecate it. Let it just control the behavior at startup (a temporary fix), and mark it already as deprecated if set to false (which is the default value). So users will switch to use thefeedforward_gain
directly.
Does that make sense for you?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1553 +/- ##
==========================================
+ Coverage 84.88% 84.92% +0.03%
==========================================
Files 124 124
Lines 11564 11568 +4
Branches 985 984 -1
==========================================
+ Hits 9816 9824 +8
+ Misses 1433 1429 -4
Partials 315 315
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Thanks for the clarification. I thought you only planned to deprecate the service.
I agree and will rename the variable.
I will add deprecation warnings to the parameter as well in the description of the parameter and the documentation. I would also add a disclaimer to the feedforward_gain parameter that in the forseeable future this will be used to trigger the feedforward term. This should allow users to zero this parameter if they unknowingly have it active and assume it to be running while this is not the case. Regarding the startup behaviour I would disagree since the functionality is already there to enable or disable it during operation while the current behaviour with the service is unchanged. This already allows users to fully control the behaviour via parameters as it will be in the future. If this is ok I would leave the functionality as is and just mark it as deprecated. |
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.
looks good, just some comments on the warning in the docs
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Added a parameter to enable feedforward of the controller during configuration of the controller.
#1270 also mentions that there is currently no option to enable the feedforward gain with the exception of the service which can be unreliable to do from a launchfile.
Another option would be to set the state depending on the value of the feedforward gain but this could cause unexpected behaviour for users that have the value set but expect current behaviour.