-
Notifications
You must be signed in to change notification settings - Fork 163
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
Namespace override with ROS2_NAMESPACE environment variable #993
base: rolling
Are you sure you want to change the base?
Conversation
@@ -121,13 +122,27 @@ rcl_node_init( | |||
rcl_context_t * context, | |||
const rcl_node_options_t * options) | |||
{ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this change?
I just had some time to work on this, and I realized that the remap code is executed in every service and topic creation at the runtime. We could add the namespacing after remap's, but that means adding the same code to 5 files, client.c, node_resolve_name.c, publisher.c, service.c, subscription.c. |
This PR stayed for a long time than it really should be. Is there anyone who can comment on? |
This PR addresses the issue ros2/ros2#1259. The environment variable is chosen as
ROS2_NAMESPACE
. A design issue that needs to be discussed is if theROS2_NAMESPACE
variable will override all namespaces defined or will be added to the namespace. For example,ROS2_NAMESPACE=/bar
, node's namespace is/foo
, should the overall namespace be/bar
, or/bar/foo
.