Open
Description
The new nav2_ros_common
package has a declare_or_get_param
API from @MarcoMatteoBassa that we should use instead of the usual pattern we have for declare_parameter_if_not_declared
and then get_parameter
. That way we declare if not declared and return the value all on a single line.
This should become a member of the nav2::LifecycleNode
and we can use it from the node->declare_or_get_param
or as standalone nav2::declare_or_get_param
when given a NodeT
or parameters interface.
Also consider other parameter APIs like get_parameter_or
, raw declare_parameter
's / get_parameters
's, declareParameter
's and others. Audit configurations.