Imu.hh
Go to the documentation of this file.
1 /*
2  * Copyright 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 SDF_IMU_HH_
18 #define SDF_IMU_HH_
19 
20 #include <string>
21 #include <sdf/Error.hh>
22 #include <sdf/Element.hh>
23 #include <sdf/Noise.hh>
24 #include <sdf/sdf_config.h>
25 
26 namespace sdf
27 {
28  // Inline bracket to help doxygen filtering.
29  inline namespace SDF_VERSION_NAMESPACE {
30  //
31  class ImuPrivate;
32 
36  {
38  public: Imu();
39 
42  public: Imu(const Imu &_imu);
43 
46  public: Imu(Imu &&_imu) noexcept;
47 
49  public: ~Imu();
50 
54  public: Imu &operator=(const Imu &_imu);
55 
59  public: Imu &operator=(Imu &&_imu) noexcept;
60 
67  public: Errors Load(ElementPtr _sdf);
68 
73  public: sdf::ElementPtr Element() const;
74 
78  public: const Noise &LinearAccelerationXNoise() const;
79 
83  public: void SetLinearAccelerationXNoise(const Noise &_noise);
84 
88  public: const Noise &LinearAccelerationYNoise() const;
89 
93  public: void SetLinearAccelerationYNoise(const Noise &_noise);
94 
98  public: const Noise &LinearAccelerationZNoise() const;
99 
103  public: void SetLinearAccelerationZNoise(const Noise &_noise);
104 
108  public: const Noise &AngularVelocityXNoise() const;
109 
113  public: void SetAngularVelocityXNoise(const Noise &_noise);
114 
118  public: const Noise &AngularVelocityYNoise() const;
119 
123  public: void SetAngularVelocityYNoise(const Noise &_noise);
124 
128  public: const Noise &AngularVelocityZNoise() const;
129 
133  public: void SetAngularVelocityZNoise(const Noise &_noise);
134 
141  public: gz::math::Vector3d &GravityDirX() const;
142 
149  public: void SetGravityDirX(const gz::math::Vector3d &_grav) const;
150 
156  public: const std::string &GravityDirXParentFrame() const;
157 
163  public: void SetGravityDirXParentFrame(const std::string &_frame) const;
164 
197  public: const std::string &Localization() const;
198 
201  public: void SetLocalization(const std::string &_localization);
202 
238  public: const gz::math::Vector3d &CustomRpy() const;
239 
242  public: void SetCustomRpy(const gz::math::Vector3d &_rpy) const;
243 
249  public: const std::string &CustomRpyParentFrame() const;
250 
256  public: void SetCustomRpyParentFrame(const std::string &_frame) const;
257 
261  public: bool operator==(const Imu &_imu) const;
262 
267  public: bool operator!=(const Imu &_imu) const;
268 
270  private: ImuPrivate *dataPtr;
271  };
272  }
273 }
274 #endif
Error.hh
Noise.hh
sdf
namespace for Simulation Description Format parser
Definition: Actor.hh:32
sdf::v9::Imu
Imu contains information about an imu sensor.
Definition: Imu.hh:35
sdf::v9::Errors
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:89
SDFORMAT_VISIBLE
#define SDFORMAT_VISIBLE
Definition: system_util.hh:48
sdf::v9::Noise
The Noise class contains information about a noise model, such as a Gaussian distribution.
Definition: Noise.hh:49
sdf::v9::ElementPtr
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:53
sdf::v9::Element
class SDFORMAT_VISIBLE Element
Definition: Element.hh:49
Element.hh