Main MRPT website > C++ reference for MRPT 1.4.0
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-2016, 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
16namespace 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
59 uint64_t m_timeStartUI;
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 */
69 const mrpt::utils::CConfigFileBase &configSource,
70 const std::string &iniSection );
71
72 public:
73 /** Constructor
74 */
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
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
A class for interfacing XSens 4th generation Inertial Measuring Units (IMUs): MTi 10-series,...
Definition: CIMUXSens_MT4.h:52
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
void loadConfig_sensorSpecific(const mrpt::utils::CConfigFileBase &configSource, const std::string &iniSection)
See the class documentation at the top for expected parameters.
std::string m_portname
The USB or COM port name (if blank -> autodetect)
Definition: CIMUXSens_MT4.h:56
mrpt::poses::CPose3D m_sensorPose
Definition: CIMUXSens_MT4.h:62
int m_port_bauds
Baudrate, only for COM ports.
Definition: CIMUXSens_MT4.h:55
virtual ~CIMUXSens_MT4()
Destructor.
mrpt::system::TTimeStamp m_timeStartTT
Definition: CIMUXSens_MT4.h:60
void initialize()
Turns on the xSens device and configure it for getting orientation data.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:73
This class allows loading and storing values and vectors of different types from a configuration text...
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
Definition: datetime.h:30
#define HWDRIVERS_IMPEXP
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.9.5 for MRPT 1.4.0 SVN: at Mon Dec 26 04:51:47 UTC 2022