18 #ifndef _SONARSENSOR_HH_
19 #define _SONARSENSOR_HH_
52 public:
virtual void Load(
const std::string &_worldName);
55 public:
virtual void Init();
58 protected:
virtual bool UpdateImpl(
bool _force);
61 protected:
virtual void Fini();
64 public:
virtual std::string GetTopic()
const;
68 public:
double GetRangeMin()
const;
72 public:
double GetRangeMax()
const;
76 public:
double GetRadius()
const;
86 public:
double GetRange();
89 public:
virtual bool IsActive();
94 public:
template<
typename T>
96 {
return update.Connect(_subscriber);}
101 {update.Disconnect(_conn);}
104 private:
void OnContacts(ConstContactsPtr &_msg);
122 private: msgs::SonarStamped sonarMsg;
125 private: boost::mutex mutex;
128 typedef std::list<boost::shared_ptr<msgs::Contacts const> > ContactMsgs_L;
131 private: ContactMsgs_L incomingContacts;
137 private:
double rangeMin;
140 private:
double rangeMax;
143 private:
double radius;