36 #include <boost/algorithm/string/classification.hpp> 37 #include <boost/algorithm/string/split.hpp> 38 #include <boost/algorithm/string/join.hpp> 46 std::vector<std::string> names;
47 boost::algorithm::split(names, base_topic, boost::algorithm::is_any_of(
"/"),
48 boost::algorithm::token_compress_on);
50 while (names.back().empty())
53 names.back() =
"camera_info";
55 return boost::algorithm::join(names,
"/");
IMAGE_TRANSPORT_DECL std::string getCameraInfoTopic(const std::string &base_topic)
Form the camera info topic name, sibling to the base topic.