Skip to content

Commit

Permalink
chore: simplify logic for calculating update interval for occupancy grid
Browse files Browse the repository at this point in the history
Signed-off-by: Gaoyang Zhang <[email protected]>
  • Loading branch information
blurgyy committed Aug 9, 2023
1 parent 4c665d2 commit 1ef676a
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions utils/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1378,19 +1378,7 @@ def locked_params(self):

@property
def update_ogrid_interval(self) -> int:
s = int(self.step)
if s < 16:
return 1
elif s < 256:
return s // 16
elif s < 1024:
return 16
elif s < 4096:
return 32
elif s < 8192:
return 64
else:
return 128
return min(16, self.step // 16 + 1)

@property
def should_call_update_ogrid(self) -> bool:
Expand Down

0 comments on commit 1ef676a

Please sign in to comment.