Main MRPT website > C++ reference for MRPT 1.4.0
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 */
73  uint32_t m_timeStartUI;
75 
78 
79  /* Configurable parameters */
80  uint32_t m_sensitivity;
81  uint32_t m_enhancement;
82  uint32_t m_prediction;
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 
mrpt::hwdrivers::CIMUIntersense::m_sensitivity
uint32_t m_sensitivity
Definition: CIMUIntersense.h:80
CSerialPort.h
mrpt::hwdrivers::CIMUIntersense::m_sensorPose
mrpt::poses::CPose3D m_sensorPose
Definition: CIMUIntersense.h:76
mrpt::hwdrivers::CIMUIntersense
A class for interfacing Intersense Inertial Measuring Units (IMUs).
Definition: CIMUIntersense.h:64
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CParticleFilter.h:16
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:251
mrpt::hwdrivers::CIMUIntersense::m_nSensors
int m_nSensors
Definition: CIMUIntersense.h:77
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:30
mrpt::utils::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: CConfigFileBase.h:30
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:72
CGenericSensor.h
mrpt::hwdrivers::CIMUIntersense::m_useBuffer
bool m_useBuffer
Definition: CIMUIntersense.h:83
mrpt::hwdrivers::CGenericSensor
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
Definition: CGenericSensor.h:63
mrpt::hwdrivers::CIMUIntersense::m_enhancement
uint32_t m_enhancement
Definition: CIMUIntersense.h:81
CPose3D.h
mrpt::hwdrivers::CIMUIntersense::m_timeStartUI
uint32_t m_timeStartUI
Timestamp management.
Definition: CIMUIntersense.h:73
mrpt::hwdrivers::CIMUIntersense::m_prediction
uint32_t m_prediction
Definition: CIMUIntersense.h:82
mrpt::hwdrivers::CIMUIntersense::m_toutCounter
unsigned int m_toutCounter
Timeout counter (for internal use only)
Definition: CIMUIntersense.h:85
mrpt::hwdrivers::CIMUIntersense::m_timeStartTT
mrpt::system::TTimeStamp m_timeStartTT
Definition: CIMUIntersense.h:74
HWDRIVERS_IMPEXP
#define HWDRIVERS_IMPEXP
Definition: hwdrivers_impexp.h:82
mrpt::hwdrivers::CIMUIntersense::m_handles_ptr
void * m_handles_ptr
Opaque pointer to specifid iSense IMU structure.
Definition: CIMUIntersense.h:70



Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 23:11:08 UTC 2019