17 #ifndef _MULTIRAYSHAPE_HH_
18 #define _MULTIRAYSHAPE_HH_
64 public:
virtual void Init();
73 public:
double GetRange(
unsigned int _index);
78 public:
double GetRetro(
unsigned int _index);
83 public:
int GetFiducial(
unsigned int _index);
87 public:
double GetMinRange()
const;
91 public:
double GetMaxRange()
const;
95 public:
double GetResRange()
const;
99 public:
int GetSampleCount()
const;
103 public:
double GetScanResolution()
const;
115 public:
int GetVerticalSampleCount()
const;
119 public:
double GetVerticalScanResolution()
const;
130 public:
void Update();
135 public:
void FillMsg(msgs::Geometry &_msg);
140 public:
virtual void ProcessMsg(
const msgs::Geometry &_msg);
143 public:
virtual double ComputeVolume()
const;
148 public:
template<
typename T>
150 {
return this->newLaserScans.Connect(_subscriber);}
155 {this->newLaserScans.Disconnect(_conn);}
161 public:
virtual void UpdateRays() = 0;
175 public:
bool SetRay(
const unsigned int _rayIndex,
176 const ignition::math::Vector3d &_start,
177 const ignition::math::Vector3d &_end);
181 public:
unsigned int RayCount()
const;
187 public:
RayShapePtr Ray(
const unsigned int _rayIndex)
const;
190 protected: std::vector<RayShapePtr>
rays;
214 private:
double minRange = 0;
217 private:
double maxRange = 1000;
sdf::ElementPtr scanElem
Scan SDF element pointer.
Definition: MultiRayShape.hh:199
math::Pose offset
Pose offset of all the rays.
Definition: MultiRayShape.hh:193
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
Laser collision contains a set of ray-collisions, structured to simulate a laser range scanner...
Definition: MultiRayShape.hh:41
Base class for all shapes.
Definition: Shape.hh:46
void DisconnectNewLaserScans(event::ConnectionPtr &_conn)
Disconnect from the new laser scans signal.
Definition: MultiRayShape.hh:154
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:125
sdf::ElementPtr rayElem
Ray SDF element pointer.
Definition: MultiRayShape.hh:196
sdf::ElementPtr horzElem
Horizontal SDF element pointer.
Definition: MultiRayShape.hh:202
sdf::ElementPtr rangeElem
Range SDF element pointer.
Definition: MultiRayShape.hh:208
std::vector< RayShapePtr > rays
Ray data.
Definition: MultiRayShape.hh:190
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:153
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:149
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:211
sdf::ElementPtr vertElem
Vertical SDF element pointer.
Definition: MultiRayShape.hh:205