Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remap node name to fully qualified name #449

Closed
jacobperron opened this issue May 22, 2019 · 2 comments · Fixed by #454
Closed

Remap node name to fully qualified name #449

jacobperron opened this issue May 22, 2019 · 2 comments · Fixed by #454
Assignees
Labels
enhancement New feature or request

Comments

@jacobperron
Copy link
Member

Feature request

Feature description

When using a fully qualified name for remapping, the node name is not remapped. For example:

ros2 run demo_nodes_cpp talker __node:=/foo

The above command does not change the node name, but I would expect the output of ros2 node list to contain /foo.

I'm not sure if this is intended to work as I expect, but it seems reasonable to me.

If this is not intended to work, then I think there should be a warning logged indicating that the remap failed. Similar to the warning when failing to remap the namespace:

$ ros2 run demo_nodes_cpp talker __ns:=foo
[WARN] [rcl]: Namespace not remapped to a fully qualified name (found: foo)
@jacobperron jacobperron added the question Further information is requested label May 22, 2019
@sloretz
Copy link
Contributor

sloretz commented May 22, 2019

Remapping to a fully qualified name requires __ns:=/ and __node:=foo.

I would have sworn there was already a ticket where it was talked about making __node:= accept a fully qualified name, but I can't find it. IIRC the trouble with __node taking a fully qualified name is what to do when a different namespace is given with __ns:=? Which namespace do topics/services use if given as relative names or ~/?

See also http://design.ros2.org/articles/static_remapping.html#supporting-change-the-node-name

@jacobperron
Copy link
Member Author

jacobperron commented May 23, 2019

I think it's okay to limit the name remap to not accept fully qualified names, but it would be nice to log a warning for invalid names.

@jacobperron jacobperron added enhancement New feature or request and removed question Further information is requested labels Jun 5, 2019
@jacobperron jacobperron self-assigned this Jun 5, 2019
jacobperron added a commit that referenced this issue Jun 5, 2019
Similar to the warnings when remapping to invalid namespaces, this better communicates failures to the user.

Resolves #449

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
jacobperron added a commit that referenced this issue Jun 5, 2019
Similar to the warnings when remapping to invalid namespaces, this better communicates failures to the user.

Resolves #449

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants