I saved a log using voxl-logger --preset_odometry
with the intent of creating some data sets to try other VIO solutions. I was curious about the sample rate (before I thought about looking in /etc/modalai/voxl-imu-server.conf
, where it is configured to 1000 Hz) and decided to calculate it based on the actual data. The image shows a sequence of 1e9/data_imu['timestamp(ns)'].diff()[1:200]
which corresponds to the instantaneous frequency between two samples.
First I noticed that there is an offset from the 1000 Hz configured, which according to icm42688.c on line 117, the IMU should be able to reach. I find that the mean of this frequency, which is around 1023.89, is suspiciously related to the inverse of the #define STARTING_CLOCK_RATIO 0.9765625
(which is excactly 1/1.024) parameter in the ICM42688 driver. Is this supposed to mean that the IMU runs at a deterministic 1.024x too fast, or am I missing something?
The second thing I notice is that the frequency (and in turn the delta-time) varies a lot. I see that the timestamp from the sensor itself it not used, but that they are instead generated manually using the rc_ts_filter_...
functions. I imagine that the sensor itself is a lot more consistent than this, even if the actual frequency might have some bias. So is this timestamp misleading? Too rough of an approximation?