Function nav2_util::generate_internal_node_name
Defined in File node_utils.hpp
Function Documentation
-
std::string nav2_util::generate_internal_node_name(const std::string &prefix = "")
Add some random characters to a node name to ensure it is unique in the system.
There are utility classes that create an internal private node to interact with the system. These private nodes are given a generated name. If multiple clients end up using the same service, there is the potential for node name conflicts. To ensure node names are globally unique, this appends some random numbers to the end of the prefix.
- Parameters:
prefix – [in] A string to help understand the purpose of the node.
- Returns:
A copy of the prefix + ‘_’ + 8 random digits. eg. prefix_12345678