Go to the documentation of this file.
17 #ifndef _GAZEBO_SENSORS_GPURAYSENSOR_HH_
18 #define _GAZEBO_SENSORS_GPURAYSENSOR_HH_
24 #include <ignition/math/Angle.hh>
25 #include <ignition/math/Pose3.hh>
39 class GpuRaySensorPrivate;
61 public:
virtual void Load(
const std::string &_worldName,
62 sdf::ElementPtr _sdf);
66 public:
virtual void Load(
const std::string &_worldName);
69 public:
virtual void Init();
72 protected:
virtual bool UpdateImpl(
const bool _force);
75 protected:
virtual void Fini();
78 public:
virtual std::string Topic()
const;
86 public: ignition::math::Angle AngleMin()
const;
90 public:
void SetAngleMin(
const double _angle);
94 public: ignition::math::Angle AngleMax()
const;
98 public:
void SetAngleMax(
const double _angle);
102 public:
double AngleResolution()
const;
106 public:
double RangeMin()
const;
110 public:
double RangeMax()
const;
119 public:
double RangeResolution()
const;
123 public:
int RayCount()
const;
127 public:
int RangeCount()
const;
131 public:
int VerticalRayCount()
const;
135 public:
int VerticalRangeCount()
const;
139 public: ignition::math::Angle VerticalAngleMin()
const;
143 public:
void SetVerticalAngleMin(
const double _angle);
147 public: ignition::math::Angle VerticalAngleMax()
const;
151 public:
void SetVerticalAngleMax(
const double _angle);
155 public:
double VerticalAngleResolution()
const;
166 public:
double Range(
const int _index)
const;
170 public:
void Ranges(std::vector<double> &_ranges)
const;
181 public:
double Retro(
const int _index)
const;
192 public:
int Fiducial(
const unsigned int _index)
const;
196 public:
unsigned int CameraCount()
const;
200 public:
bool IsHorizontal()
const;
208 public:
double RayCountRatio()
const;
216 public:
double RangeCountRatio()
const;
220 public:
double HorzFOV()
const;
224 public:
double CosHorzFOV()
const;
228 public:
double VertFOV()
const;
232 public:
double CosVertFOV()
const;
236 public:
double HorzHalfAngle()
const;
240 public:
double VertHalfAngle()
const;
245 std::function<
void(
const float *,
unsigned int,
unsigned int,
246 unsigned int,
const std::string &)> _subscriber);
249 public:
virtual bool IsActive()
const;
252 private:
void Render();
256 private: std::unique_ptr<GpuRaySensorPrivate> dataPtr;
virtual bool UpdateImpl(const bool _force)
This gets overwritten by derived sensor types.
int RayCount() const
Get the ray count.
virtual ~GpuRaySensor()
Destructor.
double RangeMin() const
Get the minimum range.
double Retro(const int _index) const
Get detected retro (intensity) value for a ray.
event::ConnectionPtr ConnectNewLaserFrame(std::function< void(const float *, unsigned int, unsigned int, unsigned int, const std::string &)> _subscriber)
Connect to the new laser frame event.
double HorzHalfAngle() const
Get (horizontal_max_angle + horizontal_min_angle) * 0.5.
Forward declarations for the common classes.
Definition: Animation.hh:26
boost::shared_ptr< GpuLaser > GpuLaserPtr
Definition: RenderTypes.hh:106
double VertFOV() const
Get the vertical field-of-view.
sensors
Definition: SensorManager.hh:35
int VerticalRangeCount() const
Get the vertical scan line count.
Forward declarations for transport.
double HorzFOV() const
Get the horizontal field of view of the laser sensor.
void SetVerticalAngleMin(const double _angle)
Set the vertical scan bottom angle.
double CosHorzFOV() const
Get Cos Horz field-of-view.
ignition::math::Angle VerticalAngleMax() const
Get the vertical scan line top angle.
double Range(const int _index) const
Get detected range for a ray.
int Fiducial(const unsigned int _index) const
Get detected fiducial value for a ray.
ignition::math::Angle VerticalAngleMin() const
Get the vertical scan bottom angle.
double RangeResolution() const
Get the range resolution If RangeResolution is 1, the number of simulated rays is equal to the number...
virtual std::string Topic() const
Returns the topic name as set in SDF.
GPU based laser sensor.
Definition: GpuRaySensor.hh:50
ignition::math::Angle AngleMax() const
Get the maximum angle.
virtual void Load(const std::string &_worldName, sdf::ElementPtr _sdf)
Load the sensor with SDF parameters.
int VerticalRayCount() const
Get the vertical scan line count.
bool IsHorizontal() const
Gets if sensor is horizontal.
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
double CosVertFOV() const
Get Cos Vert field-of-view.
double VertHalfAngle() const
Get (vertical_max_angle + vertical_min_angle) * 0.5.
rendering::GpuLaserPtr LaserCamera() const
Returns a pointer to the internally kept rendering::GpuLaser.
void SetAngleMin(const double _angle)
Set the scan minimum angle.
void SetVerticalAngleMax(const double _angle)
Set the vertical scan line top angle.
GpuRaySensor()
Constructor.
Base class for sensors.
Definition: Sensor.hh:51
double VerticalAngleResolution() const
Get the vertical angle in radians between each range.
virtual void Init()
Initialize the ray.
void SetAngleMax(const double _angle)
Set the scan maximum angle.
double RayCountRatio() const
Return the ratio of horizontal ray count to vertical ray count.
double AngleResolution() const
Get radians between each range.
double RangeCountRatio() const
Return the ratio of horizontal range count to vertical range count.
int RangeCount() const
Get the range count.
double RangeMax() const
Get the maximum range.
void Ranges(std::vector< double > &_ranges) const
Get all the ranges.
unsigned int CameraCount() const
Gets the camera count.
virtual void Fini()
Finalize the ray.
ignition::math::Angle AngleMin() const
Get the minimum angle.
virtual bool IsActive() const
Returns true if sensor generation is active.