diff --git a/python/kiss_icp/pipeline.py b/python/kiss_icp/pipeline.py index 52cb7a74..b16ae125 100644 --- a/python/kiss_icp/pipeline.py +++ b/python/kiss_icp/pipeline.py @@ -181,11 +181,13 @@ def _get_fps(): total_time_s = sum(self.times) * 1e-9 return float(len(self.times) / total_time_s) if total_time_s > 0 else 0 + fps = _get_fps() avg_fps = int(np.floor(fps)) avg_ms = int(np.ceil(1e3 / fps)) if fps > 0 else 0 - self.results.append(desc="Average Frequency", units="Hz", value=avg_fps, trunc=True) - self.results.append(desc="Average Runtime", units="ms", value=avg_ms, trunc=True) + if avg_fps > 0: + self.results.append(desc="Average Frequency", units="Hz", value=avg_fps, trunc=True) + self.results.append(desc="Average Runtime", units="ms", value=avg_ms, trunc=True) def _write_log(self):