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;
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:144
Encapsulates a position and rotation in three space.
Definition: Pose.hh:40
Sensor with sonar cone.
Definition: SonarSensor.hh:43
void DisconnectUpdate(event::ConnectionPtr &_conn)
Disconnect from the update signal.
Definition: SonarSensor.hh:100
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
Forward declarations for transport.
event::EventT< void(msgs::SonarStamped)> update
Update event.
Definition: SonarSensor.hh:146
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:94
boost::shared_ptr< Entity > EntityPtr
Definition: PhysicsTypes.hh:74
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< MeshShape > MeshShapePtr
Definition: PhysicsTypes.hh:150
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Base class for sensors.
Definition: Sensor.hh:67
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
event::ConnectionPtr ConnectUpdate(T _subscriber)
Connect a to the new update signal.
Definition: SonarSensor.hh:95
class __declspec(dllimport) BasicController void update(const Ogre::Real &simDeltaTime)
Basic controller class.