Skip to content

Fix recursive naming of chainable controller interfaces - #3212

Open
vectorcrumb wants to merge 2 commits into
ros-controls:masterfrom
vectorcrumb:fix/recursive-naming-of-chainable-controller-interfaces
Open

Fix recursive naming of chainable controller interfaces#3212
vectorcrumb wants to merge 2 commits into
ros-controls:masterfrom
vectorcrumb:fix/recursive-naming-of-chainable-controller-interfaces

Conversation

@vectorcrumb

Copy link
Copy Markdown
Contributor

Description

On releases targeting Kilted and before, when calling export_state_interfaces/export_reference_interfaces on a ChainableControllerInterface derived class, the controller name would get correctly prepended to the interface names. When calling those methods for a second (or more) time, the full name including the controller name would get prepended by the controller name. This would lead to interfaces like my_controller/my_controller/s1.

This fix makes sure the reference/state interface name gets exported, rather than the entire interface name during calls to the export methods. It also includes a test for this specific case.

Fixes #3211

Is this user-facing behavior change?

Did you use Generative AI?

Yes, this PR was aided by Claude Opus 4.6

Additional Information

This targets the older ChainableControllerInterface methods, from before Lyrical. Also, I'm not fully sure on the usefulness of the test, as this seems a very specific issue which wouldn't really get tested for (you wouldn't expect a feature to fail specifically by prepending its controller name constantly on its interface names)

TODOs

To send us a pull request, please:

  • Fork the repository.
  • Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
  • Ensure local tests pass. (colcon test and pre-commit run (requires you to install pre-commit by pip3 install pre-commit)
  • Commit to your fork using clear commit messages.
  • Send a pull request, answering any default questions in the pull request interface.
  • Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

When calling export_state_interfaces/export_reference_interfaces on
a ChainableControllerInterface derived class, the controller name
would get correctly prepended to the interface names. When calling
those methods for a second (or more) time, the full name including
the controller name would get prepended by the controller name. This
would lead to interfaces like `my_controller/my_controller/s1`.

This fix makes sure the reference/state interface name gets exported,
rather than the entire interface name during calls to the export
methods. It also includes a test for this specific case.

Important to note that this issue only affects the interface from
Kilted and before.
@vectorcrumb
vectorcrumb marked this pull request as draft April 12, 2026 23:15
@vectorcrumb
vectorcrumb marked this pull request as ready for review April 12, 2026 23:27
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

@github-actions github-actions Bot added the stale label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reference interfaces recursively prepended with controller name after reconfiguration

2 participants