22 #ifndef _GPURAYSENSOR_HH_
23 #define _GPURAYSENSOR_HH_
27 #include <boost/thread/mutex.hpp>
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(
bool _force);
75 protected:
virtual void Fini();
78 public:
virtual std::string GetTopic()
const;
83 {
return this->laserCam;}
91 public:
void SetAngleMin(
double _angle);
99 public:
void SetAngleMax(
double _angle);
102 public:
double GetAngleResolution()
const;
106 public:
double GetRangeMin()
const;
110 public:
double GetRangeMax()
const;
119 public:
double GetRangeResolution()
const;
123 public:
int GetRayCount()
const;
127 public:
int GetRangeCount()
const;
131 public:
int GetVerticalRayCount()
const;
135 public:
int GetVerticalRangeCount()
const;
143 public:
void SetVerticalAngleMin(
double _angle);
151 public:
void SetVerticalAngleMax(
double _angle);
155 public:
double GetVerticalAngleResolution()
const;
166 public:
double GetRange(
int _index);
170 public:
void GetRanges(std::vector<double> &_ranges);
181 public:
double GetRetro(
int _index)
const;
192 public:
int GetFiducial(
int _index)
const;
196 public:
unsigned int GetCameraCount()
const;
200 public:
bool IsHorizontal()
const;
208 public:
double GetRayCountRatio()
const;
216 public:
double GetRangeCountRatio()
const;
220 public:
double GetHorzFOV()
const;
224 public:
double GetCosHorzFOV()
const;
227 public:
double GetVertFOV()
const;
231 public:
double GetCosVertFOV()
const;
235 public:
double GetHorzHalfAngle()
const;
239 public:
double GetVertHalfAngle()
const;
244 boost::function<
void(
const float *,
unsigned int,
unsigned int,
245 unsigned int,
const std::string &)> _subscriber);
252 public:
virtual bool IsActive();
255 private:
void Render();
291 private: boost::mutex mutex;
294 private: msgs::LaserScanStamped laserMsg;
303 private:
bool rendered;