DRIVE OS Version: 6.0.10
Inquiry about dwImageTimestamps.eofTimestampUs
I have a question regarding the behavior of dwImageTimestamps.eofTimestampUs.
Using DriveWorks 5.20’s samples/src/sensors/camera/camera as a base, I implemented a test application that obtains the following two timestamps immediately after calling dwSensorCamera_readFrame():
-
Value1:
CLOCK_REALTIMEmeasured immediately afterdwSensorCamera_readFrame(). -
Value2:
dwImageTimestamps.eofTimestampUscorresponding to the same frame.
For these tests I continuously synchronize the system clock and the PHC using:
sudo phc2sys -s CLOCK_REALTIME -c /dev/ptp2 -m -O 0
Test conditions
I tested the behavior while varying the following two conditions:
-
Whether the application was run with
sudoprivileges. -
Whether the device node
/dev/nvpps0was accessible (e.g.,chmod 600orchmod 777).
Test results
+--------+------+------------------+------------------+------------------+------------------+
| Test | sudo | /dev/nvpps0 | Value1 | Value2 | Note |
+--------+------+------------------+------------------+------------------+------------------+
| Test 1 | no | not accessible | 1735721700.468 | 1735721700.468 | match |
| Test 2 | yes | not accessible | 1735721671.401 | 1735721675.233 | differ ≈ 3.8s |
| Test 3 | no | accessible | 1735721865.268 | 1735721869.100 | differ ≈ 3.8s |
| Test 4 | yes | accessible | 1735721919.268 | 1735721923.100 | differ ≈ 3.8s |
+--------+------+------------------+------------------+------------------+------------------+
Questions
-
In Test 1, Value1 and Value2 match exactly, but in Tests 2–4 there is a discrepancy of more than three seconds, even though
phc2sysis continuously synchronizing the system clock and the PHC. Could you explain why this discrepancy occurs? -
From these results, does
dwImageTimestamps.eofTimestampUsdepend on whether the application is run withsudoprivileges and/or whether/dev/nvpps0is accessible? In other words, does the time source or the timestamp calculation path used foreofTimestampUschange depending on these permission conditions?