How to Connect an LP-Research IMU to ROS (UPDATE)

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:
1 |
apt install ros-melodic-openzen-sensor |
Once the IMU ROS driver package is installed, we use the following command to start the OpenZen node:
1 |
rosrun openzen_sensor openzen_sensor_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:
1 |
rostopic <span class="nb">echo</span> /imu/data |
and the data can be plotted with:
1 |
rosrun rqt_plot rqt_plot /imu/data/linear_acceleration |
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.