Allow passing existing node to IntrospectionServer to avoid duplicate node name#130
Open
miguelprada wants to merge 2 commits intoros:ros2from
Open
Allow passing existing node to IntrospectionServer to avoid duplicate node name#130miguelprada wants to merge 2 commits intoros:ros2from
miguelprada wants to merge 2 commits intoros:ros2from
Conversation
Author
|
Upon closer inspection of our own use-case, decided to restore some of the original behavior of using 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.
IntrospectionServerinheriting fromNodeis problematic when instancing it in a Python executable containing another node instance, which is likely the most common use case. In particular, the problem commonly arises when starting such executable from a launch file. In that case, the CLI arguments used by the launch system to set the node name will end up affecting both the nodes, resulting in duplicate nodes with the same name.This MR proposes a possible fix by allowing to optionally pass an existing node instance to the
IntrospectionServerclass constructor.Now
server_nameand the optionalnodein the constructor are somewhat redundant. I would've rather removedserver_namealtogether but it would break backward compatibility. Assuming the current situation quite broken as it is you may consider it fine to do so and I'll be happy to change it if you want.