Skip to content

Commit

Permalink
Expose --params-file option to composable nodes
Browse files Browse the repository at this point in the history
Fixes #1215

Signed-off-by: Dereck Wonnacott <[email protected]>
  • Loading branch information
dawonn-haval committed Jul 9, 2020
1 parent 84ae5a1 commit c1dd126
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rclcpp_components/src/component_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,17 @@ ComponentManager::OnLoadNode(
}
options.use_intra_process_comms(extra_argument.get_value<bool>());
}

// --params-file support
if (extra_argument.get_name() == "--params-file") {
if (extra_argument.get_type() != rclcpp::ParameterType::PARAMETER_STRING) {
throw ComponentManagerException(
"Extra component argument '--params-file' must be a string");
}
remap_rules.push_back("--params-file");
remap_rules.push_back(extra_argument.as_string());
options.arguments(remap_rules);
}
}

auto node_id = unique_id_++;
Expand Down

0 comments on commit c1dd126

Please sign in to comment.