17 #ifndef GZ_SENSORS_DEPTHCAMERASENSOR_HH_
18 #define GZ_SENSORS_DEPTHCAMERASENSOR_HH_
26 #include <gz/common/Event.hh>
27 #include <gz/utils/SuppressWarning.hh>
29 #include <gz/msgs/image.pb.h>
35 #pragma warning(disable: 4251)
37 #include <gz/rendering/DepthCamera.hh>
42 #include "gz/sensors/depth_camera/Export.hh"
44 #include "gz/sensors/Export.hh"
52 inline namespace GZ_SENSORS_VERSION_NAMESPACE {
54 class DepthCameraSensorPrivate;
75 public:
virtual bool Load(
const sdf::Sensor &_sdf)
override;
80 public:
virtual bool Load(sdf::ElementPtr _sdf)
override;
84 public:
virtual bool Init()
override;
89 public:
virtual bool Update(
90 const std::chrono::steady_clock::duration &_now)
override;
94 public:
virtual rendering::DepthCameraPtr DepthCamera()
const;
102 public:
void OnNewDepthFrame(
const float *_scan,
103 unsigned int _width,
unsigned int _height,
113 public:
void OnNewRgbPointCloud(
const float *_scan,
114 unsigned int _width,
unsigned int _height,
126 public: gz::common::ConnectionPtr ConnectImageCallback(
128 void(
const gz::msgs::Image &)> _callback);
132 public:
virtual void SetScene(
133 gz::rendering::ScenePtr _scene)
override;
137 public:
virtual unsigned int ImageWidth()
const override;
141 public:
virtual unsigned int ImageHeight()
const override;
145 public:
virtual double FarClip()
const;
149 public:
virtual double NearClip()
const;
152 public:
virtual bool HasConnections()
const override;
157 public:
bool HasDepthConnections()
const;
162 public:
bool HasPointConnections()
const;
166 private:
bool CreateCamera();
171 private:
void OnSceneChange(gz::rendering::ScenePtr )
174 GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
178 GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING