class mrpt::hwdrivers::CIMUXSens_MT4

Overview

Interfaces XSens 4th-generation IMUs (MTi 10-series, MTi 100-series) via the XSens MT SDK.

Communicates over USB or a serial COM port. Produces observations of type mrpt::obs::CObservationIMU containing orientation, angular velocity, linear acceleration, and optionally magnetometer data.

Requires XSens MT SDK (libxsensmt or equivalent). On Linux, the user must be in the ‘dialout’ group or install the provided udev rules.

A class for interfacing XSens 4th generation Inertial Measuring Units (IMUs): MTi 10-series, MTi 100-series. Usage considerations:

  • In Windows, you only need to install XSens drivers.

  • In Linux, this class requires the system libraries: libusb-1.0 & libudev (dev packages). Accessing USB devices may require running the program as super user (“sudo”). To avoid that, Or, install MRPT/scripts/52-xsens.rules in /etc/udev/rules.d/ to allow access to all users.

 PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
-------------------------------------------------------
  [supplied_section_name]
   pose_x=0     // Sensor 3D position relative to the robot (meters)
   pose_y=0
   pose_z=0
   pose_yaw=0   // Angles in degrees
   pose_pitch=0
   pose_roll=0
   sensorLabel = <label>   // Label of the sensor
   #sampleFreq  = 100  // The requested rate of sensor packets (default:
100Hz)
   # If a portname is not provided, the first found device will be opened:
   #portname_LIN    = USB002:005
   #portname_WIN    = \\?\usb#vid_2639&pid_0003#...
   #baudRate        = 115200   // Baudrate for communicating, only if
                            // the port is a COM port
   #deviceId     = xxxxx    // Device ID to open, or first one if empty.
   #logFile      = xxxx     // If provided, will enable XSens SDK's own log

Set the environment variable “MRPT_HWDRIVERS_VERBOSE” to “1” to enable diagnostic information while using this class.

#include <mrpt/hwdrivers/CIMUXSens_MT4.h>

class CIMUXSens_MT4: public mrpt::hwdrivers::CGenericSensor
{
public:
    // structs

    struct Impl;

    // construction

    CIMUXSens_MT4();

    // methods

    virtual void doProcess();
    virtual void initialize();
    void close();
};

Inherited Members

public:
    // methods

    CGenericSensor& operator = (const CGenericSensor&);
    virtual void doProcess() = 0;

Construction

CIMUXSens_MT4()

Default constructor.

Does not open any device.

Methods

virtual void doProcess()

Polls the IMU for new data and queues any received observations.

Called automatically at process_rate Hz by rawlog-grabber.

Parameters:

std::exception

On a critical hardware error.

virtual void initialize()

Opens the XSens device and configures it for data streaming.

Parameters:

std::exception

If the device cannot be found or initialized.

void close()

Closes the connection to the XSens device.