18 #ifndef PUBLISHER_SONAR_HPP
19 #define PUBLISHER_SONAR_HPP
25 #include <sensor_msgs/Range.h>
37 inline std::string
topic()
const
47 void publish(
const std::vector<sensor_msgs::Range>& sonar_msgs );
49 void reset( ros::NodeHandle& nh );
54 for(std::vector<ros::Publisher>::const_iterator it =
pubs_.begin(); it !=
pubs_.end(); ++it)
55 if (it->getNumSubscribers())
62 std::vector<ros::Publisher>
pubs_;
bool isSubscribed() const
Definition: sonar.hpp:51
std::vector< ros::Publisher > pubs_
Definition: sonar.hpp:62
void reset(ros::NodeHandle &nh)
Definition: sonar.cpp:48
bool isInitialized() const
Definition: sonar.hpp:42
std::string topic() const
Definition: sonar.hpp:37
bool is_initialized_
Definition: sonar.hpp:63
SonarPublisher(const std::vector< std::string > &topics)
Definition: sonar.cpp:28
void publish(const std::vector< sensor_msgs::Range > &sonar_msgs)
Definition: sonar.cpp:34
std::vector< std::string > topics_
Definition: sonar.hpp:61