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 <gz/utils/ImplPtr.hh>
22 #include <sdf/Error.hh>
23 #include <sdf/Element.hh>
24 #include <sdf/Noise.hh>
25 #include <sdf/sdf_config.h>
26 
27 namespace sdf
28 {
29  // Inline bracket to help doxygen filtering.
30  inline namespace SDF_VERSION_NAMESPACE {
34  {
36  public: Imu();
37 
44  public: Errors Load(ElementPtr _sdf);
45 
50  public: sdf::ElementPtr Element() const;
51 
55  public: const Noise &LinearAccelerationXNoise() const;
56 
60  public: void SetLinearAccelerationXNoise(const Noise &_noise);
61 
65  public: const Noise &LinearAccelerationYNoise() const;
66 
70  public: void SetLinearAccelerationYNoise(const Noise &_noise);
71 
75  public: const Noise &LinearAccelerationZNoise() const;
76 
80  public: void SetLinearAccelerationZNoise(const Noise &_noise);
81 
85  public: const Noise &AngularVelocityXNoise() const;
86 
90  public: void SetAngularVelocityXNoise(const Noise &_noise);
91 
95  public: const Noise &AngularVelocityYNoise() const;
96 
100  public: void SetAngularVelocityYNoise(const Noise &_noise);
101 
105  public: const Noise &AngularVelocityZNoise() const;
106 
110  public: void SetAngularVelocityZNoise(const Noise &_noise);
111 
118  public: const gz::math::Vector3d &GravityDirX() const;
119 
126  public: void SetGravityDirX(const gz::math::Vector3d &_grav);
127 
133  public: const std::string &GravityDirXParentFrame() const;
134 
140  public: void SetGravityDirXParentFrame(const std::string &_frame);
141 
174  public: const std::string &Localization() const;
175 
178  public: void SetLocalization(const std::string &_localization);
179 
215  public: const gz::math::Vector3d &CustomRpy() const;
216 
219  public: void SetCustomRpy(const gz::math::Vector3d &_rpy);
220 
226  public: const std::string &CustomRpyParentFrame() const;
227 
233  public: void SetCustomRpyParentFrame(const std::string &_frame);
234 
238  public: bool OrientationEnabled() const;
239 
243  public: void SetOrientationEnabled(bool _enabled);
244 
248  public: bool operator==(const Imu &_imu) const;
249 
254  public: bool operator!=(const Imu &_imu) const;
255 
261  public: sdf::ElementPtr ToElement() const;
262 
264  IGN_UTILS_IMPL_PTR(dataPtr)
265  };
266  }
267 }
268 #endif
Error.hh
Noise.hh
sdf::SDF_VERSION_NAMESPACE::Imu
Imu contains information about an imu sensor.
Definition: Imu.hh:33
sdf
namespace for Simulation Description Format parser
Definition: Actor.hh:34
sdf::SDF_VERSION_NAMESPACE::Element
class IGNITION_SDFORMAT_VISIBLE Element
Definition: Element.hh:50
sdf_config.h
SDFORMAT_VISIBLE
#define SDFORMAT_VISIBLE
Definition: system_util.hh:25
sdf::SDF_VERSION_NAMESPACE::Noise
The Noise class contains information about a noise model, such as a Gaussian distribution.
Definition: Noise.hh:47
sdf::SDF_VERSION_NAMESPACE::Errors
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:106
sdf::SDF_VERSION_NAMESPACE::ElementPtr
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:54
Element.hh