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(
const common::Time &_now)
override;
65 public:
void ApplyNoise();
70 public:
virtual bool PublishLidarScan(
const common::Time &_now);
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;
88 public:
void SetParent(
const std::string &_parent)
override;
91 public:
virtual bool CreateLidar();
94 protected:
virtual void Fini();
98 public: gz::math::Angle AngleMin()
const;
102 public:
void SetAngleMin(
const double _angle);
106 public: gz::math::Angle AngleMax()
const;
110 public:
void SetAngleMax(
const double _angle);
114 public:
double AngleResolution()
const;
118 public:
double RangeMin()
const;
122 public:
double RangeMax()
const;
131 public:
double RangeResolution()
const;
135 public:
unsigned int RayCount()
const;
139 public:
unsigned int RangeCount()
const;
143 public:
unsigned int VerticalRayCount()
const;
147 public:
unsigned int VerticalRangeCount()
const;
151 public: gz::math::Angle VerticalAngleMin()
const;
155 public:
void SetVerticalAngleMin(
const double _angle);
159 public: gz::math::Angle VerticalAngleMax()
const;
163 public:
void SetVerticalAngleMax(
const double _angle);
167 public:
double VerticalAngleResolution()
const;
178 public:
double Range(
const int _index)
const;
193 public:
double Retro(
const int _index)
const;
204 public:
int Fiducial(
const unsigned int _index)
const;
208 public:
bool IsHorizontal()
const;
216 public:
double RayCountRatio()
const;
224 public:
double RangeCountRatio()
const;
228 public:
double HorzFOV()
const;
232 public:
double VertFOV()
const;
235 public:
virtual bool IsActive()
const;
237 IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
240 IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
243 public:
float *laserBuffer =
nullptr;
246 public:
bool initialized =
false;
255 public:
virtual gz::common::ConnectionPtr ConnectNewLidarFrame(
257 unsigned int _heighti,
unsigned int _channels,
260 IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
264 IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
a rendering sensor class
Definition: gz/sensors/RenderingSensor.hh:52
Definition: gz/sensors/AirPressureSensor.hh:32
std::mutex lidarMutex
Just a mutex for thread safety.
Definition: gz/sensors/Lidar.hh:239
Lidar Sensor Class.
Definition: gz/sensors/Lidar.hh:49