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;
158 public: math::Angle GetVerticalAngleMin() const GAZEBO_DEPRECATED(6.0);
162 public:
ignition::math::Angle VerticalAngleMin() const;
166 public:
void SetVerticalAngleMin(
double _angle);
172 public: math::Angle GetVerticalAngleMax() const GAZEBO_DEPRECATED(6.0);
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);
278 public:
void DisconnectNewLaserFrame(event::
ConnectionPtr &_conn);
281 public: virtual
bool IsActive();
284 private:
void Render();
287 protected: sdf::ElementPtr scanElem;
290 protected: sdf::ElementPtr horzElem;
293 protected: sdf::ElementPtr vertElem;
296 protected: sdf::ElementPtr rangeElem;
299 protected: sdf::ElementPtr cameraElem;
302 protected:
unsigned int horzRayCount;
305 protected:
unsigned int vertRayCount;
308 protected:
unsigned int horzRangeCount;
311 protected:
unsigned int vertRangeCount;
314 protected:
double rangeCountRatio;
320 private:
boost::mutex mutex;
323 private: msgs::LaserScanStamped laserMsg;
326 private: physics::
EntityPtr parentEntity;
332 private:
bool rendered;
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:147
GPU based laser sensor.
Definition: GpuRaySensor.hh:55
Definition: JointMaker.hh:41
Forward declarations for the common classes.
Definition: Animation.hh:33
Forward declarations for transport.
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:47
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
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
An angle and related functions.
Definition: Angle.hh:53
Definition: Animation.hh:24
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