ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It basically means that when you write your code, you don't need to worry about there being the same name somewhere else. All your resources - nodes, params, topics and services will be in the local scope.
And then you can write a top level node to include all those nodes without any problem.
2 | No.2 Revision |
It basically means that when you write your code, you don't need to worry about there being the same name somewhere else. All your resources - nodes, params, topics and services will be in the local scope.
And then you can write a top level node to include all those nodes without any problem.
Edit: (based on comment to answer)
Global: ROS has a global namespace - "/". If you define any of your graph resource names with a leading /, they will be global names. You can have a bunch of hierarchical namespaces but as long as it starts with a "/", it is globally resolved.
Example: "/global/name/with/base"
Base: That brings us to the second type - base names. Refer to the example above, every global name in ROS has a base which in this case is "base". You can look at it as the last name in the hierarchy and it doesn't have the "/"
Relative: ROS also has something known as a default namespace. The default namespace can be specified but if not specified it is the global namespace - "/". Relative names DO NOT have the leading "/" and are resolved WRT this default namespace.
Example: If the default namespace were "/global/name", then "with/base" would be the relative name. Notice that there is no leading "/" to "with/base"
Private: These names too are relative names, just that they use their nodes name as their default namespace. And they have to be specified with a leading "~".
Example: If "/global/name/with" was the name of the node, then the pvt. name "~base" would be the private name.