-
Notifications
You must be signed in to change notification settings - Fork 914
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
ros::this_node::getNamespace() ought to return sanitized namespace #1094
Comments
Makes sense to me, though it might be someone is relying on this behavior (they want what came in over the CLI, not the sanitized version), but we can definitely change it for newer distributions and consider doing it anyways for existing distributions. It's definitely worth making a pr against |
I notice roslaunch
prints out
The NODES part prints the namespace verbatim, while the process messages are removing a leading forward slash. |
If there were to be a namespace cleaning test (and build and test with
) |
…ut also prefix a slash as needed, so accommodating that here. ros#1094
The argument I am not sure why you want to pass namespaces with leading and trailing namespaces in the first place but since the provided PR is straight forward it shouldn't be a problem to do the extra sanitization you proposed. Thanks for create the patch. |
#1100) * Clean the namespace to get rid of double or trailing forward slashes #1094 * Get rid of extra slashes in namespace #1094 * names::clean() will turn a '/' into '' (is that a bug or desired?), but also prefix a slash as needed, so accommodating that here. #1094 * Simplifying and fixing, now namespaces.xml test passes. #1094
Addressed by #1100. |
I ran into similar situation and still confused that on python , we'll get
on rospy, but on roscpp (after applied this patch), we'll get
the source code is
so question is, do we have tailing '/' on namespace or not. |
ros#1100) * Clean the namespace to get rid of double or trailing forward slashes ros#1094 * Get rid of extra slashes in namespace ros#1094 * names::clean() will turn a '/' into '' (is that a bug or desired?), but also prefix a slash as needed, so accommodating that here. ros#1094 * Simplifying and fixing, now namespaces.xml test passes. ros#1094
This is fine
This ought to print the same
An additional / was prefixed to the provided namespace.
and this (which is somewhat ridiculous, but why not fix it also)
The namespace gets cleaned up getting into the NodeHandle, but the
this_node
returns exactly what was on the command line plus the additional forward slash.Using the released kinetic version currently.
The text was updated successfully, but these errors were encountered: