15#ifndef CONTROLLER_INTERFACE__TF_PREFIX_HPP_
16#define CONTROLLER_INTERFACE__TF_PREFIX_HPP_
20namespace controller_interface
28inline std::string resolve_tf_prefix(
const std::string & prefix,
const std::string & node_ns)
35 std::string nprefix = prefix;
36 std::size_t pos = nprefix.find(
"~");
37 if (pos != std::string::npos)
39 nprefix.replace(pos, 1, node_ns);
43 if (nprefix.back() !=
'/')
45 nprefix.push_back(
'/');
48 if (nprefix.front() ==
'/')