-
Notifications
You must be signed in to change notification settings - Fork 298
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
Adding base class for chained controllers: ChainedControllersInterface
#663
Adding base class for chained controllers: ChainedControllersInterface
#663
Conversation
0ee67b8
to
3002db2
Compare
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 overall, only suggestion to fix the uninitialized variable.
controller_interface/include/controller_interface/chainable_controller_interface.hpp
Outdated
Show resolved
Hide resolved
controller_interface/include/controller_interface/chainable_controller_interface.hpp
Show resolved
Hide resolved
This pull request is in conflict. Could you fix it @destogl? |
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.
@livanov93 this PR depends on functionality from #662, but I didn't add it here to make review cleaner. So either you can try to merge them when testing or wait until #662 is merged. |
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! Great job!
This pull request is in conflict. Could you fix it @destogl? |
3fd805f
to
ae6f57e
Compare
CI needs update so we can ignore its failing. |
ae6f57e
to
c605a76
Compare
c605a76
to
3e29adc
Compare
controller_interface/include/controller_interface/chainable_controller_interface.hpp
Show resolved
Hide resolved
controller_interface/include/controller_interface/controller_interface.hpp
Outdated
Show resolved
Hide resolved
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'd really prefer if we could avoid the chainable API spilling into ControllerInterface
.
I fully understand your preferences, however, in the current organisation of |
8354962
to
757f1e6
Compare
This pull request is in conflict. Could you fix it @destogl? |
Update structure of chainable controller to allow mode chaning only in 'UNCONFIGURED' state. Switching to chained_mode is only forbidden if controller is active. Add default implementation for 'on_set_chained_mode' method. Avoid compile warning about unused variables. Added check if all reference interface storage is initialized and that interface prefix is equal to controller's name. Optimize tests and 'usings'. Use two internal methods instead of 'update' directly on chained controllers. Reorder constructor.
757f1e6
to
862987e
Compare
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.
Just a few minor fixups otherwise looks good
controller_interface/include/controller_interface/chainable_controller_interface.hpp
Outdated
Show resolved
Hide resolved
controller_interface/include/controller_interface/chainable_controller_interface.hpp
Outdated
Show resolved
Hide resolved
controller_interface/include/controller_interface/chainable_controller_interface.hpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Bence Magyar <[email protected]>
This PR introduces new interfaces for chained controllers.
To simplify logic inside controller manager,
ControllerInterface
is extended with methods needed for chainable controllers, but with default or without implementation.ChainableControllerInteface
then forces user to implement those methods when adding a chainable controller.The PR depends on #662 to be merged before. (the commit a3424c4 is duplicated for this PR to be able to cherry-pick the rest of the development.)