it should be a design change in dashing release: Parameter Configuration using a YAML File:
As of Dashing, parameters in a YAML configuration file, e.g. passed to the node via the command line argument __params:=
, are only used to override a parameter’s default value when declaring the parameter.
Before Dashing, any parameters you passed via a YAML file would be implicitly set on the node.
Since Dashing, this is no longer the case, as parameters need to be declared in order to appear on the node to external observers, like ros2 param list
.
The old behavior may be achieved using the automatically_declare_initial_parameters
option when creating a node. This option, if set to true
, will automatically declare all parameters in the input YAML file when the node is constructed. This may be used to avoid major changes to your existing code or to serve specific use cases. For example, a “global parameter server” may want to be seeded with arbitrary parameters on launch, which it could not have declared ahead of time. Most of the time, however, this option is not recommended, as it may lead to setting a parameter in a YAML file with the assumption that the node will use it, even if the node does not actually use it.
In the future we hope to have a checker that will warn you if you pass a parameter to a node that it was not expecting.
The parameters in the YAML file will continue to influence the value of parameters when they are first declared.