Gazebo Sensors

API Reference

3.6.0
gz/sensors/MagnetometerSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 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 GZ_SENSORS_MAGNETOMETERSENSOR_HH_
18 #define GZ_SENSORS_MAGNETOMETERSENSOR_HH_
19 
20 #include <memory>
21 
22 #include <sdf/sdf.hh>
23 
24 #include <gz/common/SuppressWarning.hh>
25 #include <gz/common/Time.hh>
26 #include <gz/math/Pose3.hh>
27 
28 #include <gz/sensors/config.hh>
29 #include <gz/sensors/magnetometer/Export.hh>
30 
31 #include "gz/sensors/Sensor.hh"
32 
33 namespace ignition
34 {
35  namespace sensors
36  {
37  // Inline bracket to help doxygen filtering.
38  inline namespace IGNITION_SENSORS_VERSION_NAMESPACE {
39  //
41  class MagnetometerSensorPrivate;
42 
46  class IGNITION_SENSORS_MAGNETOMETER_VISIBLE MagnetometerSensor
47  : public Sensor
48  {
50  public: MagnetometerSensor();
51 
53  public: virtual ~MagnetometerSensor();
54 
58  public: virtual bool Load(const sdf::Sensor &_sdf) override;
59 
63  public: virtual bool Load(sdf::ElementPtr _sdf) override;
64 
67  public: virtual bool Init() override;
68 
72  public: virtual bool Update(const common::Time &_now) override;
73 
76  public: void SetWorldPose(const math::Pose3d _pose);
77 
80  public: math::Pose3d WorldPose() const;
81 
84  public: void SetWorldMagneticField(const math::Vector3d &_field);
85 
88  public: math::Vector3d WorldMagneticField() const;
89 
92  public: math::Vector3d MagneticField() const;
93 
94  IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
98  IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
99  };
100  }
101  }
102 }
103 
104 #endif
Definition: gz/sensors/AirPressureSensor.hh:32
Magnetometer Sensor Class.
Definition: gz/sensors/MagnetometerSensor.hh:46
a base sensor class
Definition: gz/sensors/Sensor.hh:60