Main MRPT website > C++ reference for MRPT 1.5.7
CIMUXSens.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 CIMUXSens_H
11 #define CIMUXSens_H
12 
13 
16 
17 #include <mrpt/poses/CPose3D.h>
18 
19 namespace mrpt
20 {
21  namespace hwdrivers
22  {
23 
24  /** A class for interfacing XSens 3rd generation Inertial Measuring Units (IMUs), the "XSens MTi" model.
25  * It uses a serial port or USB-to-serial adapter to communicate to the device, so no special drivers are needed.
26  * For the more recent 4th generation devices, see the class mrpt::hwdrivers::CIMUXSens_MT4
27  *
28  * See also the application "rawlog-grabber" for a ready-to-use application to gather data from the scanner.
29  *
30  * \code
31  * PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
32  * -------------------------------------------------------
33  * [supplied_section_name]
34  * pose_x=0 ; Sensor 3D position relative to the robot (meters)
35  * pose_y=0
36  * pose_z=0
37  * pose_yaw=0 ; Angles in degrees
38  * pose_pitch=0
39  * pose_roll=0
40  * sensorLabel = <label> ; Label of the sensor
41  * COM_port_LIN = /dev/ttyUSB0 ; COM PORT in LINUX (optional. If not provided, the system will search the connected port)
42  * COM_port_WIN = COM1 ; COM PORT in Windows (optional. If not provided, the system will search the connected port)
43  * baudRate ; Baudrate for communicating with the COM port (mandatory for Linux)
44  * (for Windows, if COM_port_WIN is not provided, this value is ignored)
45  * \endcode
46  * \ingroup mrpt_hwdrivers_grp
47  */
49  {
51  protected:
52 
53  /** This serial port will be attempted to be opened automatically when this class is first used to request data from the device.
54  * \sa hwdrivers::CSerialPort
55  */
60 
62 
63  /** Search the port where the sensor is located and connect to it
64  */
65  bool searchPortAndConnect();
66 
67  //CSerialPort m_serial_port; //!< The serial port connection
68 
69  void * /*xsens::Cmt3 */ m_cmt3_ptr;
70  void * /*CmtDeviceId */ m_deviceId_ptr;
71  unsigned int m_toutCounter; //!< Timeout counter (for internal use only)
72 
73  /** See the class documentation at the top for expected parameters */
74  void loadConfig_sensorSpecific(
75  const mrpt::utils::CConfigFileBase &configSource,
76  const std::string &iniSection );
77 
78  public:
79  /** Constructor
80  */
81  CIMUXSens( );
82 
83  /** Destructor
84  */
85  virtual ~CIMUXSens();
86 
87 
88  /** This method will be invoked at a minimum rate of "process_rate" (Hz)
89  * \exception This method must throw an exception with a descriptive message if some critical error is found.
90  */
91  void doProcess();
92 
93  /** Turns on the xSens device and configure it for getting orientation data */
94  void initialize();
95 
96  }; // end of class
97 
98  } // end of namespace
99 } // end of namespace
100 
101 #endif
102 
103 
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
A class for interfacing XSens 3rd generation Inertial Measuring Units (IMUs), the "XSens MTi" model...
Definition: CIMUXSens.h:48
mrpt::system::TTimeStamp m_timeStartTT
Definition: CIMUXSens.h:59
This class allows loading and storing values and vectors of different types from a configuration text...
GLsizei const GLchar ** string
Definition: glext.h:3919
mrpt::poses::CPose3D m_sensorPose
Definition: CIMUXSens.h:61
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
int m_COMbauds
This serial port will be attempted to be opened automatically when this class is first used to reques...
Definition: CIMUXSens.h:56
unsigned __int64 uint64_t
Definition: rptypes.h:52
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned int m_toutCounter
Timeout counter (for internal use only)
Definition: CIMUXSens.h:71
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:72



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 8277875f6 Mon Jun 11 02:47:32 2018 +0200 at lun oct 28 01:50:49 CET 2019