22 #ifndef _CAMERASENSOR_HH_
23 #define _CAMERASENSOR_HH_
28 #include "gazebo/msgs/MessageTypes.hh"
55 public:
virtual void Load(
const std::string &_worldName,
56 sdf::ElementPtr _sdf);
60 public:
virtual void Load(
const std::string &_worldName);
63 public:
virtual void Init();
68 public:
virtual std::string GetTopic()
const;
71 protected:
virtual bool UpdateImpl(
bool _force);
74 protected:
virtual void Fini();
79 {
return this->camera;}
83 public:
unsigned int GetImageWidth()
const;
87 public:
unsigned int GetImageHeight()
const;
91 public:
const unsigned char *GetImageData();
96 public:
bool SaveFrame(
const std::string &_filename);
99 public:
virtual bool IsActive();
102 private:
void Render();
111 private:
bool rendered;
Basic camera sensor.
Definition: CameraSensor.hh:44
rendering::CameraPtr GetCamera() const
Returns a pointer to the rendering::Camera.
Definition: CameraSensor.hh:78
Forward declarations for transport.
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:80
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:44
Base class for sensors.
Definition: Sensor.hh:67
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48