Main MRPT website > C++ reference for MRPT 1.5.9
CIMUXSens_MT4.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_MT4_H
11 #define CIMUXSens_MT4_H
12 
14 #include <mrpt/poses/CPose3D.h>
15 
16 namespace mrpt
17 {
18  namespace hwdrivers
19  {
20 
21  /** A class for interfacing XSens 4th generation Inertial Measuring Units (IMUs): MTi 10-series, MTi 100-series.
22  * Usage considerations:
23  * - In Windows, you only need to install XSens drivers.
24  * - In Linux, this class requires the system libraries: libusb-1.0 & libudev (dev packages). Accessing USB devices may require
25  * running the program as super user ("sudo"). To avoid that, Or, install <code> MRPT/scripts/52-xsens.rules </code> in <code>/etc/udev/rules.d/</code> to allow access to all users.
26  *
27  * For the older 3rd generation devices, see the class mrpt::hwdrivers::CIMUXSens
28  *
29  * \code
30  * PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
31  * -------------------------------------------------------
32  * [supplied_section_name]
33  * pose_x=0 // Sensor 3D position relative to the robot (meters)
34  * pose_y=0
35  * pose_z=0
36  * pose_yaw=0 // Angles in degrees
37  * pose_pitch=0
38  * pose_roll=0
39  * sensorLabel = <label> // Label of the sensor
40  * ;sampleFreq = 100 // The requested rate of sensor packets (default: 100Hz)
41  * ; If a portname is not provided, the first found device will be opened:
42  * ;portname_LIN = USB002:005
43  * ;portname_WIN = \\?\usb#vid_2639&pid_0003#...
44  * ;baudRate = 115200 ; Baudrate for communicating, only if the port is a COM port
45  * \endcode
46  *
47  * \note Set the environment variable "MRPT_HWDRIVERS_VERBOSE" to "1" to enable diagnostic information while using this class.
48  *
49  * \ingroup mrpt_hwdrivers_grp
50  */
52  {
54  protected:
55  int m_port_bauds; //!< Baudrate, only for COM ports.
56  std::string m_portname; //!< The USB or COM port name (if blank -> autodetect)
58 
61 
63 
64  void * /*DeviceClass */ m_dev_ptr;
65  void * /*XsDeviceId */ m_devid_ptr;
66 
67  /** See the class documentation at the top for expected parameters */
68  void loadConfig_sensorSpecific(
69  const mrpt::utils::CConfigFileBase &configSource,
70  const std::string &iniSection );
71 
72  public:
73  /** Constructor
74  */
75  CIMUXSens_MT4( );
76 
77  /** Destructor
78  */
79  virtual ~CIMUXSens_MT4();
80 
81 
82  /** This method will be invoked at a minimum rate of "process_rate" (Hz)
83  * \exception This method must throw an exception with a descriptive message if some critical error is found.
84  */
85  void doProcess();
86 
87  /** Turns on the xSens device and configure it for getting orientation data */
88  void initialize();
89 
90  }; // end of class
91 
92  } // end of namespace
93 } // end of namespace
94 
95 #endif
96 
97 
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
mrpt::system::TTimeStamp m_timeStartTT
Definition: CIMUXSens_MT4.h:60
mrpt::poses::CPose3D m_sensorPose
Definition: CIMUXSens_MT4.h:62
std::string m_portname
The USB or COM port name (if blank -> autodetect)
Definition: CIMUXSens_MT4.h:56
int m_port_bauds
Baudrate, only for COM ports.
Definition: CIMUXSens_MT4.h:55
This class allows loading and storing values and vectors of different types from a configuration text...
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...
unsigned __int64 uint64_t
Definition: rptypes.h:52
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
A class for interfacing XSens 4th generation Inertial Measuring Units (IMUs): MTi 10-series...
Definition: CIMUXSens_MT4.h:51



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