17 #ifndef GAZEBO_SENSORS_CAMERASENSOR_HH_
18 #define GAZEBO_SENSORS_CAMERASENSOR_HH_
22 #include <ignition/transport/Node.hh>
34 class CameraSensorPrivate;
54 public:
virtual void Load(
const std::string &_worldName,
55 sdf::ElementPtr _sdf);
59 public:
virtual void Load(
const std::string &_worldName);
62 public:
virtual void Init();
66 public:
virtual std::string Topic()
const;
70 public: std::string TopicIgn()
const;
79 public:
unsigned int ImageWidth()
const;
83 public:
unsigned int ImageHeight()
const;
87 public:
const unsigned char *ImageData()
const;
92 public:
bool SaveFrame(
const std::string &_filename);
95 public:
virtual bool IsActive()
const;
98 protected:
virtual bool UpdateImpl(
const bool _force);
101 protected:
virtual void Fini();
104 protected:
virtual void Render();
107 protected:
bool Rendered()
const;
111 protected:
void SetRendered(
const bool _value);
124 private: std::unique_ptr<CameraSensorPrivate> dataPtr;
Basic camera sensor.
Definition: CameraSensor.hh:43
transport::PublisherPtr imagePub
Publisher of image messages.
Definition: CameraSensor.hh:117
Forward declarations for transport.
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
ignition::transport::Node::Publisher imagePubIgn
Publisher of image messages.
Definition: CameraSensor.hh:120
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Base class for sensors.
Definition: Sensor.hh:51
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:58
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:89
rendering::CameraPtr camera
Pointer to the camera.
Definition: CameraSensor.hh:114