17 #ifndef GAZEBO_PHYSICS_MULTIRAYSHAPE_HH_
18 #define GAZEBO_PHYSICS_MULTIRAYSHAPE_HH_
22 #include <ignition/math/Angle.hh>
65 public:
virtual void Init();
69 public:
virtual void SetScale(
const ignition::math::Vector3d &_scale);
74 public:
double GetRange(
unsigned int _index);
79 public:
double GetRetro(
unsigned int _index);
84 public:
int GetFiducial(
unsigned int _index);
88 public:
double GetMinRange()
const;
92 public:
double GetMaxRange()
const;
96 public:
double GetResRange()
const;
100 public:
int GetSampleCount()
const;
104 public:
double GetScanResolution()
const;
113 public: ignition::math::Angle MinAngle()
const;
122 public: ignition::math::Angle MaxAngle()
const;
126 public:
int GetVerticalSampleCount()
const;
130 public:
double GetVerticalScanResolution()
const;
139 public: ignition::math::Angle VerticalMinAngle()
const;
148 public: ignition::math::Angle VerticalMaxAngle()
const;
151 public:
void Update();
156 public:
void FillMsg(msgs::Geometry &_msg);
161 public:
virtual void ProcessMsg(
const msgs::Geometry &_msg);
164 public:
virtual double ComputeVolume()
const;
169 public:
template<
typename T>
171 {
return this->newLaserScans.Connect(_subscriber);}
178 {this->newLaserScans.Disconnect(_conn->Id());}
184 public:
virtual void UpdateRays() = 0;
196 public:
virtual void AddRay(
const ignition::math::Vector3d &_start,
197 const ignition::math::Vector3d &_end);
205 public:
bool SetRay(
const unsigned int _rayIndex,
206 const ignition::math::Vector3d &_start,
207 const ignition::math::Vector3d &_end);
211 public:
unsigned int RayCount()
const;
217 public:
RayShapePtr Ray(
const unsigned int _rayIndex)
const;
220 protected: std::vector<RayShapePtr>
rays;
223 protected: ignition::math::Pose3d
offset;
244 private:
double minRange = 0;
247 private:
double maxRange = 1000;
sdf::ElementPtr scanElem
Scan SDF element pointer.
Definition: MultiRayShape.hh:229
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
Laser collision contains a set of ray-collisions, structured to simulate a laser range scanner...
Definition: MultiRayShape.hh:42
void DisconnectNewLaserScans(event::ConnectionPtr &_conn) GAZEBO_DEPRECATED(8.0)
Disconnect from the new laser scans signal.
Definition: MultiRayShape.hh:176
Base class for all shapes.
Definition: Shape.hh:45
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:125
ignition::math::Pose3d offset
Pose offset of all the rays.
Definition: MultiRayShape.hh:223
sdf::ElementPtr rayElem
Ray SDF element pointer.
Definition: MultiRayShape.hh:226
sdf::ElementPtr horzElem
Horizontal SDF element pointer.
Definition: MultiRayShape.hh:232
sdf::ElementPtr rangeElem
Range SDF element pointer.
Definition: MultiRayShape.hh:238
std::vector< RayShapePtr > rays
Ray data.
Definition: MultiRayShape.hh:220
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302
boost::shared_ptr< RayShape > RayShapePtr
Definition: PhysicsTypes.hh:145
event::ConnectionPtr ConnectNewLaserScans(T _subscriber)
Connect a to the new laser scan signal.
Definition: MultiRayShape.hh:170
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
An angle and related functions.
Definition: Angle.hh:53
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113
event::EventT< void()> newLaserScans
New laser scans event.
Definition: MultiRayShape.hh:241
sdf::ElementPtr vertElem
Vertical SDF element pointer.
Definition: MultiRayShape.hh:235