##

GpsSensor.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_GPSSENSOR_HH_
#define _GAZEBO_SENSORS_GPSSENSOR_HH_
#include <memory>
#include <string>
#include <ignition/math/Angle.hh>
#include <sdf/sdf.hh>
#include "gazebo/sensors/Sensor.hh"
#include "gazebo/sensors/SensorTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace sensors
{
// Forward declare private data class
class GpsSensorPrivate;
class GZ_SENSORS_VISIBLE GpsSensor: public Sensor
{
public: GpsSensor();
public: virtual ~GpsSensor();
// Documentation inherited
public: virtual void Load(const std::string & _worldName,
sdf::ElementPtr _sdf);
// 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
public: virtual void Fini();
public: ignition::math::Angle Longitude() const;
public: ignition::math::Angle Latitude() const;
public: double Altitude() const;
public: ignition::math::Vector3d VelocityENU() const;
public: double VelocityEast() const;
public: double VelocityNorth() const;
public: double VelocityUp() const;
private: std::unique_ptr<GpsSensorPrivate> dataPtr;
};
}
}
#endif
gazebo::sensors::GpsSensor::VelocityENU
ignition::math::Vector3d VelocityENU() const
Accessor for curent velocity in East-North-Up frame.
gazebo::sensors::GpsSensor::VelocityUp
double VelocityUp() const
Accessor for current velocity in Up direction.
gazebo::sensors::GpsSensor::Latitude
ignition::math::Angle Latitude() const
Accessor for current latitude angle.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::sensors::GpsSensor::Longitude
ignition::math::Angle Longitude() const
Accessor for current longitude angle.
sensors
sensors
Definition: SensorManager.hh:35
SensorTypes.hh
Forward declarations and typedefs for sensors.
system.hh
gazebo::sensors::GpsSensor::Altitude
double Altitude() const
Accessor for current altitude.
gazebo::sensors::GpsSensor::Init
virtual void Init()
Initialize the sensor.
Sensor.hh
gazebo::sensors::GpsSensor::Load
virtual void Load(const std::string &_worldName, sdf::ElementPtr _sdf)
Load the sensor with SDF parameters.
gazebo::sensors::GpsSensor::GpsSensor
GpsSensor()
Constructor.
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::sensors::GpsSensor::VelocityNorth
double VelocityNorth() const
Accessor for current velocity in North direction.
gazebo::sensors::GpsSensor::VelocityEast
double VelocityEast() const
Accessor for current velocity in East direction.
gazebo::sensors::Sensor
Base class for sensors.
Definition: Sensor.hh:51
gazebo::sensors::GpsSensor::Fini
virtual void Fini()
Finalize the sensor.
gazebo::sensors::GpsSensor
GpsSensor to provide position measurement.
Definition: GpsSensor.hh:42
gazebo::sensors::GpsSensor::UpdateImpl
virtual bool UpdateImpl(const bool _force)
This gets overwritten by derived sensor types.
gazebo::sensors::GpsSensor::~GpsSensor
virtual ~GpsSensor()
Destructor.