[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
rcl
function to get yaml file name from command line arguments (Support passing yaml parameter files via commandline rcl#253)Questions/Assumptions
rclcpp
needs to call methods to parse yaml becausercl
doing it would cause a circular dependency between it andrcl_yaml_parse_params
AssumingHas method for getting all yaml paths specifiedrcl
will have a method for getting a path to a yaml file from anrcl_arguments_t
DoesYesrcl_yaml_param_parser
dependency need to be exported?rcl_yaml_param_parser
namespace + nodename include a leading slash? currently it does notParameterInitializationMap
for? Why notstd::vector<ParameterVariant>
?TODO
Bare minimum:
NodeParameters
should start parameter services in its constructor (Autostart parameter services #478)Node
instance toNodeParameters
to give toParameterService
NodeParameters
needs to get yaml file from CLI arguments (Initialize params via yaml from command line #488)rcl_arguments_t
passed to node options is not zero initialized, then get yaml files from itnode options
use_global_argumentsis
True` then get yaml files from global arguments.Desired:
ParameterVariant
intoParameter
which has aParameterValue
(Split ParameterVariant into Parameter and ParameterValue #481)rclcpp
method to convertrcl_params_t
tostd::vector<Parameter>
(orstd::map<string, ParameterValue>
orstd::map<string, Parameter>
? ) (Convert rcl_params_t to ParameterMap #485)std::vector<Parameter>
intoNodeParameters
constructor. (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()