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



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020