ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Names and parametrs

asked 2017-04-20 16:01:42 -0500

slavaglaps gravatar image

I read this documentation 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

/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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-20 18:22:26 -0500

Geoff gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-04-20 16:01:42 -0500

Seen: 162 times

Last updated: Apr 20 '17