Go to the documentation of this file.
17 #ifndef GZ_SENSORS_CAMERASENSOR_HH_
18 #define GZ_SENSORS_CAMERASENSOR_HH_
26 #include <gz/common/SuppressWarning.hh>
30 #pragma warning(disable: 4005)
31 #pragma warning(disable: 4251)
33 #include <ignition/msgs.hh>
42 #pragma warning(disable: 4251)
44 #include <gz/rendering/Camera.hh>
49 #include "gz/sensors/camera/Export.hh"
50 #include "gz/sensors/config.hh"
51 #include "gz/sensors/Export.hh"
59 inline namespace IGNITION_SENSORS_VERSION_NAMESPACE {
62 class CameraSensorPrivate;
82 public:
virtual bool Load(
const sdf::Sensor &_sdf)
override;
87 public:
virtual bool Load(sdf::ElementPtr _sdf)
override;
91 public:
virtual bool Init()
override;
96 public:
virtual bool Update(
97 const std::chrono::steady_clock::duration &_now)
override;
107 public: gz::common::ConnectionPtr ConnectImageCallback(
109 void(
const gz::msgs::Image &)> _callback);
113 public:
virtual void SetScene(
114 gz::rendering::ScenePtr _scene)
override;
118 public:
virtual unsigned int ImageWidth()
const;
122 public:
virtual unsigned int ImageHeight()
const;
126 public: rendering::CameraPtr RenderingCamera()
const;
135 public:
void SetBaseline(
double _baseline);
139 public:
double Baseline()
const;
144 public:
bool HasConnections()
const;
149 public:
bool HasImageConnections()
const;
154 public:
bool HasInfoConnections()
const;
162 protected:
bool AdvertiseInfo();
169 protected:
bool AdvertiseInfo(
const std::string &_topic);
174 protected:
void PopulateInfo(
const sdf::Camera *_cameraSdf);
178 protected:
void PublishInfo(
179 const std::chrono::steady_clock::duration &_now);
183 private:
bool CreateCamera();
188 private:
void OnSceneChange(gz::rendering::ScenePtr );
190 IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
194 IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
a rendering sensor class
Definition: gz/sensors/RenderingSensor.hh:52
Definition: gz/sensors/AirPressureSensor.hh:31
Camera Sensor Class.
Definition: gz/sensors/CameraSensor.hh:71