Namespace override with ROS2_NAMESPACE environment variable#993
Namespace override with ROS2_NAMESPACE environment variable#993alpylmz wants to merge 5 commits intoros2:rollingfrom
Conversation
| rcl_context_t * context, | ||
| const rcl_node_options_t * options) | ||
| { | ||
|
|
There was a problem hiding this comment.
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_NAMESPACEvariable 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.