17#ifndef GAZEBO_PHYSICS_MULTIRAYSHAPE_HH_
18#define GAZEBO_PHYSICS_MULTIRAYSHAPE_HH_
22#include <ignition/math/Angle.hh>
62 public:
virtual void Init();
66 public:
virtual void SetScale(
const ignition::math::Vector3d &_scale);
146 public:
template<
typename T>
148 {
return this->newLaserScans.Connect(_subscriber);}
159 public:
virtual void AddRay(
const ignition::math::Vector3d &_start,
160 const ignition::math::Vector3d &_end);
168 public:
bool SetRay(
const unsigned int _rayIndex,
169 const ignition::math::Vector3d &_start,
170 const ignition::math::Vector3d &_end);
183 protected: std::vector<RayShapePtr>
rays;
186 protected: ignition::math::Pose3d
offset;
207 private:
double minRange = 0;
210 private:
double maxRange = 1000;
A class for event processing.
Definition Event.hh:98
Laser collision contains a set of ray-collisions, structured to simulate a laser range scanner.
Definition MultiRayShape.hh:40
virtual void SetScale(const ignition::math::Vector3d &_scale)
Set the scale of the multi ray shape.
virtual void UpdateRays()=0
Method for updating the rays.
int GetFiducial(unsigned int _index)
Get detected fiducial value for a ray.
event::ConnectionPtr ConnectNewLaserScans(T _subscriber)
Connect a to the new laser scan signal.
Definition MultiRayShape.hh:147
virtual double ComputeVolume() const
Documentation inherited.
virtual void Init()
Init the shape.
double GetMaxRange() const
Get the maximum range.
MultiRayShape(PhysicsEnginePtr _physicsEngine)
Constructor for a stand alone multiray shape.
sdf::ElementPtr vertElem
Vertical SDF element pointer.
Definition MultiRayShape.hh:198
ignition::math::Pose3d offset
Pose offset of all the rays.
Definition MultiRayShape.hh:186
MultiRayShape(CollisionPtr _parent)
Constructor.
double GetRetro(unsigned int _index)
Get detected retro (intensity) value for a ray.
event::EventT< void()> newLaserScans
New laser scans event.
Definition MultiRayShape.hh:204
sdf::ElementPtr rayElem
Ray SDF element pointer.
Definition MultiRayShape.hh:189
double GetVerticalScanResolution() const
Get the vertical range resolution.
std::vector< RayShapePtr > rays
Ray data.
Definition MultiRayShape.hh:183
int GetVerticalSampleCount() const
Get the vertical sample count.
ignition::math::Angle MinAngle() const
Get the minimum angle.
virtual ~MultiRayShape()
Destructor.
int GetSampleCount() const
Get the horizontal sample count.
double GetMinRange() const
Get the minimum range.
bool SetRay(const unsigned int _rayIndex, const ignition::math::Vector3d &_start, const ignition::math::Vector3d &_end)
Set the points of a ray.
ignition::math::Angle VerticalMaxAngle() const
Get the vertical max angle.
ignition::math::Angle MaxAngle() const
Get the maximum angle.
double GetResRange() const
Get the range resolution.
double GetRange(unsigned int _index)
Get detected range for a ray.
unsigned int RayCount() const
Get the number of rays.
ignition::math::Angle VerticalMinAngle() const
Get the vertical min angle.
sdf::ElementPtr rangeElem
Range SDF element pointer.
Definition MultiRayShape.hh:201
double GetScanResolution() const
Get the horizontal resolution.
void Update()
Update the ray collisions.
virtual void ProcessMsg(const msgs::Geometry &_msg)
\TODO This function is not implemented.
sdf::ElementPtr horzElem
Horizontal SDF element pointer.
Definition MultiRayShape.hh:195
void FillMsg(msgs::Geometry &_msg)
\TODO This function is not implemented.
RayShapePtr Ray(const unsigned int _rayIndex) const
Get a pointer to a ray.
virtual void AddRay(const ignition::math::Vector3d &_start, const ignition::math::Vector3d &_end)
Add a ray to the collision.
sdf::ElementPtr scanElem
Scan SDF element pointer.
Definition MultiRayShape.hh:192
Base class for all shapes.
Definition Shape.hh:40
ConnectionPtr Connect(const std::function< T > &_subscriber)
Connect a callback to this event.
Definition Event.hh:558
boost::shared_ptr< Connection > ConnectionPtr
Definition CommonTypes.hh:134
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition PhysicsTypes.hh:125
boost::shared_ptr< Collision > CollisionPtr
Definition PhysicsTypes.hh:113
boost::shared_ptr< RayShape > RayShapePtr
Definition PhysicsTypes.hh:145
Forward declarations for the common classes.
Definition Animation.hh:27