element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Xsens
  • Products
  • Manufacturers
  • Xsens
  • More
  • Cancel
Xsens
Blog Interfacing MTi devices with the NVIDIA Jetson
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Xsens to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: xsenssupport
  • Date Created: 7 Jan 2022 2:56 PM Date Created
  • Views 11328 views
  • Likes 1 like
  • Comments 0 comments
  • ins
  • xsens
  • inertial sensors
  • jetson
  • imu
  • mti-100
  • nvidia
  • mti 1-series module
  • mti-600 series
Related
Recommended

Interfacing MTi devices with the NVIDIA Jetson

xsenssupport
xsenssupport
7 Jan 2022

The NVIDIA Jetson edge AI platform is widely used for the development of autonomous machines and robotics. In this article we will explain how to connect your Xsens MTi device to the NVIDIA Jetson hardware, and how to easily communicate with it by using our MT Software Development Kit (MT SDK).

NVIDIA Jetson Developer Kits run on ARM Cortex CPUs, which means that they are not compatible with the regular Xsens Device API. Fortunately, Xsens has made a large part of the API open source, allowing users to develop applications for ARM-based platforms as well. Xsens provides C++ example codes as well as a ROS driver that make use of this open source API.

We have used the Jetson Nano Developer Kit for this article, but the guidelines can also be used for other Jetson hardware. Xsens has tested the following motion trackers with the Jetson Nano:

  • MTi 1-series Development Kit (USB, UART)
  • MTi 600-series Development Kit (USB, UART)
  • MTi 10-series (USB)
  • MTi 100-series (USB)

 

Setup

Start by downloading the latest MT Software Suite for Linux from our website and unpack the .tar.gz package at your desired location. Then, install the MT SDK:

sudo ./mtsdk_linux-xxx_xxxx.x.x.sh
 

This article will cover two hardware interfaces of the Jetson Developer Kit: USB and TTL UART. If possible, we recommend using USB as a starting point, to verify that your hardware and software can detect and communicate with external sensors. Simply connect your MTi to one of the USB ports of the Jetson Developer Kit using the USB cable included in your Development Kit.

 

1. C++ example codes

Inside the MT SDK you will find an examples folder. Open it and navigate to the xda_public_cpp folder. You will find two example codes:

  • example_mti_receive_data: Scans for, and connects with MTi devices, configures their outputs, and prints/logs the received data.
  • example_mti_parse_logfile: Opens a .mtb log file and parses its contents.

In this folder, open a terminal and build the example codes:

sudo make
Note: If you are using the MTi 10-series or MTi 100-series with a direct USB cable, make sure to have libusb installed, and build the examples using:
sudo make HAVE_LIBUSB=1
You should end up with two executable files, one for each example code. Upon executing example_mti_receive_data your connected MTi should be detected automatically. We refer to the Troubleshooting section of this article if the MTi is not detected.

 

2. ROS driver

Inside the MT SDK you will find the xsens_ros_mti_driver. Simply follow the README.txt file inside this folder or our guidelines at http://wiki.ros.org/xsens_mti_driver to install and launch the ROS driver. Your MTi should be detected automatically, and a variety of data topics are available to subscribe to. We refer to the Troubleshooting section at the end of this article if the MTi is not detected.

Note: the ROS driver publishes data, but unlike the C++ example code, it does not actually configure the outputs of the MTi. Use the C++ example code or a PC with our GUI MT Manager to configure the MTi such that it outputs the data that are required for your application.

 

Serial hardware interfaces

Next to the plug-and-play USB interface, Jetson Developer Kit offer various other interfaces that allow you to communicate with MTi devices. In the case of the Jetson Nano, we used a UART interface that is accessible via the J41 header, pins 8 (TxD) and 10 (RxD). We also used the 3V3/5V and GND pins on that same header to power the MTi.

Note: The UART interface of an MTi 1-series Development Board will be disabled when the board is powered at 5V. Use the 3.3V output of the Jetson Developer Kit instead.

image

In Ubuntu, this UART port will show up as /dev/ttyTHS1. By default, the ROS driver and C++ example code do not scan this location. Fortunately, it is easy to modify the source code such that it scans for your specific location:

Open example_mti_receive_data.cpp (in case of the C++ example code) or xsens_ros_mti_driver/src/xdainterface.cpp (in case of the ROS driver) and replace the following lines:

XsPortInfoArray portInfoArray = XsScanner::scanPorts();
XsPortInfo mtPort;
for (auto const &portInfo : portInfoArray)
{
    if (portInfo.deviceId().isMti() || portInfo.deviceId().isMtig())
    {
        mtPort = portInfo;
        break;
    }
}

with

XsPortInfo mtPort = XsScanner::scanPort("/dev/ttyTHS1",XBR_230k4);
...where in this case we scan "/dev/ttyTHS1" for an MTi device that is configured at a baud rate of 230400 bps.

 

Alternatively, the ROS driver also allows you to configure the desired port and baud rate manually without modifying the source code. To do so, uncomment and modify the following lines in the file xsens_mti_node.yaml, located at xsens_ros_mti_driver/param:

# port: '/dev/ttyUSB0'
# baudrate: 921600
 

You should now be able to detect and access the MTi via the UART interface.

 

Troubleshooting

  • “No MTi device found.” or “Could not open port.”
    • Ensure that you have the rights to access the port of the MTi (e.g. /dev/ttyUSB0). If you are using the C++ example code, you can check this by executing the code with sudo. Possibly you are not in the right group to access the port of the MTi. See MTSDK.README, located in your MT SDK folder, for further guidelines on changing group access permissions.
    • If you are using the MTi 10-series or MTi 100-series with a direct USB cable, make sure to have libusb installed, and build your code as:
      sudo make HAVE_LIBUSB=1
      
    • If you are using a robust MTi 600-series with a USB dongle, make sure to have the relevant drivers installed.
    • If you are not using the USB port or if you are using a custom serial-to-USB converter, try specifying the exact port and baud rate at which your MTi is communicating. See paragraph Serial hardware interfaces of this article.
  • My USB-connected MTi does not show up as /dev/ttyUSB#.
    • If you are using the MTi 10-series or MTi 100-series with a direct USB cable, then it is not necessary for the MTi to show up as /dev/ttyUSB#. Make sure to have libusb installed, and build your code as:
      sudo make HAVE_LIBUSB=1
      
      The MTi should now be recognized whenever you launch the ROS driver or C++ example code.
      If you do require the device to show up as /dev/ttyUSB#, recompiling the kernel module or reinstalling the USB driver can help. This is typically seen with AGX/TX1/TX2 platforms:
      • https://github.com/xsens/xsens_mti_ros_node/issues/53
      • https://forums.developer.nvidia.com/t/tx2-and-xsens-imu-through-micro-usb-adapter/49583/5
      • https://forums.developer.nvidia.com/t/xavier-cannot-recognize-xsens-solved/66673/16
      • https://xsenstechnologies.force.com/knowledgebase/s/question/0D52o0000BI1JERCQ3/mti300-interfacing-with-nvidia-tx1-platform-kernel-31096
  • The data I am receiving never reaches the expected data output rate (e.g. 400 Hz).
    • We have noticed that the ROS node can cause a high CPU load, leading to lower data output rates. This issue has been fixed in ROS nodes available in MTSS2019.3.2 and later. We recommend migrating to the latest version.
    • If you have connected the MTi via the USB interface, we recommend enabling the low latency mode using setserial:
      • Install setserial if not already installed
      • Enable low latency mode:
setserial [/path/to/xsens/port] low_latency
  • Check the output rate of the published topics, e.g:
rostopic hz imu/data
  • Note that the low_latency mode is lost after rebooting, so you will probably need to create a udev rule for this.
  • Error "Skipping incompatible xxx when searching for xxx" after catkin_make.
    • Try inserting the following at the end of your CMakeLists.txt:
      add_custom_COMMAND(TARGET xsens_mti_node
      PRE_BUILD COMMAND $(MAKE) --always-make -j 1 -C
      ${CMAKE_CURRENT_SOURCE_DIR}/lib/xspublic
      )


Still facing challenges? Don’t hesitate to contact our Product Specialists for further support.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube