Skip to content

Commit

Permalink
Fixed total distance and time calculation when using a grace window b…
Browse files Browse the repository at this point in the history
…efore evaluation

in the old system, not in celery.
  • Loading branch information
portaloffreedom committed Jun 7, 2021
1 parent fa1a5fa commit 6495ec8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyrevolve/angle/manage/robotmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def update_state(self, world, time, state, poses_file):

if len(self._dt) >= self.speed_window:
# Subtract oldest values if we're about to override it
self._dist -= self._ds[-1]
self._time -= self._dt[-1]
self._dist -= self._ds[0]
self._time -= self._dt[0]

self.last_position = position
self.last_update = time
Expand Down

0 comments on commit 6495ec8

Please sign in to comment.