/xsensmt-yarp-driver

YARP Device Driver for XSens MT* devices based on the MT Software Suite.

Primary LanguageC++GNU Lesser General Public License v3.0LGPL-3.0

xsensmt-yarp-driver

YARP Device Driver for XSens MT* devices based on the MT Software Suite.

Rationale

This repository contains the xsensmt YARP Device Driver (see YARP documentation on devices ) that expose any Xsens-based IMU that work with the Xsens MT Software Suite as a C++ class with the IGenericSensor interface. There is currently no precisly defined format to expose IMU devices in YARP (see robotology/yarp#802), and so this devices tries to match as much as possible the behaviour of the xsensmtx device, contained in the icub-main repository.

Installation

Dependencies
Step-by-step installation
  • Install YARP on your platform, following the instructions on YARP documentation.
  • Compile the code in this repository using CMake and your preferred compiler. See YARP documentation on how to compile a CMake project.
  • Install the project. You can specify the installation directory prefix using the CMAKE_INSTALL_PREFIX CMake option.
  • Add ${CMAKE_INSTALL_PREFIX}/share/yarp (where ${CMAKE_INSTALL_PREFIX} needs to be substituted to the directory that you choose as the CMAKE_INSTALL_PREFIX) to your YARP_DATA_DIRS enviromental variable (for more on the YARP_DATA_DIRS env variable, see YARP documentation on data directories ).
  • Once you do that, you should be able to find the xsensmt device compiled by this repo using the command yarp plugin xsensmt, which should have an output similar to:
Yes, this is a YARP plugin
  * library:        CMAKE_INSTALL_PREFIX/lib/yarp/xsensmt.so
  * system version: 5
  * class name:     yarp::dev::XsensMT
  * base class:     yarp::dev::DeviceDriver

If this is not the case, there could be some problems in finding the plugin. In that case, just move yourself to the ${CMAKE_INSTALL_PREFIX}/share/yarp directory and launch the device from there.

Device use

To launch the xsensmt device, you can connect the Xsens IMU (for example the MTI-300) to your Linux computer and the default configuration parameters should be sufficient to work fine. To do so, launch the yarpserver, then on a terminal launch the device:

yarpdev --device inertial --subdevice xsensmt

This should open a YARP port /inertial , that you can read from the command line for example using the yarp read command:

yarp read ... /inertial

If you need to change the configuration parameters, check the device documentation in https://github.com/loc2/xsensmt-yarp-driver/blob/master/xsensmt/XsensMT.h#L41 .