Skip to content
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

Reject duplicate state/command interfaces after configuring the controller #2090

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saikishor
Copy link
Member

We've found a situation where the controller upon reconfiguring says that the controller interfaces are claimed already, even though they are not. Upon verifying, I've seen that when we reconfigure the controller and the controller required interfaces are not performed an internal cleanup, it might end up with duplicated interfaces and will cause this behaviour.

I've observed that with the forward_command_controller, every time you run a reconfigure, it adds the same info again to the command_interface_types_; it is missing a clear before that.

https://github.com/ros-controls/ros2_controllers/blob/0fb4fc68df5b4ef05b01aba9984fb22940f0a76d/forward_command_controller/src/forward_command_controller.cpp#L47-L51

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 7 lines in your changes missing coverage. Please review.

Project coverage is 89.57%. Comparing base (3aa38b0) to head (d81d6d2).

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 66.66% 3 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2090      +/-   ##
==========================================
+ Coverage   89.54%   89.57%   +0.03%     
==========================================
  Files         139      139              
  Lines       15125    15160      +35     
  Branches     1283     1286       +3     
==========================================
+ Hits        13543    13579      +36     
+ Misses       1096     1091       -5     
- Partials      486      490       +4     
Flag Coverage Δ
unittests 89.57% <83.33%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../include/controller_manager/controller_manager.hpp 96.87% <ø> (ø)
...ller_manager/test/test_controller_manager_srvs.cpp 99.33% <100.00%> (+0.01%) ⬆️
controller_manager/src/controller_manager.cpp 76.29% <66.66%> (+0.02%) ⬆️

... and 2 files with indirect coverage changes

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for the fix, lgtm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants