# Names and parametrs

I read this documentation http://wiki.ros.org/Names And I had a few questions What is the hierarchy of names? The example says /foo /stanford/robot/name /wg/node1

But what are these names?

Could you, on a concrete example, show what is described in this document?

The same question on this document http://wiki.ros.org/Parameter%20Server

/camera/left/name: leftcamera
/camera/left/exposure: 1
/camera/right/name: rightcamera
/camera/right/exposure: 1.1


What is the name in this case? (Packages, parameter nodes?)

edit retag close merge delete

Sort by » oldest newest most voted

As the first paragraph of the Names page says, these names can describe nodes, parameters, topics, and services. Essentially, names for all these resources use the same naming scheme, and that is what the Names page describes. When you use commands like rosnode list, rostopic list and rosparam list, you will see these names.

Names can be organised in a hierarchy because this makes it easier to structure them and find resources. The last part of the name after a slash is called the basename and that is the actual resource (topic, node, parameter, etc.). The rest is the namespace. Often namespaces are named after nodes, which makes it easy to identify, for example, parameters that are used by a specific node, or topics published by a specific node.

In the parameter server example you copied, /camera is a name space and may refer to a node named camera or may just be used to organise all camera parameters under a single namespace, /left and /right are organisational name spaces which could be used to identify the left and right cameras in a stereo camera setup, and /name and /exposure are the actual parameters. Note that there are two instances of both name and exposure; if they were not put in namespaces then they would collide, so using namespaces helps us to prevent collisions without naming parameters in non-reusable ways.

What names you choose is entirely up to you, but it helps to have a consistent naming scheme. Much of ROS has settled on conventions for names, so copying others is a good way to start.

more