[Documentation] [TitleIndex] [WordIndex

Note: This tutorial assumes that you have completed the previous tutorials: ROS tutorials.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

How to Use Inertial-Link IMUs with the imu_node

Description: This tutorial is an introduction to using the MicroStrain Inertial-Link IMU connected to a desktop. After reading the tutorial, you should be able to bring up the imu_node and display the IMU data.

Keywords: IMU, driver

Tutorial Level: BEGINNER


Start by getting the dependencies and compiling the driver.

$ rosdep install microstrain_3dmgx2_imu
$ rosmake microstrain_3dmgx2_imu

Powered On and Plugged In

Make sure that your USB imu is plugged in and the power light is on.

Configuring the IMU

Make sure that the imu_node will be able to access the imu.

Start by listing the permissions of the IMU:

ls -l /dev/ttyUSB0

You will see something similar to:

If XX is rw: the usb device is configured properly.

If XX is --: the usb device is no configured properly and you need to:

sudo chmod a+rw /dev/ttyUSB0

Starting a roscore

For the imu_node to work properly, a ros core must be running. In a new terminal:

$ roscore

Running the imu_node

In a new terminal, run the imu_node:

$ rosrun microstrain_3dmgx2_imu imu_node

You will see something similar to:

Note: If your IMU is at a port other than /dev/ttyUSB0, you could explicitly specify the port parameter, for example:

$ rosrun microstrain_3dmgx2_imu imu_node _port:=/dev/ttyUSB1

Viewing the data

To see that everything is working and data is being published to ros, in a new terminal:

$ rostopic echo imu/data

You will see something similar to:

Move the IMU around to see the data change.

Note that the covariances have been set to values consistent with the manufacturer datasheet. These covariances are very pessimistic and you will most likely be able to use smaller values in your application.

2019-12-07 12:49