|
|
@ -333,20 +333,18 @@ class TestOnroad: |
|
|
|
assert np.all(eof_sof_diff > 0) |
|
|
|
assert np.all(eof_sof_diff > 0) |
|
|
|
assert np.all(eof_sof_diff < 50*1e6) |
|
|
|
assert np.all(eof_sof_diff < 50*1e6) |
|
|
|
|
|
|
|
|
|
|
|
first_fid = {c: min(self.ts[c]['frameId']) for c in cams} |
|
|
|
first_fid = {min(self.ts[c]['frameId']) for c in cams} |
|
|
|
|
|
|
|
assert len(first_fid) == 1, "Cameras don't start on same frame ID" |
|
|
|
if cam.endswith('CameraState'): |
|
|
|
if cam.endswith('CameraState'): |
|
|
|
# camerad guarantees that all cams start on frame ID 0 |
|
|
|
# camerad guarantees that all cams start on frame ID 0 |
|
|
|
# (note loggerd also needs to start up fast enough to catch it) |
|
|
|
# (note loggerd also needs to start up fast enough to catch it) |
|
|
|
assert set(first_fid.values()) == {0, }, "Cameras don't start on frame ID 0" |
|
|
|
assert next(iter(first_fid)) < 100, "Cameras start on frame ID too high" |
|
|
|
else: |
|
|
|
|
|
|
|
# encoder guarantees all cams start on the same frame ID |
|
|
|
|
|
|
|
assert len(set(first_fid.values())) == 1, "Cameras don't start on same frame ID" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# we don't do a full segment rotation, so these might not match exactly |
|
|
|
# we don't do a full segment rotation, so these might not match exactly |
|
|
|
last_fid = {c: max(self.ts[c]['frameId']) for c in cams} |
|
|
|
last_fid = {max(self.ts[c]['frameId']) for c in cams} |
|
|
|
assert max(last_fid.values()) - min(last_fid.values()) < 10 |
|
|
|
assert max(last_fid) - min(last_fid) < 10 |
|
|
|
|
|
|
|
|
|
|
|
start, end = min(first_fid.values()), min(last_fid.values()) |
|
|
|
start, end = min(first_fid), min(last_fid) |
|
|
|
for i in range(end-start): |
|
|
|
for i in range(end-start): |
|
|
|
ts = {c: round(self.ts[c]['timestampSof'][i]/1e6, 1) for c in cams} |
|
|
|
ts = {c: round(self.ts[c]['timestampSof'][i]/1e6, 1) for c in cams} |
|
|
|
diff = (max(ts.values()) - min(ts.values())) |
|
|
|
diff = (max(ts.values()) - min(ts.values())) |
|
|
|