We know that IMU sampling rate is much higher than image taken from the sensor (FPS), so can I get images at 60FPS and IMU data at 500hz at the same time?
Is there an easy way? Or maybe I need to use two threads to achieve my goal ?
Sounds unrealistic, but some advanced IMU s, such as (no advertisements here) InvenSense allows to bind readings from the IMU to a sensor event (readout). To get familiar with the concept, please take a closer look at FSYNC register. You can refer to the most advanced chip: MPU9250.
The FSYNC (Frame Sync) input allows precise timing to be achieved with Video Frame Sync at the host level for read out of the frame data.
2. Store the last read data value
The one you mentioned. Have a separate producer thread which reads the data from the IMU with required speed and puts it into the storage; and another one (consumer) which reads the data from the local storage.
Actually, you have two options.
1. Bound readout from the sensor to an IMU module
Sounds unrealistic, but some advanced
IMU
s, such as (no advertisements here)InvenSense
allows to bind readings from theIMU
to a sensor event (readout). To get familiar with the concept, please take a closer look atFSYNC
register. You can refer to the most advanced chip:MPU9250
.Quote from the invensense.com:
2. Store the last read data value
The one you mentioned. Have a separate producer thread which reads the data from the
IMU
with required speed and puts it into the storage; and another one (consumer) which reads the data from the local storage.