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::obs
19 {
20 /** Symbolic names for the indices of IMU data (refer to
21  * mrpt::obs::CObservationIMU)
22  * \ingroup mrpt_obs_grp
23  */
25 {
26  /** x-axis acceleration (local/vehicle frame) (m/sec<sup>2</sup>) */
27  IMU_X_ACC = 0,
28  /** y-axis acceleration (local/vehicle frame) (m/sec<sup>2</sup>) */
30  /** z-axis acceleration (local/vehicle frame) (m/sec<sup>2</sup>) */
32  /** yaw angular velocity (local/vehicle frame) (rad/sec) */
34  /** pitch angular velocity (local/vehicle frame) (rad/sec) */
36  /** roll angular velocity (local/vehicle frame) (rad/sec) */
38  /** x-axis velocity (global/navigation frame) (m/sec) */
40  /** y-axis velocity (global/navigation frame) (m/sec) */
42  /** z-axis velocity (global/navigation frame) (m/sec) */
44  /** orientation yaw absolute value (global/navigation frame) (rad) */
46  /** orientation pitch absolute value (global/navigation frame) (rad) */
48  /** orientation roll absolute value (global/navigation frame) (rad) */
50  /** x absolute value (global/navigation frame) (meters) */
52  /** y absolute value (global/navigation frame) (meters) */
54  /** z absolute value (global/navigation frame) (meters) */
56  /** x magnetic field value (local/vehicle frame) (gauss) */
58  /** y magnetic field value (local/vehicle frame) (gauss) */
60  /** z magnetic field value (local/vehicle frame) (gauss) */
62  /** air pressure (Pascals) */
64  /** altitude from an altimeter (meters) */
66  /** temperature (degrees Celsius) */
68  /** Orientation Quaternion X (global/navigation frame) */
70  /** Orientation Quaternion Y (global/navigation frame) */
72  /** Orientation Quaternion Z (global/navigation frame) */
74  /** Orientation Quaternion W (global/navigation frame) */
76  /** yaw angular velocity (global/navigation frame) (rad/sec) */
78  /** pitch angular velocity (global/navigation frame) (rad/sec) */
80  /** roll angular velocity (global/navigation frame) (rad/sec) */
82  /** x-axis acceleration (global/navigation frame) (m/sec<sup>2</sup>) */
84  /** y-axis acceleration (global/navigation frame) (m/sec<sup>2</sup>) */
86  /** z-axis acceleration (global/navigation frame) (m/sec<sup>2</sup>) */
88 
89  // Always leave this last value to reflect the number of enum values
91 };
92 
93 /** This class stores measurements from an Inertial Measurement Unit (IMU)
94  * (attitude estimation, raw gyroscope and accelerometer values), altimeters or
95  * magnetometers.
96  *
97  * The order of the values in each entry of
98  * mrpt::obs::CObservationIMU::rawMeasurements is defined as symbolic names in
99  * the enum mrpt::obs::TIMUDataIndex.
100  * Check it out also for reference on the unit and the coordinate frame used
101  * for each value.
102  *
103  * \sa CObservation
104  * \ingroup mrpt_obs_grp
105  */
107 {
109 
110  public:
111  /** Constructor.
112  */
114  : sensorPose(),
117  {
118  }
119 
120  /** Destructor
121  */
122  virtual ~CObservationIMU() {}
123  /** The pose of the sensor on the robot. */
125 
126  /** Each entry in this vector is true if the corresponding data index
127  * contains valid data (the IMU unit supplies that kind of data).
128  * See the top of this page for the meaning of the indices.
129  */
130  std::vector<bool> dataIsPresent;
131 
132  /** The accelerometer and/or gyroscope measurements taken by the IMU at the
133  * given timestamp.
134  * \sa dataIsPresent, CObservation::timestamp
135  */
136  std::vector<double> rawMeasurements;
137 
138  // See base class docs
139  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override
140  {
141  out_sensorPose = sensorPose;
142  }
143  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override
144  {
145  sensorPose = newSensorPose;
146  }
147  void getDescriptionAsText(std::ostream& o) const override;
148 
149 }; // End of class def.
150 
151 }
152 #endif
153 
154 
x-axis acceleration (global/navigation frame) (m/sec2)
z-axis acceleration (global/navigation frame) (m/sec2)
yaw angular velocity (global/navigation frame) (rad/sec)
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
std::vector< bool > dataIsPresent
Each entry in this vector is true if the corresponding data index contains valid data (the IMU unit s...
std::vector< double > rawMeasurements
The accelerometer and/or gyroscope measurements taken by the IMU at the given timestamp.
orientation pitch absolute value (global/navigation frame) (rad)
temperature (degrees Celsius)
x magnetic field value (local/vehicle frame) (gauss)
y-axis acceleration (local/vehicle frame) (m/sec2)
Orientation Quaternion X (global/navigation frame)
This class stores measurements from an Inertial Measurement Unit (IMU) (attitude estimation, raw gyroscope and accelerometer values), altimeters or magnetometers.
z-axis acceleration (local/vehicle frame) (m/sec2)
x-axis velocity (global/navigation frame) (m/sec)
virtual ~CObservationIMU()
Destructor.
roll angular velocity (global/navigation frame) (rad/sec)
pitch angular velocity (local/vehicle frame) (rad/sec)
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
This namespace contains representation of robot actions and observations.
pitch angular velocity (global/navigation frame) (rad/sec)
Orientation Quaternion Y (global/navigation frame)
Orientation Quaternion Z (global/navigation frame)
z magnetic field value (local/vehicle frame) (gauss)
Orientation Quaternion W (global/navigation frame)
y absolute value (global/navigation frame) (meters)
y magnetic field value (local/vehicle frame) (gauss)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
mrpt::poses::CPose3D sensorPose
The pose of the sensor on the robot.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:86
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
y-axis acceleration (global/navigation frame) (m/sec2)
air pressure (Pascals)
z absolute value (global/navigation frame) (meters)
TIMUDataIndex
Symbolic names for the indices of IMU data (refer to mrpt::obs::CObservationIMU)
orientation yaw absolute value (global/navigation frame) (rad)
y-axis velocity (global/navigation frame) (m/sec)
orientation roll absolute value (global/navigation frame) (rad)
yaw angular velocity (local/vehicle frame) (rad/sec)
x absolute value (global/navigation frame) (meters)
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
roll angular velocity (local/vehicle frame) (rad/sec)
x-axis acceleration (local/vehicle frame) (m/sec2)
z-axis velocity (global/navigation frame) (m/sec)
altitude from an altimeter (meters)



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020