17 #ifndef GZ_SENSORS_SENSOR_HH_
18 #define GZ_SENSORS_SENSOR_HH_
22 #pragma warning(disable: 4005)
23 #pragma warning(disable: 4251)
25 #include <gz/msgs/header.pb.h>
34 #include <gz/utils/SuppressWarning.hh>
35 #include <gz/math/Pose3.hh>
36 #include <gz/sensors/config.hh>
37 #include <gz/sensors/Export.hh>
45 inline namespace GZ_SENSORS_VERSION_NAMESPACE {
70 public:
virtual bool Load(
const sdf::Sensor &_sdf);
75 public:
virtual bool Load(sdf::ElementPtr _sdf);
81 public:
virtual bool Init();
96 public:
virtual bool Update(
97 const std::chrono::steady_clock::duration &_now) = 0;
100 public: std::chrono::steady_clock::duration NextDataUpdateTime()
const;
106 public:
void SetNextDataUpdateTime(
107 const std::chrono::steady_clock::duration &_time);
123 const std::chrono::steady_clock::duration &_now,
const bool _force);
130 public:
double UpdateRate()
const;
136 public:
void SetUpdateRate(
const double _hz);
140 public: gz::math::Pose3d Pose()
const;
143 public:
void SetPose(
const gz::math::Pose3d &_pose);
146 public:
virtual void SetParent(
const std::string &_parent);
158 public:
void SetFrameId(
const std::string &_frameId);
171 public:
bool EnableMetrics()
const;
175 public:
void SetEnableMetrics(
bool _enableMetrics);
188 public: sdf::ElementPtr SDF()
const;
208 public:
void AddSequence(gz::msgs::Header *_msg,
214 public:
void PublishMetrics(
220 public:
bool IsActive()
const;
228 public:
void SetActive(
bool _active);
232 public:
virtual bool HasConnections()
const;
234 GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
238 GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING