[ros-users] [Discourse.ros.org] [Next Generation ROS] How to use namespaces?

William Woodall ros.discourse at gmail.com
Tue Jul 18 20:35:43 UTC 2017



Namespaces are expanded for you automatically. You can see some examples here:

https://github.com/ros2/rcl/blob/release-beta2/rcl/test/rcl/test_expand_topic_name.cpp#L131-L158

In your particular case, you might need to know the target node's name and do something like this:

```
communicationNode.createClient("/" + nodeName + "/get_state");
```

But I'm not 100% sure without seeing what you're doing exactly.





---
[Visit Topic](https://discourse.ros.org/t/how-to-use-namespaces/2236/2) or reply to this email to respond.




More information about the ros-users mailing list