Main MRPT website > C++ reference for MRPT 1.9.9
CObservationIMU.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CObservationIMU_H
10 #define CObservationIMU_H
11 
13 #include <mrpt/math/CMatrixD.h>
14 #include <mrpt/obs/CObservation.h>
15 #include <mrpt/poses/CPose3D.h>
16 #include <mrpt/poses/CPose2D.h>
17 
18 namespace mrpt
19 {
20 namespace obs
21 {
22 /** Symbolic names for the indices of IMU data (refer to
23  * mrpt::obs::CObservationIMU)
24  * \ingroup mrpt_obs_grp
25  */
27 {
28  /** x-axis acceleration (local/vehicle frame) (m/sec<sup>2</sup>) */
29  IMU_X_ACC = 0,
30  /** y-axis acceleration (local/vehicle frame) (m/sec<sup>2</sup>) */
32  /** z-axis acceleration (local/vehicle frame) (m/sec<sup>2</sup>) */
34  /** yaw angular velocity (local/vehicle frame) (rad/sec) */
36  /** pitch angular velocity (local/vehicle frame) (rad/sec) */
38  /** roll angular velocity (local/vehicle frame) (rad/sec) */
40  /** x-axis velocity (global/navigation frame) (m/sec) */
42  /** y-axis velocity (global/navigation frame) (m/sec) */
44  /** z-axis velocity (global/navigation frame) (m/sec) */
46  /** orientation yaw absolute value (global/navigation frame) (rad) */
48  /** orientation pitch absolute value (global/navigation frame) (rad) */
50  /** orientation roll absolute value (global/navigation frame) (rad) */
52  /** x absolute value (global/navigation frame) (meters) */
54  /** y absolute value (global/navigation frame) (meters) */
56  /** z absolute value (global/navigation frame) (meters) */
58  /** x magnetic field value (local/vehicle frame) (gauss) */
60  /** y magnetic field value (local/vehicle frame) (gauss) */
62  /** z magnetic field value (local/vehicle frame) (gauss) */
64  /** air pressure (Pascals) */
66  /** altitude from an altimeter (meters) */
68  /** temperature (degrees Celsius) */
70  /** Orientation Quaternion X (global/navigation frame) */
72  /** Orientation Quaternion Y (global/navigation frame) */
74  /** Orientation Quaternion Z (global/navigation frame) */
76  /** Orientation Quaternion W (global/navigation frame) */
78  /** yaw angular velocity (global/navigation frame) (rad/sec) */
80  /** pitch angular velocity (global/navigation frame) (rad/sec) */
82  /** roll angular velocity (global/navigation frame) (rad/sec) */
84  /** x-axis acceleration (global/navigation frame) (m/sec<sup>2</sup>) */
86  /** y-axis acceleration (global/navigation frame) (m/sec<sup>2</sup>) */
88  /** z-axis acceleration (global/navigation frame) (m/sec<sup>2</sup>) */
90 
91  // Always leave this last value to reflect the number of enum values
93 };
94 
95 /** This class stores measurements from an Inertial Measurement Unit (IMU)
96  * (attitude estimation, raw gyroscope and accelerometer values), altimeters or
97  * magnetometers.
98  *
99  * The order of the values in each entry of
100  * mrpt::obs::CObservationIMU::rawMeasurements is defined as symbolic names in
101  * the enum mrpt::obs::TIMUDataIndex.
102  * Check it out also for reference on the unit and the coordinate frame used
103  * for each value.
104  *
105  * \sa CObservation
106  * \ingroup mrpt_obs_grp
107  */
109 {
111 
112  public:
113  /** Constructor.
114  */
116  : sensorPose(),
119  {
120  }
121 
122  /** Destructor
123  */
124  virtual ~CObservationIMU() {}
125  /** The pose of the sensor on the robot. */
127 
128  /** Each entry in this vector is true if the corresponding data index
129  * contains valid data (the IMU unit supplies that kind of data).
130  * See the top of this page for the meaning of the indices.
131  */
132  std::vector<bool> dataIsPresent;
133 
134  /** The accelerometer and/or gyroscope measurements taken by the IMU at the
135  * given timestamp.
136  * \sa dataIsPresent, CObservation::timestamp
137  */
138  std::vector<double> rawMeasurements;
139 
140  // See base class docs
141  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override
142  {
143  out_sensorPose = sensorPose;
144  }
145  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override
146  {
147  sensorPose = newSensorPose;
148  }
149  void getDescriptionAsText(std::ostream& o) const override;
150 
151 }; // End of class def.
152 
153 } // End of namespace
154 } // End of namespace
155 
156 #endif
mrpt::obs::IMU_YAW_VEL_GLOBAL
@ IMU_YAW_VEL_GLOBAL
yaw angular velocity (global/navigation frame) (rad/sec)
Definition: CObservationIMU.h:79
mrpt::obs::IMU_X_ACC_GLOBAL
@ IMU_X_ACC_GLOBAL
x-axis acceleration (global/navigation frame) (m/sec2)
Definition: CObservationIMU.h:85
mrpt::obs::IMU_MAG_Y
@ IMU_MAG_Y
y magnetic field value (local/vehicle frame) (gauss)
Definition: CObservationIMU.h:61
mrpt::obs::CObservationIMU::rawMeasurements
std::vector< double > rawMeasurements
The accelerometer and/or gyroscope measurements taken by the IMU at the given timestamp.
Definition: CObservationIMU.h:138
mrpt::obs::IMU_ALTITUDE
@ IMU_ALTITUDE
altitude from an altimeter (meters)
Definition: CObservationIMU.h:67
mrpt::obs::IMU_Z_VEL
@ IMU_Z_VEL
z-axis velocity (global/navigation frame) (m/sec)
Definition: CObservationIMU.h:45
mrpt::obs::IMU_PITCH
@ IMU_PITCH
orientation pitch absolute value (global/navigation frame) (rad)
Definition: CObservationIMU.h:49
mrpt::obs::CObservationIMU::setSensorPose
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
Definition: CObservationIMU.h:145
mrpt::obs::IMU_MAG_X
@ IMU_MAG_X
x magnetic field value (local/vehicle frame) (gauss)
Definition: CObservationIMU.h:59
mrpt::obs::CObservationIMU::~CObservationIMU
virtual ~CObservationIMU()
Destructor.
Definition: CObservationIMU.h:124
mrpt::obs::IMU_ROLL_VEL
@ IMU_ROLL_VEL
roll angular velocity (local/vehicle frame) (rad/sec)
Definition: CObservationIMU.h:39
mrpt::obs::IMU_ROLL
@ IMU_ROLL
orientation roll absolute value (global/navigation frame) (rad)
Definition: CObservationIMU.h:51
mrpt::obs::CObservationIMU::getSensorPose
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
Definition: CObservationIMU.h:141
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::obs::IMU_PRESSURE
@ IMU_PRESSURE
air pressure (Pascals)
Definition: CObservationIMU.h:65
mrpt::obs::CObservationIMU
This class stores measurements from an Inertial Measurement Unit (IMU) (attitude estimation,...
Definition: CObservationIMU.h:108
CPose2D.h
mrpt::obs::IMU_ORI_QUAT_W
@ IMU_ORI_QUAT_W
Orientation Quaternion W (global/navigation frame)
Definition: CObservationIMU.h:77
mrpt::obs::IMU_PITCH_VEL
@ IMU_PITCH_VEL
pitch angular velocity (local/vehicle frame) (rad/sec)
Definition: CObservationIMU.h:37
mrpt::obs::IMU_Y_VEL
@ IMU_Y_VEL
y-axis velocity (global/navigation frame) (m/sec)
Definition: CObservationIMU.h:43
mrpt::obs::COUNT_IMU_DATA_FIELDS
@ COUNT_IMU_DATA_FIELDS
Definition: CObservationIMU.h:92
mrpt::obs::IMU_Z_ACC
@ IMU_Z_ACC
z-axis acceleration (local/vehicle frame) (m/sec2)
Definition: CObservationIMU.h:33
mrpt::obs::IMU_MAG_Z
@ IMU_MAG_Z
z magnetic field value (local/vehicle frame) (gauss)
Definition: CObservationIMU.h:63
mrpt::obs::IMU_ORI_QUAT_Y
@ IMU_ORI_QUAT_Y
Orientation Quaternion Y (global/navigation frame)
Definition: CObservationIMU.h:73
mrpt::obs::IMU_TEMPERATURE
@ IMU_TEMPERATURE
temperature (degrees Celsius)
Definition: CObservationIMU.h:69
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
mrpt::obs::IMU_Y
@ IMU_Y
y absolute value (global/navigation frame) (meters)
Definition: CObservationIMU.h:55
mrpt::obs::CObservationIMU::CObservationIMU
CObservationIMU()
Constructor.
Definition: CObservationIMU.h:115
mrpt::obs::IMU_Z_ACC_GLOBAL
@ IMU_Z_ACC_GLOBAL
z-axis acceleration (global/navigation frame) (m/sec2)
Definition: CObservationIMU.h:89
mrpt::obs::IMU_X_ACC
@ IMU_X_ACC
x-axis acceleration (local/vehicle frame) (m/sec2)
Definition: CObservationIMU.h:29
CMatrixD.h
mrpt::obs::IMU_ORI_QUAT_Z
@ IMU_ORI_QUAT_Z
Orientation Quaternion Z (global/navigation frame)
Definition: CObservationIMU.h:75
mrpt::obs::CObservationIMU::dataIsPresent
std::vector< bool > dataIsPresent
Each entry in this vector is true if the corresponding data index contains valid data (the IMU unit s...
Definition: CObservationIMU.h:132
CPose3D.h
mrpt::obs::IMU_Y_ACC
@ IMU_Y_ACC
y-axis acceleration (local/vehicle frame) (m/sec2)
Definition: CObservationIMU.h:31
mrpt::obs::TIMUDataIndex
TIMUDataIndex
Symbolic names for the indices of IMU data (refer to mrpt::obs::CObservationIMU)
Definition: CObservationIMU.h:26
mrpt::obs::IMU_X
@ IMU_X
x absolute value (global/navigation frame) (meters)
Definition: CObservationIMU.h:53
CObservation.h
mrpt::obs::IMU_PITCH_VEL_GLOBAL
@ IMU_PITCH_VEL_GLOBAL
pitch angular velocity (global/navigation frame) (rad/sec)
Definition: CObservationIMU.h:81
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:102
mrpt::obs::CObservationIMU::sensorPose
mrpt::poses::CPose3D sensorPose
The pose of the sensor on the robot.
Definition: CObservationIMU.h:126
mrpt::obs::CObservationIMU::getDescriptionAsText
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
Definition: CObservationIMU.cpp:97
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:43
mrpt::obs::IMU_YAW
@ IMU_YAW
orientation yaw absolute value (global/navigation frame) (rad)
Definition: CObservationIMU.h:47
mrpt::obs::IMU_ROLL_VEL_GLOBAL
@ IMU_ROLL_VEL_GLOBAL
roll angular velocity (global/navigation frame) (rad/sec)
Definition: CObservationIMU.h:83
mrpt::obs::IMU_YAW_VEL
@ IMU_YAW_VEL
yaw angular velocity (local/vehicle frame) (rad/sec)
Definition: CObservationIMU.h:35
mrpt::obs::IMU_Y_ACC_GLOBAL
@ IMU_Y_ACC_GLOBAL
y-axis acceleration (global/navigation frame) (m/sec2)
Definition: CObservationIMU.h:87
CSerializable.h
mrpt::obs::IMU_Z
@ IMU_Z
z absolute value (global/navigation frame) (meters)
Definition: CObservationIMU.h:57
mrpt::obs::IMU_ORI_QUAT_X
@ IMU_ORI_QUAT_X
Orientation Quaternion X (global/navigation frame)
Definition: CObservationIMU.h:71
mrpt::obs::IMU_X_VEL
@ IMU_X_VEL
x-axis velocity (global/navigation frame) (m/sec)
Definition: CObservationIMU.h:41



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST