I’m currently using the camera LI-V024M-MIPI-IPEX30 from Leopard imaging and the Argus API to pull frames off the camera. I have an external IMU (InertialSense) that I’m trying to synchronize with the camera frames. I currently timestamp the IMU data coming off the sensor using:
struct timespec time; clock_gettime(CLOCK_MONOTONIC_RAW, &time); auto systemTimeNS = time.tv_sec* 1000000000 + (long) time.tv_nsec;
and then subtract 4ms for the signal latency.
But I’m having trouble getting the timestamp of when the camera image was snapped from the Argus API to match with the CLOCK_MONOTONIC_RAW timestamp I’m using for the IMU. I’m using the
from the Argus API to get the camera’s timestamp but it seems to be running ahead of the CLOCK_MONOTONIC_RAW timestamp. I tried to also do
frame->getTime() - iMetadata->getSensorTimestamp()
and then subtract the difference to the current CLOCK_MONOTONIC_RAW, but I feel like this is not the right solution. I’m trying to get sub-1ms accuracy on the timestamps between my external IMU and camera. How can I achieve this?