Skip to content

Commit

Permalink
Add rcl_node_get_fully_qualified_name (ros2/rcl#255)
Browse files Browse the repository at this point in the history
Signed-off-by: RARvolt <[email protected]>
  • Loading branch information
rarvolt authored and tfoote committed May 1, 2019
1 parent 078d5ff commit 8d13d35
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions rclcpp/src/rclcpp/node_interfaces/node_parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,7 @@ NodeParameters::NodeParameters(
get_yaml_paths(&(options->arguments));

// Get fully qualified node name post-remapping to use to find node's params in yaml files
const std::string node_name = node_base->get_name();
const std::string node_namespace = node_base->get_namespace();
if (0u == node_namespace.size() || 0u == node_name.size()) {
// Should never happen
throw std::runtime_error("Node name and namespace were not set");
}

if ('/' == node_namespace.at(node_namespace.size() - 1)) {
combined_name_ = node_namespace + node_name;
} else {
combined_name_ = node_namespace + '/' + node_name;
}
combined_name_ = node_base->get_fully_qualified_name();

// TODO(sloretz) use rcl to parse yaml when circular dependency is solved
// See https://github.com/ros2/rcl/issues/252
Expand Down

0 comments on commit 8d13d35

Please sign in to comment.