This repository was archived by the owner on May 31, 2025. It is now read-only.
roscpp: Fixed remapping of private parameters in anonymous nodes#2325
Closed
peci1 wants to merge 1 commit intoros:noetic-develfrom
Closed
roscpp: Fixed remapping of private parameters in anonymous nodes#2325peci1 wants to merge 1 commit intoros:noetic-develfrom
peci1 wants to merge 1 commit intoros:noetic-develfrom
Conversation
Contributor
|
Thank you for the PR! ROS Noetic will reach end-of-life on May 31st, 2025. Every change comes with a risk of introducing regressions, and there isn't much time left to fix them. To make sure this PR doesn't introduce any regressions please:
|
Contributor
Author
|
This PR comes with a rostest that tests the described behavior. |
Contributor
|
ROS 1 is end-of-life (EOL) as of today, May 31st 2025. I am archiving this repository because:
If you still rely on ROS 1, read this page to learn about your options. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #2324.
This fix runs all private name remaps through another round of remapping after the anonymous node name is finished. The first remapping round is done with incomplete node name, which resulted in inability to remap private names for anonymous nodes without
__name:=arg.The new behavior corresponds to what rospy is doing.
The impact on existing code should be close to zero. Anything launched from a launch file will not be affected. The only affected usages are manual
rosruncommands (and if somebody does some crazy things aroundros::init()).I did not find a good way to remove the wrong remappings, so they remain there. I.e.
g_remappingswill contain both/node/topic->newtopicand/node_12321321/topic->newtopic. This isn't correct, but it could actually serve as a backwards compatibility feature for the case if someone was working around #2324 by explicitly remapping the incomplete name.Real-world tools affected by #2324 can be found e.g. here: http://docs.ros.org/en/latest/api/cras_topic_tools/html/classcras_1_1ThrottleMessagesNodelet.html#details . It is an improved version of
topic_tools throttlewhich, if no topic args are given through CLI, subscribes to~inputtopic. When running asrosrun cras_topic_tools throttle ~input:=/remapped, the remap does not happen without this PR. Appending__name:=foomakes the remap happy, which is confusing.