Reject duplicate state/command interfaces after configuring the controller #2090
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thecommand_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