[WIP] Initialize parameters #477
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work in progress towards initializing parameters.
Current state:
When the node is constructed yaml files passed as CLI args are parsed, and the parameters within are set on the node.
RCL
rclfunction to get yaml file name from command line arguments (Support passing yaml parameter files via commandline rcl#253)Questions/Assumptions
rclcppneeds to call methods to parse yaml becausercldoing it would cause a circular dependency between it andrcl_yaml_parse_paramsAssumingHas method for getting all yaml paths specifiedrclwill have a method for getting a path to a yaml file from anrcl_arguments_tDoesYesrcl_yaml_param_parserdependency need to be exported?rcl_yaml_param_parsernamespace + nodename include a leading slash? currently it does notParameterInitializationMapfor? Why notstd::vector<ParameterVariant>?TODO
Bare minimum:
NodeParametersshould start parameter services in its constructor (Autostart parameter services #478)Nodeinstance toNodeParametersto give toParameterServiceNodeParametersneeds to get yaml file from CLI arguments (Initialize params via yaml from command line #488)rcl_arguments_tpassed to node options is not zero initialized, then get yaml files from itnode optionsuse_global_argumentsisTrue` then get yaml files from global arguments.Desired:
ParameterVariantintoParameterwhich has aParameterValue(Split ParameterVariant into Parameter and ParameterValue #481)rclcppmethod to convertrcl_params_ttostd::vector<Parameter>(orstd::map<string, ParameterValue>orstd::map<string, Parameter>? ) (Convert rcl_params_t to ParameterMap #485)std::vector<Parameter>intoNodeParametersconstructor. (Pass initial parameter values to node constructor #486)node::create_parameter(name, value)std::vector<Parameter> node::unknown_initial_parameters()void node::raise_if_unknown_initial_parameters()