MagnetometerSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _GAZEBO_SENSORS_MAGNETOMETER_SENSOR_HH_
18 #define _GAZEBO_SENSORS_MAGNETOMETER_SENSOR_HH_
19 
20 #include <string>
21 
22 #include <sdf/sdf.hh>
23 #include <ignition/math/Vector3.hh>
24 
25 #include "gazebo/sensors/Sensor.hh"
28 #include "gazebo/util/system.hh"
29 
30 namespace gazebo
31 {
32  namespace sensors
33  {
34  // Forward declare private data
35  class MagnetometerSensorPrivate;
36 
39 
42  {
44  public: MagnetometerSensor();
45 
47  public: virtual ~MagnetometerSensor();
48 
49  // Documentation inherited
50  public: virtual void Load(const std::string & _worldName,
51  sdf::ElementPtr _sdf);
52 
53  // Documentation inherited
54  public: virtual void Load(const std::string & _worldName);
55 
56  // Documentation inherited
57  public: virtual void Init();
58 
59  // Documentation inherited
60  public: virtual std::string GetTopic() const;
61 
62  // Documentation inherited
63  protected: virtual bool UpdateImpl(const bool _force);
64 
65  // Documentation inherited
66  public: virtual void Fini();
67 
70  public: ignition::math::Vector3d MagneticField() const;
71 
73  private: std::unique_ptr<MagnetometerSensorPrivate> dataPtr;
74  };
76  }
77 }
78 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
MagnetometerSensor to provide magnetic field measurement.
Definition: MagnetometerSensor.hh:41
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Forward declarations and typedefs for sensors.
Base class for sensors.
Definition: Sensor.hh:50
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59