This article describes how to connect an LP-RESEARCH inertial measurement unit (IMU) using a Robot Operating System (ROS) node. We are happy to announce that our IMU ROS sensor driver has been accepted into the official ROS package repository. The Robot Operating System, or ROS in short, is an open-source de-facto standard for robotics sensing and control. With the package openzen_sensor now provided as part of the ROS distribution Melodic Morenia it just became a whole lot easier to use our sensors in robotic applications.

Installation of IMU ROS Driver

All that’s needed is to install the package openzen_sensor via the distribution’s package manager. In Ubuntu, with the ROS Melodic Morenia distribution installed, use the following command:

Once the IMU ROS driver package is installed, we use the following command to start the OpenZen node:

This will automatically connect to the first available IMU and start streaming its accelerometer, gyroscope and magnetometer data to ROS. If your sensor is equipped with a GPS unit, global positioning information will also be transferred to ROS.

Once a sensor has been connected via the motion sensor driver, the data from the sensor is exported via ROS topics which can be consumed by other ROS components. This is for example a navigation and path planning system.

Published ROS Driver data topics

These are the ROS topics which get published by the OpenZen ROS driver:

Message Type Description
/imu/data sensor_msgs/Imu Inertial data from the IMU. Includes calibrated acceleration, calibrated angular rates and orientation. The orientation is always unit quaternion.
/imu/mag sensor_msgs/MagneticField Magnetometer reading from the sensor.
/imu/nav sensor_msgs/NavSatFix Global position from a satellite navigation system. Only available if the IMU includes a GNSS chip.
/imu/is_autocalibration_active std_msgs/Bool Latched topic indicating if the gyro autocalibration feature is active

Outputting IMU sensor values on the command line can now be easily done with:

and the data can be plotted with:

More information on the usage of the OpenZen IMU ROS driver can be found here.

The image above shows an angular velocity output graph in the ROS MatPlot application from an LPMS-IG1 sensor.