22 #ifndef _GPURAYSENSOR_HH_ 23 #define _GPURAYSENSOR_HH_ 27 #include <boost/function.hpp> 28 #include <boost/thread/mutex.hpp> 30 #include <ignition/math/Angle.hh> 31 #include <ignition/math/Pose3.hh> 66 public:
virtual void Load(
const std::string &_worldName,
67 sdf::ElementPtr _sdf);
71 public:
virtual void Load(
const std::string &_worldName);
74 public:
virtual void Init();
77 protected:
virtual bool UpdateImpl(
bool _force);
80 protected:
virtual void Fini();
83 public:
virtual std::string GetTopic()
const;
88 {
return this->laserCam;}
98 public: ignition::math::Angle AngleMin()
const;
102 public:
void SetAngleMin(
double _angle);
112 public: ignition::math::Angle AngleMax()
const;
116 public:
void SetAngleMax(
double _angle);
119 public:
double GetAngleResolution()
const;
123 public:
double GetRangeMin()
const;
127 public:
double GetRangeMax()
const;
136 public:
double GetRangeResolution()
const;
140 public:
int GetRayCount()
const;
144 public:
int GetRangeCount()
const;
148 public:
int GetVerticalRayCount()
const;
152 public:
int GetVerticalRangeCount()
const;
162 public: ignition::math::Angle VerticalAngleMin()
const;
166 public:
void SetVerticalAngleMin(
double _angle);
176 public: ignition::math::Angle VerticalAngleMax()
const;
180 public:
void SetVerticalAngleMax(
double _angle);
184 public:
double GetVerticalAngleResolution()
const;
195 public:
double GetRange(
int _index);
199 public:
void GetRanges(std::vector<double> &_ranges);
210 public:
double GetRetro(
int _index)
const;
221 public:
int GetFiducial(
int _index)
const;
225 public:
unsigned int GetCameraCount()
const;
229 public:
bool IsHorizontal()
const;
237 public:
double GetRayCountRatio()
const;
245 public:
double GetRangeCountRatio()
const;
249 public:
double GetHorzFOV()
const;
253 public:
double GetCosHorzFOV()
const;
256 public:
double GetVertFOV()
const;
260 public:
double GetCosVertFOV()
const;
264 public:
double GetHorzHalfAngle()
const;
268 public:
double GetVertHalfAngle()
const;
273 boost::function<
void(
const float *,
unsigned int,
unsigned int,
274 unsigned int,
const std::string &)> _subscriber);
281 public:
virtual bool IsActive();
284 private:
void Render();
320 private: boost::mutex mutex;
323 private: msgs::LaserScanStamped laserMsg;
332 private:
bool rendered;
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:147
GPU based laser sensor.
Definition: GpuRaySensor.hh:55
Forward declarations for the common classes.
Definition: Animation.hh:33
sdf::ElementPtr rangeElem
Range SDF element.
Definition: GpuRaySensor.hh:296
unsigned int horzRayCount
Horizontal ray count.
Definition: GpuRaySensor.hh:302
Forward declarations for transport.
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:47
unsigned int vertRayCount
Vertical ray count.
Definition: GpuRaySensor.hh:305
unsigned int vertRangeCount
Vertical range count.
Definition: GpuRaySensor.hh:311
double rangeCountRatio
Range count ratio.
Definition: GpuRaySensor.hh:314
boost::shared_ptr< Entity > EntityPtr
Definition: PhysicsTypes.hh:76
boost::shared_ptr< GpuLaser > GpuLaserPtr
Definition: RenderTypes.hh:99
rendering::GpuLaserPtr GetLaserCamera() const
Returns a pointer to the internally kept rendering::GpuLaser.
Definition: GpuRaySensor.hh:87
sdf::ElementPtr scanElem
Scan SDF elementz.
Definition: GpuRaySensor.hh:287
sdf::ElementPtr cameraElem
Camera SDF element.
Definition: GpuRaySensor.hh:299
sdf::ElementPtr horzElem
Horizontal SDF element.
Definition: GpuRaySensor.hh:290
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
An angle and related functions.
Definition: Angle.hh:53
unsigned int horzRangeCount
Horizontal range count.
Definition: GpuRaySensor.hh:308
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Base class for sensors.
Definition: Sensor.hh:69
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66
sdf::ElementPtr vertElem
Vertical SDF element.
Definition: GpuRaySensor.hh:293