Skip to main content
The M1 streams IMU samples alongside video on the same transport. retrieve_imu() drains the queued samples in chronological order after a successful grab(). At typical rates, a frame interval contains several IMU samples. Leave InitParameters::enable_imu enabled, then use a USB or WiFi/UDP data plane. A control-only Bluetooth LE (BLE) session cannot deliver IMU samples.

SensorsData

Timestamps and ordering

Sample timestamps are on the device clock, the same timebase as Mat::getTimestamp(), so associating IMU windows to frames is a direct comparison. sequence increments per sample; a gap means samples were lost in transit (lossy UDP) or overrun (dropped). retrieve_imu(data, TIME_REFERENCE::IMAGE) is the default and returns the queued batch aligned to the grabbed frame. Samples arriving between calls queue for the next drain. Passing TIME_REFERENCE::CURRENT keeps only the newest available sample. flip_mode and coordinate_system are applied when samples are delivered. Recordings preserve the raw IMAGE-frame data.

Sensor configuration

Noise densities and the camera↔IMU extrinsic transform ship on the device and are cached at open():
Read the rate from sampling_rate rather than assuming one. The block also carries the stored field calibration (accel_bias, gyro_bias, the two 3×3 scale-misalignment matrices, and time_offset_ns), which is what Calibration writes.
Disable the IMU with InitParameters::enable_imu = false when only video is required. This removes the IMU packets from the wire entirely.