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;
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:144
Definition: GpuRaySensor.hh:50
sdf::ElementPtr rangeElem
Range SDF element.
Definition: GpuRaySensor.hh:267
unsigned int horzRayCount
Horizontal ray count.
Definition: GpuRaySensor.hh:273
Forward declarations for transport.
unsigned int vertRayCount
Vertical ray count.
Definition: GpuRaySensor.hh:276
unsigned int vertRangeCount
Vertical range count.
Definition: GpuRaySensor.hh:282
double rangeCountRatio
Range count ratio.
Definition: GpuRaySensor.hh:285
boost::shared_ptr< Entity > EntityPtr
Definition: PhysicsTypes.hh:74
boost::shared_ptr< GpuLaser > GpuLaserPtr
Definition: RenderTypes.hh:94
rendering::GpuLaserPtr GetLaserCamera() const
Returns a pointer to the internally kept rendering::GpuLaser.
Definition: GpuRaySensor.hh:82
sdf::ElementPtr scanElem
Scan SDF elementz.
Definition: GpuRaySensor.hh:258
sdf::ElementPtr cameraElem
Camera SDF element.
Definition: GpuRaySensor.hh:270
sdf::ElementPtr horzElem
Horizontal SDF element.
Definition: GpuRaySensor.hh:261
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
An angle and related functions.
Definition: Angle.hh:52
unsigned int horzRangeCount
Horizontal range count.
Definition: GpuRaySensor.hh:279
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Base class for sensors.
Definition: Sensor.hh:67
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
sdf::ElementPtr vertElem
Vertical SDF element.
Definition: GpuRaySensor.hh:264