Go to the documentation of this file.
17 #ifndef _GAZEBO_SENSORS_SONARSENSOR_HH_
18 #define _GAZEBO_SENSORS_SONARSENSOR_HH_
33 class SonarSensorPrivate;
51 public:
virtual void Load(
const std::string &_worldName);
54 public:
virtual void Init();
57 public:
virtual std::string
Topic()
const;
89 std::function<
void (msgs::SonarStamped)> _subscriber);
95 protected:
virtual void Fini();
98 private:
void OnContacts(ConstContactsPtr &_msg);
102 private: std::unique_ptr<SonarSensorPrivate> dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:27
sensors
Definition: SensorManager.hh:35
virtual bool UpdateImpl(const bool _force)
This gets overwritten by derived sensor types.
SonarSensor()
Constructor.
virtual void Fini()
Finalize the sensor.
event::ConnectionPtr ConnectUpdate(std::function< void(msgs::SonarStamped)> _subscriber)
Connect a to the new update signal.
double Range()
Get detected range for a sonar.
double RangeMin() const
Get the minimum range of the sonar.
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
virtual std::string Topic() const
Returns the topic name as set in SDF.
virtual void Load(const std::string &_worldName)
Load the sensor with default parameters.
virtual bool IsActive() const
Returns true if sensor generation is active.
Base class for sensors.
Definition: Sensor.hh:53
double Radius() const
Get the radius of the sonar cone at maximum range.
virtual void Init()
Initialize the sensor.
Sensor with sonar cone.
Definition: SonarSensor.hh:43
virtual ~SonarSensor()
Destructor.
double RangeMax() const
Get the minimum range of the sonar.