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;
91 public:
bool SaveFrame(
const std::string &_filename);
100 protected:
virtual void Fini();
123 private: std::unique_ptr<CameraSensorPrivate> dataPtr;
sensors
Definition SensorManager.hh:35
Forward declarations for transport.
Basic camera sensor.
Definition CameraSensor.hh:44
virtual void Render()
Handle the render event.
unsigned int ImageWidth() const
Gets the width of the image in pixels.
virtual void Fini()
Finalize the camera.
CameraSensor()
Constructor.
virtual void Init()
Initialize the camera.
transport::PublisherPtr imagePub
Publisher of image messages.
Definition CameraSensor.hh:116
const unsigned char * ImageData() const
Gets the raw image data from the sensor.
rendering::CameraPtr Camera() const
Returns a pointer to the rendering::Camera.
unsigned int ImageHeight() const
Gets the height of the image in pixels.
ignition::transport::Node::Publisher imagePubIgn
Publisher of image messages.
Definition CameraSensor.hh:119
virtual void Load(const std::string &_worldName, sdf::ElementPtr _sdf)
Load the sensor with SDF parameters.
virtual void Load(const std::string &_worldName)
Load the sensor with default parameters.
virtual ~CameraSensor()
Destructor.
bool Rendered() const
Get the value of the rendered flag.
virtual bool IsActive() const
Returns true if sensor generation is active.
virtual std::string Topic() const
Gets the topic name of the sensor.
virtual bool UpdateImpl(const bool _force)
This gets overwritten by derived sensor types.
void SetRendered(const bool _value)
Set the value of the rendered flag.
std::string TopicIgn() const
Gets the ignition topic name of the sensor.
rendering::CameraPtr camera
Pointer to the camera.
Definition CameraSensor.hh:113
bool SaveFrame(const std::string &_filename)
Saves the image to the disk.
Base class for sensors.
Definition Sensor.hh:53
boost::shared_ptr< Camera > CameraPtr
Definition RenderTypes.hh:90
boost::shared_ptr< Publisher > PublisherPtr
Definition TransportTypes.hh:49
Forward declarations for the common classes.
Definition Animation.hh:27