35 #include <boost/foreach.hpp>
40 const std::string& name)
46 void AdvertisementChecker::timerCb()
51 ros::V_string::iterator topic_it = topics_.begin();
52 while (topic_it != topics_.end())
56 ros::master::V_TopicInfo::iterator info_it = topic_info.begin();
57 while (!found && info_it != topic_info.end())
59 found = (*topic_it == info_it->name);
63 topic_it = topics_.erase(topic_it);
66 ROS_WARN_NAMED(name_,
"The input topic '%s' is not yet advertised", topic_it->c_str());
75 void AdvertisementChecker::start(
const ros::V_string& topics,
double duration)
78 BOOST_FOREACH(
const std::string& topic, topics)
79 topics_.push_back(nh_.resolveName(topic));
83 boost::bind(&AdvertisementChecker::timerCb,
this));
87 void AdvertisementChecker::stop()