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;
61 public:
double RangeMin()
const;
65 public:
double RangeMax()
const;
69 public:
double Radius()
const;
73 public: std::string Geometry()
const;
83 public:
double Range();
87 public:
virtual bool IsActive()
const;
93 std::function<
void (msgs::SonarStamped)> _subscriber);
96 protected:
virtual bool UpdateImpl(
const bool _force);
99 protected:
virtual void Fini();
102 private:
void OnContacts(ConstContactsPtr &_msg);
106 private: std::unique_ptr<SonarSensorPrivate> dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:26
std::string Geometry() const
Get the sonar collision shape.
sensors
Definition: SensorManager.hh:36
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.
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
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:51
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:42
virtual ~SonarSensor()
Destructor.
double RangeMax() const
Get the minimum range of the sonar.