> This page is for Firmware, version 4.0 (default).
> For other versions, use one of these documentation indexes:
> - 4.0 (default): https://docs.ouster.com/sensor-docs/firmware/4.0/llms.txt
> - 3.2: https://docs.ouster.com/sensor-docs/firmware/3.2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ouster.com/sensor-docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ouster.com/sensor-docs/_mcp/server.

# IMU

> Synchronous IMU profile for tightly coupling IMU measurements with lidar frames.

Synchronous IMU support improves alignment between IMU measurements and lidar data for applications that fuse motion and point-cloud data, such as SLAM, localization, mapping, and vehicle odometry.

> **Note**
>
> Supported in firmware v3.2 or later.

The `ACCEL32_GYRO32_NMEA` IMU UDP profile and related configuration fields are intended for applications that need richer IMU packets, configurable IMU packet cadence, and timing information that can be consumed alongside lidar data.

## Getting Started

Use synchronous IMU data when your application needs tighter coupling between lidar frames and IMU measurements:

* SLAM or localization pipelines that compensate for sensor motion.
* Data recording workflows that must preserve IMU information with lidar packets.
* Systems using GPS/PPS/NMEA inputs and requiring lock or timing context in the IMU stream.

For general IMU packet structure and coordinate-frame information, see [IMU Data Format](/sensor-docs/firmware/imu-data).

## Expected Sensor Behavior

The `LEGACY` IMU profile preserves the original 100 Hz IMU packet behavior. The `ACCEL32_GYRO32_NMEA` profile is designed for synchronous output: IMU readout is correlated with lidar column/frame context and packet cadence is configurable with `imu_packets_per_frame`.

The `ACCEL32_GYRO32_NMEA` profile carries 32-bit accelerometer and gyroscope data. Configure PPS/NMEA/PTP time inputs as described in [Time Synchronization](/sensor-docs/firmware/time-synchronization).

## IMU Configuration

Configure synchronous IMU output with [`POST /api/v1/sensor/config`](/sensor-docs/firmware/api-reference#sensor-configuration).

```shell
curl -X POST http://os-991234567890.local/api/v1/sensor/config \
  -H 'Content-Type: application/json' \
  --data '{
    "udp_profile_imu": "ACCEL32_GYRO32_NMEA",
    "imu_packets_per_frame": 8
  }'
```

The related configuration fields are:

| Parameter                | Description                                                                                                                                                |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `udp_profile_imu`        | Selects the IMU UDP packet format. Valid values are `LEGACY`, `ACCEL32_GYRO32_NMEA`, and `OFF`. Use `ACCEL32_GYRO32_NMEA` for the synchronous IMU profile. |
| `imu_packets_per_frame`  | Sets how many IMU packets are emitted per lidar frame. Valid values are `1`, `2`, `4`, and `8`.                                                            |
| `udp_port_imu`           | Sets the UDP destination port for IMU packets. Set to `0` to disable IMU packet transmission.                                                              |
| `udp_dest`               | Sets the UDP destination address for lidar and IMU data.                                                                                                   |
| `accel_fsr` / `gyro_fsr` | Selects the accelerometer and gyroscope full-scale range. See [Configurable IMU Scale](/sensor-docs/firmware/imu-data#configurable-imu-scale).                         |

> **Note**
>
> The `LEGACY` IMU profile is supported through firmware v3.2 and will be deprecated in later releases. Use `ACCEL32_GYRO32_NMEA` for new integrations.

## Validating Operation

Read the IMU metadata with [`GET /api/v1/sensor/metadata/imu_data_format`](/sensor-docs/firmware/api-reference#sensor-metadata):

```shell
curl http://os-991234567890.local/api/v1/sensor/metadata/imu_data_format
```

Example response:

```json
{
  "accel_fsr": "NORMAL",
  "gyro_fsr": "NORMAL",
  "imu_packets_per_frame": 8,
  "imu_measurements_per_packet": 1,
  "udp_profile_imu": "ACCEL32_GYRO32_NMEA"
}
```

The response confirms the selected IMU profile, packet cadence, and full-scale range settings. For configurable accelerometer and gyroscope ranges, see [Configurable IMU Scale](/sensor-docs/firmware/imu-data#configurable-imu-scale).

For packet layouts, see [LEGACY IMU Profile](/sensor-docs/firmware/3.2/imu-data-legacy) and [ACCEL32_GYRO32_NMEA IMU Profile](/sensor-docs/firmware/imu-data#accel32_gyro32_nmea-imu-profile).

## Recording Recommendations

When recording data for SLAM or downstream sensor-fusion workflows:

1. Configure IMU output with the [sensor configuration endpoint](/sensor-docs/firmware/api-reference#sensor-configuration):

```shell
curl -X POST http://os-991234567890.local/api/v1/sensor/config \
  -H 'Content-Type: application/json' \
  --data '{
    "udp_profile_imu": "ACCEL32_GYRO32_NMEA",
    "imu_packets_per_frame": 8
  }'
```

2. Confirm the active IMU profile and packet cadence with the [IMU data format endpoint](/sensor-docs/firmware/api-reference#sensor-metadata):

```shell
curl http://os-991234567890.local/api/v1/sensor/metadata/imu_data_format
```

3. If using external timing, verify timing lock state with the [time endpoint](/sensor-docs/firmware/api-reference#time) or [PTP status endpoint](/sensor-docs/firmware/api-reference#time):

```shell
curl http://os-991234567890.local/api/v1/time
curl http://os-991234567890.local/api/v1/time/ptp
```

4. Record raw lidar and IMU UDP packets together so timestamps and packet ordering are preserved.

If synchronous IMU data appears invalid or all zero after aggressive motion, update to the latest firmware and reinitialize the sensor before collecting new data.