20 #include <boost/enable_shared_from_this.hpp> 
   21 #include <boost/thread/mutex.hpp> 
   79       public: 
virtual void Load(
const std::string &_worldName,
 
   80                                 sdf::ElementPtr _sdf);
 
   84       public: 
virtual void Load(
const std::string &_worldName);
 
   87       public: 
virtual void Init();
 
   92       public: 
void SetParent(
const std::string &_name, uint32_t _id);
 
   97       public: std::string GetParentName() 
const;
 
  101       public: 
void Update(
bool _force);
 
  113       public: 
double GetUpdateRate();
 
  117       public: 
void SetUpdateRate(
double _hz);
 
  120       public: 
virtual void Fini();
 
  124       public: std::string GetName() 
const;
 
  128       public: std::string GetScopedName() 
const;
 
  136       public: 
virtual void SetActive(
bool _value);
 
  140       public: 
virtual bool IsActive();
 
  144       public: std::string GetType() 
const;
 
  157       public: 
bool GetVisualize() 
const;
 
  161       public: 
virtual std::string GetTopic() 
const;
 
  165       public: 
void FillMsg(msgs::Sensor &_msg);
 
  169       public: std::string GetWorldName() 
const;
 
  176       public: 
template<
typename T>
 
  178               {
return this->updated.Connect(_subscriber);}
 
  184               {this->updated.Disconnect(_c);}
 
  192       public: 
void ResetLastUpdateTime();
 
  196       public: uint32_t GetId() 
const;
 
  200       public: uint32_t GetParentId() 
const;
 
  206       public: 
NoisePtr GetNoise(
unsigned int _index = 0) 
const;
 
  210       protected: 
bool NeedsUpdate();
 
  214       private: 
void LoadPlugin(sdf::ElementPtr _sdf);
 
  220       protected: sdf::ElementPtr 
sdf;
 
  241       protected: std::vector<SensorPluginPtr> 
plugins;
 
  264       private: boost::mutex mutexLastUpdateTime;
 
  282       private: uint32_t id;
 
  286       private: 
static sdf::ElementPtr sdfSensor;
 
transport::SubscriberPtr poseSub
Subscribe to pose updates. 
Definition: Sensor.hh:232
 
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:144
 
boost::shared_ptr< Noise > NoisePtr
Definition: SensorTypes.hh:107
 
virtual bool UpdateImpl(bool)
This gets overwritten by derived sensor types. 
Definition: Sensor.hh:109
 
std::vector< SensorPluginPtr > plugins
All the plugins for the sensor. 
Definition: Sensor.hh:241
 
void DisconnectUpdated(event::ConnectionPtr &_c)
Disconnect from a the updated signal. 
Definition: Sensor.hh:183
 
Encapsulates a position and rotation in three space. 
Definition: Pose.hh:40
 
Number of Sensor Categories. 
Definition: Sensor.hh:59
 
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
 
uint32_t parentId
The sensor's parent ID. 
Definition: Sensor.hh:238
 
A type of sensor is not a RAY or IMAGE sensor. 
Definition: Sensor.hh:56
 
common::Time updatePeriod
Desired time between updates, set indirectly by Sensor::SetUpdateRate. 
Definition: Sensor.hh:251
 
gazebo::rendering::ScenePtr scene
Pointer to the Scene. 
Definition: Sensor.hh:247
 
gazebo::physics::WorldPtr world
Pointer to the world. 
Definition: Sensor.hh:244
 
Forward declarations for transport. 
 
event::ConnectionPtr ConnectUpdated(T _subscriber)
Connect a signal that is triggered when the sensor is updated. 
Definition: Sensor.hh:177
 
common::Time lastUpdateTime
Time of the last update. 
Definition: Sensor.hh:254
 
std::vector< NoisePtr > noises
Noise added to sensor data. 
Definition: Sensor.hh:261
 
default namespace for gazebo 
 
common::Time lastMeasurementTime
Stores last time that a sensor measurement was generated; this value must be updated within each sens...
Definition: Sensor.hh:258
 
math::Pose pose
Pose of the sensor. 
Definition: Sensor.hh:223
 
std::string parentName
Name of the parent. 
Definition: Sensor.hh:235
 
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:78
 
SensorCategory
SensorClass is used to categorize sensors. 
Definition: Sensor.hh:44
 
sdf::ElementPtr sdf
Pointer the the SDF element for the sensor. 
Definition: Sensor.hh:220
 
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
 
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:74
 
bool active
True if sensor generation is active. 
Definition: Sensor.hh:217
 
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message. 
 
Forward declarations and typedefs for sensors. 
 
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
 
std::vector< event::ConnectionPtr > connections
All event connections. 
Definition: Sensor.hh:226
 
Ray based sensor class. 
Definition: Sensor.hh:53
 
Base class for sensors. 
Definition: Sensor.hh:67
 
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported. 
Definition: system.hh:48
 
Image based sensor class. 
Definition: Sensor.hh:50
 
transport::NodePtr node
Node for communication. 
Definition: Sensor.hh:229
 
A Time class, can be used to hold wall- or sim-time. 
Definition: Time.hh:43