Relative Names and Default Namespace
As you know, nodes, topics, services and parameters have an identification name. By using these names, we can access and reference them. Generally, there are two main name concepts: global names
and relative names
Global name concept aims to reference the name of any resource, that is a topic, node, service or a parameter, by specifying namespaces of that name. For example, the name /robot/head/left_cam
must be used so that the left camera can be accessed. This is requirement of global name concept.
Relative name concept provides a flexibility that the usage of the namespace is not required. ROS client library determines a default namespace name
and all references made to a resource name are evaluated depending on this default namespace. In other words, a default namespace is determined such as /robot/head
. If we try to access left camera, ROS assumes that this is located under the namespace /robot/head
and combines two names like this: /robot/head
+ left_cam
= /robot/head/left_cam
. In this way, it resolves the location and allows us to access the camera.
what if there are more than one default namespace names ? or
what if the resource that we try to access is not located under the default namespace ? (it is located under another namespace)
This sounds a lot like a homework assignment.
Can you describe what you've found/discovered yourself already, so we avoid providing you with information you already have?
In fact, it is not an homework assignment. I am trying to learn ROS myself. Apart from wikiros tutorials, I read some textbooks. Sometimes wikiros tutorials seems not sufficient because I am stuck to details. There is very short description about relative names of name convention in wikiros.