ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
![]() | 1 | initial version |
These links:
Address all parameters without ambiguity in the names
For example, one of the challenges of the current system is that there is a naming ambiguity between nodes and parameters
/foo/bar/baz
could be a node/foo/bar/baz
or a private parameterbaz
on node/foo/bar
.
declare_parameters()
(...) Declare and initialize several parameters with the same namespace and type.For each key in the map, a parameter with a name of "namespace.key" will be set to the value in the map. The resulting value for each declared parameter will be returned.
The name expansion is naive, so if you set the namespace to be
"foo."
, then the resulting parameter names will be like"foo..key"
. However, if the namespace is an empty string, then no leading'.'
will be placed before each key, which would have been the case when naively expanding"namespace.key"
. This allows you to declare several parameters at once without a namespace.
strongly suggest the first option you mentioned (dots like in namespace.param.subparam
).
![]() | 2 | No.2 Revision |
These links:
Address all parameters without ambiguity in the names
For example, one of the challenges of the current system is that there is a naming ambiguity between nodes and parameters
/foo/bar/baz
could be a node/foo/bar/baz
or a private parameterbaz
on node/foo/bar
.
declare_parameters()
(...) Declare and initialize several parameters with the same namespace and type.For each key in the map, a parameter with a name of "namespace.key" will be set to the value in the map. The resulting value for each declared parameter will be returned.
The name expansion is naive, so if you set the namespace to be
"foo."
, then the resulting parameter names will be like"foo..key"
. However, if the namespace is an empty string, then no leading'.'
will be placed before each key, which would have been the case when naively expanding"namespace.key"
. This allows you to declare several parameters at once without a namespace.
strongly suggest the first option you mentioned (dots like in namespace.param.subparam
).