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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020