-
Notifications
You must be signed in to change notification settings - Fork 310
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
Adapt controller Reference/StateInterfaces to New Way of Exporting (variant support) #1689
Adapt controller Reference/StateInterfaces to New Way of Exporting (variant support) #1689
Conversation
This pull request is in conflict. Could you fix it @mamueluth? |
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
21296d7
to
7e72ae2
Compare
I've rebased this PR, you can find a backup of it on https://github.com/StoglRobotics-forks/ros2_control/pull/new/controller_interface_variant_support_base_BAK |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1689 +/- ##
==========================================
- Coverage 87.19% 86.95% -0.24%
==========================================
Files 118 118
Lines 11369 11430 +61
Branches 1049 1051 +2
==========================================
+ Hits 9913 9939 +26
- Misses 1094 1125 +31
- Partials 362 366 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
hardware_interface/include/hardware_interface/resource_manager.hpp
Outdated
Show resolved
Hide resolved
a1d563b
to
f4ec3d6
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.
Overall the PR looks good to me. Thanks for the great work @mamueluth @bmagyar 👏🏾
I've found minor things to be addressed apart from the suggestion from this review, but I can open up a following PR to address them.
@saikishor separate PR please |
Sure, I will do that :) |
ref_interfaces = controller->export_reference_interfaces(); | ||
if (ref_interfaces.empty() && state_interfaces.empty()) | ||
{ | ||
// TODO(destogl): Add test for this! |
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.
Let's add Test for this!
This PR is the fith and last part of multiple breaking down #1240 in smaller changes. For an overview explanation and a lot of comments/discussion, please refer to #1240.
This PR adapts the controller interface to the new way of exporting Reference and StateInterfaces. ReferenceInterfaces now are created as shared_ptr and shared to controller manager as shared_ptr. The memory is still allocated in the controller (old way) but a unordered_map for the interfaces is added.
NOTE: Everything is fully backward compatible at this point. At this point variant supports only double at this point.