Rolling pr duplicated nodes names - #405
Open
SamueleSandrini wants to merge 6 commits into
Open
Conversation
SamueleSandrini
force-pushed
the
rolling-pr-duplicated-nodes-names
branch
from
April 7, 2026 14:10
53ffc52 to
4cd9a52
Compare
Contributor
|
Thanks for detecting this and the work made here. I'm hesitant to expose the internal node name as an argument in the client constructor. I believe this creates unnecessary coupling, as it's confusing for the user to understand that it's for the name of an auxiliary internal node we're creating. This unnecessarily increases unwanted coupling. I'd prefer not to expose it and instead create random node names. For example, all the nodes that create the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi @fmrico,
while I am doing some tests I noticed an issue we had some time ago with multi-robot experiments related to the node name duplication issue described in #381, particularly affecting
domain_expert_clientandproblem_expert_client.In this pull request, I propose an approach to avoid the situation where multiple nodes have the same name.
Problem
When client nodes are instantiated as class attributes, they inherit global arguments and end up sharing the same node name as the parent node. This leads to multiple nodes with identical names in the ROS graph, which can cause unexpected behavior.
Proposed solution
This PR introduces two changes:
Disable global arguments for internal nodes
Both C++ and Python client implementations now explicitly disable global arguments when creating internal nodes, preventing unintended name reuse.
Explicit naming for client nodes
Added constructors that allow specifying node names.
Internal client nodes are now named using the pattern:
{external_node_name}_{internal_node_name}. Let me know if this approach works for you, or if you would prefer{internal_node_name}_{external_node_name}to group alldomain_expert_client/problem_expert_clientnodes. I am also open to exploring alternative approaches if you think there are better ways to avoid this proliferation of duplicate nodes. I was also thinking about whether it might be a good idea to mark them as hidden nodes by using an underscore as a node name prefix, as they might be more confusing than helpful (view alldomain/problem_expert_clientnodes), let me know what you think.This ensures uniqueness and improves graph readability.
Example result:
Additional changes
a minor adjustment in the use ofI removed this changes, as I noticed I re-introduces the warnings that was already addressed in Deprecated functions (warnings) #397 (comment). Nevertheless, that is the only aspect that makes the rolling release incompatible with Jazzy. What do you think about introducing a utility/wrapper function to make it cross-compatible?ament_index_cpp::get_package_share_directoryinComputeBTandExecutorNodeto improve cross-compatibility between ROS versions (verified with Jazzy).Thanks!