Skip to content

get_node_names should include namespace #643

@wjwwood

Description

@wjwwood

rcl returns the node names and their namespaces, but in rclcpp you cannot get the node namespaces, see:

std::vector<std::string>
NodeGraph::get_node_names() const
{
std::vector<std::string> nodes;
auto names_and_namespaces = get_node_names_and_namespaces();
for (const auto & it : names_and_namespaces) {
nodes.push_back(it.first);
}
return nodes;
}

There should probably be a new function that returns the nodes and their namespaces separately, and then keep the existing one for convenience but change it to automatically concatenate the name and namespace, because that's likely what you want in most cases.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions