Skip to content

Commit

Permalink
Update pipeline.py
Browse files Browse the repository at this point in the history
updated pipeline.py based on @benemer  suggestions where the results are only appended when avg fps is greater than zero
  • Loading branch information
karthikbolla authored Jul 10, 2024
1 parent f1b7182 commit 1a140b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/kiss_icp/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 1a140b9

Please sign in to comment.