Skip to content

Commit

Permalink
Support namespace and node name wildcards
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Lipinski <aaron.lipinski@roboticsplus.co.nz>
  • Loading branch information
rpaaron committed Aug 18, 2020
1 parent 3270aad commit da57c05
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rclcpp/src/rclcpp/node_interfaces/node_parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,12 @@ NodeParameters::NodeParameters(
rclcpp::ParameterMap initial_map = rclcpp::parameter_map_from(params);

// Enforce wildcard matching precedence
// TODO(cottsay) implement further wildcard matching
const std::vector<std::string> node_matching_names{"/**", combined_name_};
const std::vector<std::string> node_matching_names{
"/**",
"/*/" + std::string(node_base->get_name()),
std::string(node_base->get_namespace()) + "/*",
combined_name_};

for (const auto & node_name : node_matching_names) {
if (initial_map.count(node_name) > 0) {
// Combine parameter yaml files, overwriting values in older ones
Expand Down

0 comments on commit da57c05

Please sign in to comment.