Arducam B0678 – Irregular IMU Sampling and USB Read Delays During Video Streaming

Hello Arducam Support,

I’m using the Arducam B0678 2MP Global Shutter USB 2.0 Camera with Built-in IMU for a Visual-Inertial Odometry (VIO) application.

I’ve encountered a significant issue with irregular IMU sampling intervals when video streaming is active.

Hardware and software

  • Camera: Arducam B0678 (VID: 0x0c45, PID: 0x0678)
  • IMU: ICM-42602 (6-axis)
  • Host: Linux PC
  • USB connection: USB 2.0 High Speed (480 Mbps, verified using lsusb -t)
  • SDK: arducam_uvc_stereo_sdk (Python)
  • IMU interface: UVC Extension Unit 4, Selector 10, Length 17 bytes

Problem description

I’m reading IMU measurements using:

camera = open_device(dev)
camera.open_imu()

while True:
    imu = camera.read_imu()
    hardware_timestamp = imu.imu_timestamp_raw
    host_timestamp = imu.host_timestamp_ns

Video streaming is active simultaneously through V4L2/OpenCV.

However, the IMU measurements are delivered at irregular intervals, and the IMU read performance becomes significantly worse when increasing the camera frame rate.

Experimental results

I tested two camera configurations at 640×480 MJPG:

Measurement 30 FPS 60 FPS
Camera capture Stable Stable
IMU readings per second ~140 Hz ~42–46 Hz
Median IMU read duration ~4.85 ms ~17.5 ms
95th-percentile read duration ~19.9 ms ~32 ms

At 30 FPS, approximately 1,800 IMU read calls take 16 ms or longer during a 60-second recording, corresponding to approximately one long read per camera frame.

At 60 FPS, the majority of IMU reads take more than 16 ms, and many take 30 ms or longer.

I also compared two acquisition architectures:

  1. Video capture through V4L2 in a separate process, with IMU polling through the Python SDK.
  2. OpenCV video capture and IMU polling in independent Python threads, similar to your stereo IMU pose viewer demo.

Both approaches produced nearly identical results.

Hardware and host timestamps

I recorded both imu_timestamp_raw and host_timestamp_ns.

The hardware timestamp intervals are also irregular, showing groups around 3–5 ms and approximately 17–20 ms at 30 FPS, assuming the raw timestamp counter uses 1 MHz ticks.

I also observed that host_timestamp_ns closely matches the midpoint between the beginning and end of the read_imu() call.

This raises concerns about whether these timestamps represent the actual IMU sampling instant or the USB read operation.

Kalibr results

I’m using this camera for monocular VIO and performed camera–IMU calibration using Kalibr.

The IMU sampling-rate diagnostic reported:

Average dt = 7.12 ± 5.27 ms

The timestamp intervals form distinct groups around 3 ms, 5 ms, and 17 ms instead of a consistent sampling interval.

This makes me concerned about missing IMU samples or incorrect measurement timing during rapid motion.

Questions

  1. What is the default output data rate (ODR) of the ICM-42602 in the B0678 camera? Can it be configured through the SDK?
  2. Does read_imu() return the latest available IMU measurement, or does it retrieve samples from a FIFO/buffer?
  3. Does imu_timestamp_raw represent the actual physical IMU sampling time? What are its clock frequency and counter resolution?
  4. How exactly is host_timestamp_ns calculated?
  5. Why does IMU read performance deteriorate when camera FPS increases from 30 to 60?
  6. Is there a recommended method to retrieve all IMU samples with accurate timestamps for VIO applications?
  7. Would using the native C/C++ SDK provide better IMU acquisition performance, or is this behavior limited by the camera firmware?

My goal is to obtain a reliable, accurately timestamped IMU stream synchronized with camera frames for Visual-Inertial Odometry.

Any guidance on SDK configuration, IMU FIFO access, firmware limitations, or recommended acquisition meth

ods would be greatly appreciated.

Thank you!

Hi Burhan,

Thank you for the detailed investigation and for sharing your test results.

We’ve reviewed your questions regarding the B0678 camera’s IMU data acquisition and timing behavior. Please see our answers below.

1. What is the default output data rate (ODR) of the ICM-42602? Can it be configured through the SDK?

The effective IMU data rate you can achieve with the B0678 is not fixed. It is affected by the USB bandwidth and processing load, which depend on the camera’s resolution and frame rate settings.

The IMU’s ODR configuration is managed internally by the camera firmware and cannot be adjusted through the SDK .

2. Does read_imu() return the latest measurement or retrieve samples from a FIFO?

The read_imu() function always returns the latest available IMU measurement .

It does not retrieve a sequence of historical samples from an IMU FIFO or buffer. Therefore, if your application polls the IMU more slowly than new measurements become available, intermediate samples may be missed.

3. What does imu_timestamp_raw represent?

The imu_timestamp_raw value is generated by the ICM-42602’s internal hardware timestamp counter.

  • Counter frequency: 1 MHz
  • Counter resolution: 1 µs per LSB

This timestamp is based on the IMU’s internal hardware clock rather than the host operating system clock.

4. How is host_timestamp_ns calculated?

The host_timestamp_ns value is recorded by the host operating system when the IMU data packet is received.

Because this timestamp is generated on the host side, it includes delays introduced by USB communication and operating system scheduling.

Therefore, it should not be interpreted as the exact physical sampling time of the IMU measurement.

5. Why does IMU read performance deteriorate when camera FPS increases from 30 to 60?

This behavior is primarily related to the interaction between UVC video streaming and UVC Extension Unit (XU) control requests .

The B0678 retrieves IMU measurements by polling through UVC XU control requests.

When the camera resolution or frame rate increases, the camera controller must handle a higher video data workload. This affects how quickly the firmware can respond to IMU polling requests, resulting in longer read intervals and increased latency.

This explains why you observed significantly lower IMU read rates when increasing video capture from 30 fps to 60 fps.

6. Is there a recommended way to retrieve all IMU samples with accurate timestamps for VIO applications?

Unfortunately, we currently do not have a documented or supported solution for retrieving every IMU sample with accurately synchronized camera and IMU timestamps for VIO applications.

The current IMU interface is based on UVC XU polling, so it cannot guarantee continuous, lossless IMU sample acquisition under heavy video streaming workloads.

7. Would using the native C/C++ SDK improve IMU acquisition performance?

Switching from the Python SDK to the native C/C++ SDK would not resolve the underlying limitation.

The primary bottleneck comes from the UVC protocol and XU control-request mechanism , rather than the programming language used by the SDK.

Therefore, similar IMU acquisition limitations should be expected with the C/C++ SDK.

We understand that consistent IMU sampling and accurate timing are important for your VIO application. Unfortunately, the current B0678 firmware and UVC-based IMU interface have limitations in this regard.

We hope this clarifies the behavior you’re seeing in your tests.