Main MRPT website > C++ reference for MRPT 1.9.9
CIMUIntersense.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-2017, 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 
10 #ifndef CIMUIntersense_H
11 #define CIMUIntersense_H
12 
14 #include <mrpt/comms/CSerialPort.h>
15 #include <mrpt/poses/CPose3D.h>
16 
17 namespace mrpt
18 {
19 namespace hwdrivers
20 {
21 // clang-format off
22 /** A class for interfacing Intersense Inertial Measuring Units (IMUs).
23  * It connects to a InterSense inertiaCube 3 sensor and records inertial data.
24  * NOTE: This device provides:
25  * - Euler angles,
26  * - 2 angular velocties (body-frame and navigation-frame)
27  * - X,Y,Z velocity
28  * - 2 accelerations (body-frame and navigation-frame)
29  *
30  * In order to record all this information within the 'rawMeasurements'
31  *vector
32  *in mrpt::obs::CObservationIMU, some of it had to be stored in positions which
33  *weren't intended for the stored data (marked with *):
34  * - Euler angles --> rawMeasurements[IMU_YAW], rawMeasurements[IMU_PITCH],
35  *rawMeasurements[IMU_ROLL]
36  * - Body-frame angular velocity --> rawMeasurements[IMU_YAW_VEL],
37  *rawMeasurements[IMU_PITCH_VEL], rawMeasurements[IMU_ROLL_VEL]
38  * - * Nav-frame angular velocity --> rawMeasurements[IMU_MAG_X],
39  *rawMeasurements[IMU_MAG_Y], rawMeasurements[IMU_MAG_Z]
40  * - XYZ velocity --> rawMeasurements[IMU_X_VEL],
41  *rawMeasurements[IMU_Y_VEL],
42  *rawMeasurements[IMU_Z_VEL]
43  * - Body-frame acceleration --> rawMeasurements[IMU_X_ACC],
44  *rawMeasurements[IMU_Y_ACC], rawMeasurements[IMU_Z_ACC]
45  * - * Nav-frame acceleration --> rawMeasurements[IMU_X],
46  *rawMeasurements[IMU_Y], rawMeasurements[IMU_Z]
47  * Be careful with this when using the grabbed mrpt::obs::CObservationIMU
48  *data.
49  *
50  * See also the application "rawlog-grabber" for a ready-to-use application to
51  *gather data from this sensor.
52  *
53  * \code
54  * PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
55  * -------------------------------------------------------
56  * [supplied_section_name]
57  * driver = CIMUIntersense
58  * sensorLabel = <label> ; Label of the sensor
59  * pose_x = 0 ; [double] Sensor 3D position relative to the robot (meters)
60  * pose_y = 0
61  * pose_z = 0
62  * pose_yaw = 0 ; [double] Angles in degrees
63  * pose_pitch = 0
64  * pose_roll = 0
65  *
66  * sensitivity = 10 ; [int] Sensor sensitivity (see API documentation)
67  * enhancement = 2 ; [int] Enhancement mode (see API documentation)
68  * prediction = 0 ; [int] Prediction mode (see API documentation)
69  * useBuffer = 0 ; [bool] {0,1} (unused by now) Whether or not use a buffer for storing old data (see API documentation)
70  *
71  * \endcode
72  * \note Class introduced in MRPT 1.3.1
73  * \ingroup mrpt_hwdrivers_grp
74  */ // clang-format
76 {
78  protected:
79  /** Opaque pointer to specifid iSense IMU structure */
80  void* /* ISD_TRACKER_HANDLE* */ m_handles_ptr;
81 
82  /** Timestamp management */
85 
88 
89  /* Configurable parameters */
94 
95  /** Timeout counter (for internal use only) */
96  unsigned int m_toutCounter;
97 
98  /** See the class documentation at the top for expected parameters */
100  const mrpt::utils::CConfigFileBase& configSource,
101  const std::string& iniSection);
102 
103  public:
104  /** Constructor
105  */
106  CIMUIntersense();
107 
108  /** Destructor
109  */
110  virtual ~CIMUIntersense();
111 
112  /** This method will be invoked at a minimum rate of "process_rate" (Hz)
113  * \exception This method must throw an exception with a descriptive
114  * message if some critical error is found.
115  */
116  void doProcess();
117 
118  /** Turns on the iSense device and configure it for getting orientation data
119  */
120  void initialize();
121 
122 }; // end of class
123 
124 } // end of namespace
125 } // end of namespace
126 
127 #endif
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
Definition: datetime.h:32
unsigned int m_toutCounter
Timeout counter (for internal use only)
A class for interfacing Intersense Inertial Measuring Units (IMUs).
This class allows loading and storing values and vectors of different types from a configuration text...
mrpt::poses::CPose3D m_sensorPose
void initialize()
Turns on the iSense device and configure it for getting orientation data.
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
GLsizei const GLchar ** string
Definition: glext.h:4101
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void loadConfig_sensorSpecific(const mrpt::utils::CConfigFileBase &configSource, const std::string &iniSection)
See the class documentation at the top for expected parameters.
virtual ~CIMUIntersense()
Destructor.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
void * m_handles_ptr
Opaque pointer to specifid iSense IMU structure.
mrpt::system::TTimeStamp m_timeStartTT
unsigned __int32 uint32_t
Definition: rptypes.h:47
uint32_t m_timeStartUI
Timestamp management.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019