Go to the documentation of this file.
17 #ifndef GZ_SENSORS_LIDAR_HH_
18 #define GZ_SENSORS_LIDAR_HH_
24 #include <gz/common/SuppressWarning.hh>
25 #include <gz/common/Event.hh>
27 #include "gz/sensors/lidar/Export.hh"
35 inline namespace IGNITION_SENSORS_VERSION_NAMESPACE {
55 public:
virtual ~
Lidar();
60 public:
virtual bool Update(
61 const std::chrono::steady_clock::duration &_now)
override;
66 public:
void ApplyNoise();
71 public:
virtual bool PublishLidarScan(
72 const std::chrono::steady_clock::duration &_now);
77 public:
virtual bool Load(
const sdf::Sensor &_sdf)
override;
82 public:
virtual bool Load(sdf::ElementPtr _sdf)
override;
86 public:
virtual bool Init()
override;
90 public:
void SetParent(
const std::string &_parent)
override;
93 public:
virtual bool CreateLidar();
96 protected:
virtual void Fini();
100 public: gz::math::Angle AngleMin()
const;
104 public:
void SetAngleMin(
const double _angle);
108 public: gz::math::Angle AngleMax()
const;
112 public:
void SetAngleMax(
const double _angle);
116 public:
double AngleResolution()
const;
120 public:
double RangeMin()
const;
124 public:
double RangeMax()
const;
133 public:
double RangeResolution()
const;
137 public:
unsigned int RayCount()
const;
141 public:
unsigned int RangeCount()
const;
145 public:
unsigned int VerticalRayCount()
const;
149 public:
unsigned int VerticalRangeCount()
const;
153 public: gz::math::Angle VerticalAngleMin()
const;
157 public:
void SetVerticalAngleMin(
const double _angle);
161 public: gz::math::Angle VerticalAngleMax()
const;
165 public:
void SetVerticalAngleMax(
const double _angle);
169 public:
double VerticalAngleResolution()
const;
180 public:
double Range(
const int _index)
const;
195 public:
double Retro(
const int _index)
const;
206 public:
int Fiducial(
const unsigned int _index)
const;
210 public:
bool IsHorizontal()
const;
218 public:
double RayCountRatio()
const;
226 public:
double RangeCountRatio()
const;
230 public:
double HorzFOV()
const;
234 public:
double VertFOV()
const;
237 public:
virtual bool IsActive()
const;
242 public:
bool HasConnections()
const;
246 public: uint32_t VisibilityMask()
const;
253 private:
double Clamp(
double _range)
const;
255 IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
258 IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
261 public:
float *laserBuffer =
nullptr;
264 public:
bool initialized =
false;
273 public:
virtual gz::common::ConnectionPtr ConnectNewLidarFrame(
275 unsigned int _heighti,
unsigned int _channels,
278 IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
282 IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
a rendering sensor class
Definition: gz/sensors/RenderingSensor.hh:52
Definition: gz/sensors/AirPressureSensor.hh:31
std::mutex lidarMutex
Just a mutex for thread safety.
Definition: gz/sensors/Lidar.hh:257
Lidar Sensor Class.
Definition: gz/sensors/Lidar.hh:49