@@ -234,9 +234,9 @@ def toPercent(value):
234
234
"timestamps that don't overlap with IMU" )
235
235
236
236
237
- def analyzeDiscardedFrames (self , start_time , end_time , timestamps ):
237
+ def analyzeDiscardedFrames (self , startTime , endTime , timestamps ):
238
238
if len (timestamps ) == 0 : return
239
- self .images .append (plotDiscardedFrames (start_time , end_time , timestamps ))
239
+ self .images .append (plotDiscardedFrames (startTime , endTime , timestamps ))
240
240
self .__addIssue (DiagnosisLevel .WARNING ,
241
241
f"Found { len (timestamps )} discarded frames. Typically this happens when disk I/O "
242
242
f"is too slow and prevents recording frames leading them to be discarded. You can "
@@ -263,7 +263,6 @@ def analyzeArrivalTimes(
263
263
264
264
total = len (deltaTimes )
265
265
if total == 0 : return
266
-
267
266
medianDeltaTime = np .nanmedian (deltaTimes )
268
267
warningThreshold = min (.5 , medianDeltaTime * 4 )
269
268
errorThreshold = 1
@@ -299,11 +298,11 @@ def analyzeArrivalTimes(
299
298
** plotArgs ))
300
299
301
300
self .__addIssue (DiagnosisLevel .ERROR if maxError > errorThreshold else DiagnosisLevel .WARNING ,
302
- f"Found { badDeltaTimes } { dataName } where the neibhgouring gyroscope samples "
301
+ f"Found { badDeltaTimes } { dataName } where the neighbouring gyroscope samples "
303
302
f"have time difference (expected { medianDeltaTime * SECONDS_TO_MILLISECONDS :.1f} ms) "
304
303
f"larger than { warningThreshold * SECONDS_TO_MILLISECONDS :.1f} ms, up to { maxError * SECONDS_TO_MILLISECONDS :.1f} ms. "
305
304
f"This indicates that gyroscope and { dataName } for same moment of time are fed "
306
- f"large time appart which may lead to data being dropped and higher latency."
305
+ f"large time apart which may lead to data being dropped and higher latency."
307
306
)
308
307
309
308
def analyzeSignalDuplicateValues (
@@ -687,17 +686,17 @@ def diagnoseCamera(data, output):
687
686
sensor = data ["cameras" ]
688
687
output ["cameras" ] = []
689
688
690
- start_time = None
691
- end_time = None
689
+ startTime = None
690
+ endTime = None
692
691
for ind in sensor .keys ():
693
692
camera = sensor [ind ]
694
693
timestamps = np .array (camera ["t" ])
695
694
deltaTimes = np .array (camera ["td" ])
696
695
697
696
if len (timestamps ) == 0 : continue
698
697
699
- if start_time == None or start_time > timestamps [0 ]: start_time = timestamps [0 ]
700
- if end_time == None or end_time < timestamps [- 1 ]: end_time = timestamps [- 1 ]
698
+ if startTime == None or startTime > timestamps [0 ]: startTime = timestamps [0 ]
699
+ if endTime == None or endTime < timestamps [- 1 ]: endTime = timestamps [- 1 ]
701
700
702
701
status = Status ()
703
702
status .analyzeTimestamps (
@@ -742,7 +741,7 @@ def diagnoseCamera(data, output):
742
741
743
742
if len (data ["discardedFrames" ]) > 0 :
744
743
status = Status ()
745
- status .analyzeDiscardedFrames (start_time , end_time , data ["discardedFrames" ])
744
+ status .analyzeDiscardedFrames (startTime , endTime , data ["discardedFrames" ])
746
745
output ["discardedFrames" ] = {
747
746
"diagnosis" : status .diagnosis .toString (),
748
747
"issues" : status .serializeIssues (),
0 commit comments