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-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 
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::config::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
mrpt::hwdrivers::CIMUIntersense::m_sensitivity
uint32_t m_sensitivity
Definition: CIMUIntersense.h:90
CSerialPort.h
mrpt::hwdrivers::CIMUIntersense::m_sensorPose
mrpt::poses::CPose3D m_sensorPose
Definition: CIMUIntersense.h:86
mrpt::hwdrivers::CIMUIntersense
A class for interfacing Intersense Inertial Measuring Units (IMUs).
Definition: CIMUIntersense.h:75
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
DEFINE_GENERIC_SENSOR
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
Definition: CGenericSensor.h:314
mrpt::hwdrivers::CIMUIntersense::m_nSensors
int m_nSensors
Definition: CIMUIntersense.h:87
mrpt::system::TTimeStamp
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
Definition: datetime.h:31
mrpt::hwdrivers::CIMUIntersense::~CIMUIntersense
virtual ~CIMUIntersense()
Destructor.
Definition: CIMUIntersense.cpp:70
mrpt::config::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: config/CConfigFileBase.h:44
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
CGenericSensor.h
mrpt::hwdrivers::CIMUIntersense::m_useBuffer
bool m_useBuffer
Definition: CIMUIntersense.h:93
mrpt::hwdrivers::CIMUIntersense::initialize
void initialize()
Turns on the iSense device and configure it for getting orientation data.
Definition: CIMUIntersense.cpp:229
mrpt::hwdrivers::CIMUIntersense::doProcess
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
Definition: CIMUIntersense.cpp:82
mrpt::hwdrivers::CGenericSensor
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
Definition: CGenericSensor.h:70
mrpt::hwdrivers::CIMUIntersense::m_enhancement
uint32_t m_enhancement
Definition: CIMUIntersense.h:91
CPose3D.h
mrpt::hwdrivers::CIMUIntersense::loadConfig_sensorSpecific
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection)
See the class documentation at the top for expected parameters.
Definition: CIMUIntersense.cpp:321
mrpt::hwdrivers::CIMUIntersense::m_timeStartUI
uint32_t m_timeStartUI
Timestamp management.
Definition: CIMUIntersense.h:83
string
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::hwdrivers::CIMUIntersense::m_prediction
uint32_t m_prediction
Definition: CIMUIntersense.h:92
mrpt::hwdrivers::CIMUIntersense::m_toutCounter
unsigned int m_toutCounter
Timeout counter (for internal use only)
Definition: CIMUIntersense.h:96
mrpt::hwdrivers::CIMUIntersense::m_timeStartTT
mrpt::system::TTimeStamp m_timeStartTT
Definition: CIMUIntersense.h:84
mrpt::hwdrivers::CIMUIntersense::m_handles_ptr
void * m_handles_ptr
Opaque pointer to specifid iSense IMU structure.
Definition: CIMUIntersense.h:80
mrpt::hwdrivers::CIMUIntersense::CIMUIntersense
CIMUIntersense()
Constructor.
Definition: CIMUIntersense.cpp:43
uint32_t
unsigned __int32 uint32_t
Definition: rptypes.h:47



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