gz/sensors/Lidar.hh
Go to the documentation of this file.
double Range(const int _index) const
Get detected range for a ray. Warning: If you are accessing all the ray data in a loop it's possible ...
double HorzFOV() const
Get the horizontal field of view of the laser sensor.
double VerticalAngleResolution() const
Get the vertical angle in radians between each range.
gz::math::Angle VerticalAngleMax() const
Get the vertical scan line top angle.
void SetAngleMax(const double _angle)
Set the scan maximum angle.
unsigned int VerticalRayCount() const
Get the vertical scan line count.
double RangeCountRatio() const
Return the ratio of horizontal range count to vertical range count.
gz::math::Angle VerticalAngleMin() const
Get the vertical scan bottom angle.
void SetVerticalAngleMax(const double _angle)
Set the vertical scan line top angle.
double RangeResolution() const
Get the range resolution If RangeResolution is 1, the number of simulated rays is equal to the number...
virtual bool PublishLidarScan(const std::chrono::steady_clock::duration &_now)
Publish LaserScan message.
void ApplyNoise()
Apply noise to the laser buffer, if noise has been configured. This should be called before PublishLi...
double RayCountRatio() const
Return the ratio of horizontal ray count to vertical ray count.
virtual bool Load(sdf::ElementPtr _sdf) override
Load the sensor with SDF parameters.
void Ranges(std::vector< double > &_ranges) const
Get all the ranges.
virtual bool IsActive() const
virtual bool Load(const sdf::Sensor &_sdf) override
Load the sensor based on data from an sdf::Sensor object.
virtual gz::common::ConnectionPtr ConnectNewLidarFrame(std::function< void(const float *_scan, unsigned int _width, unsigned int _heighti, unsigned int _channels, const std::string &)> _subscriber)
Set a callback to be called when data is generated.
void SetParent(const std::string &_parent) override
Initialize values in the sensor.
double AngleResolution() const
Get radians between each range.
virtual bool Update(const std::chrono::steady_clock::duration &_now) override
Force the sensor to generate data.
double Retro(const int _index) const
Get detected retro (intensity) value for a ray. Warning: If you are accessing all the ray data in a l...
void SetAngleMin(const double _angle)
Set the scan minimum angle.
int Fiducial(const unsigned int _index) const
Get detected fiducial value for a ray. Warning: If you are accessing all the ray data in a loop it's ...
void SetVerticalAngleMin(const double _angle)
Set the vertical scan bottom angle.
std::mutex lidarMutex
Just a mutex for thread safety.
Definition: gz/sensors/Lidar.hh:257
bool HasConnections() const
Check if there are any subscribers for sensor data.
unsigned int VerticalRangeCount() const
Get the vertical scan line count.
a rendering sensor class
Definition: gz/sensors/RenderingSensor.hh:54
Definition: gz/sensors/AirPressureSensor.hh:32