15 #include "resolve_parameter_overrides.hpp"
21 #include "rcl_yaml_param_parser/parser.h"
22 #include "rcpputils/scope_exit.hpp"
24 #include "rclcpp/parameter_map.hpp"
26 std::map<std::string, rclcpp::ParameterValue>
27 rclcpp::detail::resolve_parameter_overrides(
28 const std::string & node_fqn,
29 const std::vector<rclcpp::Parameter> & parameter_overrides,
33 std::map<std::string, rclcpp::ParameterValue> result;
36 std::array<const rcl_arguments_t *, 2> argument_sources = {global_args, local_args};
44 rcl_params_t * params = NULL;
47 rclcpp::exceptions::throw_from_rcl_error(ret);
50 auto cleanup_params = rcpputils::make_scope_exit(
52 rcl_yaml_node_struct_fini(params);
56 if (initial_map.count(node_fqn) > 0) {
59 result[param.get_name()] =
67 for (
auto & param : parameter_overrides) {
68 result[param.get_name()] =
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_arguments_get_param_overrides(const rcl_arguments_t *arguments, rcl_params_t **parameter_overrides)
Return all parameter overrides parsed from the command line.
Store the type and value of a parameter.
Structure to store an arbitrary parameter with templated get/set methods.
std::unordered_map< std::string, std::vector< Parameter > > ParameterMap
A map of fully qualified node names to a list of parameters.
RCLCPP_PUBLIC ParameterMap parameter_map_from(const rcl_params_t *const c_params)
Hold output of parsing command line arguments.
#define RCL_RET_OK
Success return code.
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.