Relative Names and Default Namespace

asked 2019-01-22 14:42:33 -0500

gktg1514 gravatar image

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)

edit retag flag offensive close merge delete

Comments

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?

gvdhoorn gravatar image gvdhoorn  ( 2019-01-23 02:18:26 -0500 )edit

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.

gktg1514 gravatar image gktg1514  ( 2019-01-24 08:09:39 -0500 )edit