MicroStrain (INS, IMU, VRU, AHRS)
MicroStrain by HBK provides high-performance inertial sensors engineered for reliability and precision in challenging environments. Widely used across industries like aerospace, robotics, industrial automation, and research, MicroStrain sensors are optimized for real-time, accurate motion tracking and orientation data.
The driver currently supports the following hardware:
MicroStrain CV7-AR
: Inertial Measurement Unit (IMU) and Vertical Reference Unit (VRU)MicroStrain CV7-AHRS
: Inertial Measurement Unit (IMU) and Attitude Heading Reference System (AHRS)MicroStrain CV7-INS
: Inertial Measurement Unit (IMU) and Inertial Navigation System (INS).MicroStrain CV7-GNSS/INS
: Inertial Measurement Unit (IMU) and Inertial Navigation System (INS) combined with dual multiband (GNSS) receivers.
PX4 can use these sensors to provide raw IMU data for EKF2 or to replace EKF2 as an external INS. For more information, including user manuals and datasheets, please refer to the sensors product page.
Where to Buy
MicroStrain sensors can be purchased through HBK's official MicroStrain product page or through authorized distributors globally. For large orders, custom requirements, or technical inquiries, reach out directly to sales
Hardware Setup
Wiring
Connect the main UART port of the MicroStrain sensor to any unused serial port on the flight controller. This port needs to be specified while starting the device.
Mounting
The MicroStrain sensor can be mounted in any orientation. The default coordinate system uses X for the front, Y for the right, and Z for down, with directions marked on the device.
Firmware Configuration
PX4 Configuration
To use the MicroStrain driver:
Include the module in firmware in the kconfig board configuration by setting the kconfig variables:
CONFIG_DRIVERS_INS_MICROSTRAIN
orCONFIG_COMMON_INS
.Configure the driver mode by setting MS_MODE
To use the MicroStrain sensor to provide raw IMU data to EKF2
Set MS_MODE to 0
Update the EKF2_MULTI_IMU parameter to account for the added MicroStrain sensor.
Enable EKF2 by setting EKF2_EN to 1
To prioritize MicroStrain sensor output, adjust the priority level of individual sensors from 0-100 using the following parameters:
where
n
corresponds to the index of the corresponding sensor.TIP
Sensors can be identified by their device id, which can be found by checking the parameters:
To use the MicroStrain sensor as an external INS
Reboot and start the driver
microstrain start -d <port>
- To start the driver automatically when the flight controller powers on, set SENS_MS_CFG to the sensor’s connected port.
MicroStrain Configuration
Rates:
By default, accel and gyro data are published at 500 Hz, magnetometer at 50 Hz, and barometric pressure at 50 Hz. This can be changed by adjusting the following parameters:
Global position, local position, attitude and odometry will be published at 250 Hz by default. This can be configured via:
For the CV7-GNSS/INS, the GNSS receiver 1 and 2 will publish data at 5Hz by default. This can be changed using:
The driver will automatically configure data outputs based on the specific sensor model and available data streams.
The driver is scheduled to run at twice the fastest configured data rate.
Aiding measurements:
If supported, GNSS position and velocity aiding are always enabled.
Internal/external magnetometer and heading aiding, as well as optical flow aiding, are disabled by default. They can be enabled using the following parameters:
The aiding frames for external sources can be configured using the following parameters:
The uncertainty for optical flow and external magnetometer aiding must be specified using the following parameters:
TIP
- When optical flow aiding is enabled, the sensor uses the
vehicle_optical_flow_vel
output from the flight controller as a body-frame velocity aiding measurement. - If the MicroStrain sensor does not support these aiding sources but they are enabled, sensor initialization will fail.
Initial heading alignment:
Initial heading alignment is set to kinematic by default. This can be changed by adjusting
GNSS Aiding Source Control (GNSS/INS only)
The Source of the GNSS aiding data can be configured using:
Sensor to vehicle transform:
If the sensor is mounted in an orientation different from the vehicle frame. A sensor to vehicle transform can be enabled using
The transform is defined using the following parameters
IMU ranges:
The accelerometer and gyroscope ranges on the device are configurable using:
TIP
Available range settings depend on the specific sensor and can be found in the corresponding user manual. By default, the ranges are not changed.
GNSS Lever arm offsets:
The lever arm offset for the external GNSS receiver can be configured using:
For dual-antenna configurations, the second GNSS receiver’s offset is configured using:
Published Data
The MicroStrain driver continuously publishes sensor data to the following uORB topics:
For GNSS/INS devices, GPS data is also published to:
If used as an external INS replacing EKF2, it publishes:
otherwise the same data is published to the following topics
external_ins_global_position
external_ins_attitude
external_ins_local_position
TIP
Published topics can be viewed using the listener
command.