##

RaySensor.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _GAZEBO_SENSORS_RAYSENSOR_HH_
#define _GAZEBO_SENSORS_RAYSENSOR_HH_
#include <memory>
#include <string>
#include <vector>
#include <ignition/math/Angle.hh>
#include "gazebo/sensors/Sensor.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
class OgreDynamicLines;
class Collision;
class MultiRayShape;
namespace sensors
{
// Forward declare private data class.
class RaySensorPrivate;
class GZ_SENSORS_VISIBLE RaySensor: public Sensor
{
public: RaySensor();
public: virtual ~RaySensor();
// Documentation inherited
public: virtual void Load(const std::string &_worldName);
// Documentation inherited
public: virtual void Init();
// Documentation inherited
protected: virtual bool UpdateImpl(const bool _force);
// Documentation inherited
protected: virtual void Fini();
// Documentation inherited
public: virtual std::string Topic() const;
public: ignition::math::Angle AngleMin() const;
public: ignition::math::Angle AngleMax() const;
public: double AngleResolution() const;
public: double RangeMin() const;
public: double RangeMax() const;
public: double RangeResolution() const;
public: int RayCount() const;
public: int RangeCount() const;
public: int VerticalRayCount() const;
public: int VerticalRangeCount() const;
public: ignition::math::Angle VerticalAngleMin() const;
public: ignition::math::Angle VerticalAngleMax() const;
public: double VerticalAngleResolution() const;
public: double Range(const unsigned int _index) const;
public: void Ranges(std::vector<double> &_ranges) const;
public: double Retro(const unsigned int _index) const;
public: int Fiducial(const unsigned int _index) const;
public: physics::MultiRayShapePtr LaserShape() const;
// Documentation inherited
public: virtual bool IsActive() const;
private: std::unique_ptr<RaySensorPrivate> dataPtr;
};
}
}
#endif
gazebo::sensors::RaySensor::IsActive
virtual bool IsActive() const
Returns true if sensor generation is active.
gazebo::sensors::RaySensor::Range
double Range(const unsigned int _index) const
Get detected range for a ray.
gazebo::sensors::RaySensor::~RaySensor
virtual ~RaySensor()
Destructor.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::sensors::RaySensor::VerticalAngleMax
ignition::math::Angle VerticalAngleMax() const
Get the vertical scan line top angle.
sensors
sensors
Definition: SensorManager.hh:35
gazebo::sensors::RaySensor::Init
virtual void Init()
Initialize the sensor.
gazebo::sensors::RaySensor::AngleResolution
double AngleResolution() const
Get the angle in radians between each range.
system.hh
gazebo::sensors::RaySensor::UpdateImpl
virtual bool UpdateImpl(const bool _force)
This gets overwritten by derived sensor types.
gazebo::sensors::RaySensor::Ranges
void Ranges(std::vector< double > &_ranges) const
Get all the ranges.
gazebo::sensors::RaySensor::VerticalAngleMin
ignition::math::Angle VerticalAngleMin() const
Get the vertical scan bottom angle.
gazebo::sensors::RaySensor::VerticalRangeCount
int VerticalRangeCount() const
Get the vertical scan line count.
gazebo::sensors::RaySensor::AngleMin
ignition::math::Angle AngleMin() const
Get the minimum angle.
gazebo::sensors::RaySensor::Topic
virtual std::string Topic() const
Returns the topic name as set in SDF.
Sensor.hh
gazebo::sensors::RaySensor
Sensor with one or more rays.
Definition: RaySensor.hh:51
gazebo::sensors::RaySensor::RangeMax
double RangeMax() const
Get the maximum range.
gazebo::sensors::RaySensor::Fini
virtual void Fini()
Finalize the sensor.
gazebo::sensors::RaySensor::RayCount
int RayCount() const
Get the ray count.
gazebo::sensors::RaySensor::RangeMin
double RangeMin() const
Get the minimum range.
gazebo::sensors::RaySensor::VerticalAngleResolution
double VerticalAngleResolution() const
Get the vertical angle in radians between each range.
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::sensors::RaySensor::Fiducial
int Fiducial(const unsigned int _index) const
Get detected fiducial value for a ray.
gazebo::sensors::RaySensor::Load
virtual void Load(const std::string &_worldName)
Load the sensor with default parameters.
gazebo::sensors::RaySensor::RangeCount
int RangeCount() const
Get the range count.
gazebo::sensors::RaySensor::Retro
double Retro(const unsigned int _index) const
Get detected retro (intensity) value for a ray.
gazebo::sensors::RaySensor::RangeResolution
double RangeResolution() const
Get the range resolution.
gazebo::sensors::Sensor
Base class for sensors.
Definition: Sensor.hh:51
gazebo::sensors::RaySensor::LaserShape
physics::MultiRayShapePtr LaserShape() const
Returns a pointer to the internal physics::MultiRayShape.
gazebo::physics::MultiRayShapePtr
boost::shared_ptr< MultiRayShape > MultiRayShapePtr
Definition: PhysicsTypes.hh:153
gazebo::sensors::RaySensor::AngleMax
ignition::math::Angle AngleMax() const
Get the maximum angle.
gazebo::sensors::RaySensor::VerticalRayCount
int VerticalRayCount() const
Get the vertical scan line count.
gazebo::sensors::RaySensor::RaySensor
RaySensor()
Constructor.