From 1a140b9e575e41ec488137d036f08455452ef11c Mon Sep 17 00:00:00 2001 From: KARTHIK TARAKA SAI BOLLA <110156560+karthikbolla@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:02:55 +0530 Subject: [PATCH] Update pipeline.py updated pipeline.py based on @benemer suggestions where the results are only appended when avg fps is greater than zero --- python/kiss_icp/pipeline.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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):