Skip to content

Commit

Permalink
fix number of step calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanganVR authored Mar 10, 2021
1 parent 24be7ad commit 503173b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crowd_nav/utils/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ def run_k_episodes(self, k, phase, update_memory=False, imitation_learning=False
format(phase.upper(), extra_info, success_rate, collision_rate, avg_nav_time,
average(cumulative_rewards)))
if phase in ['val', 'test']:
total_time = sum(success_times + collision_times + timeout_times) * self.robot.time_step
num_step = sum(success_times + collision_times + timeout_times) / self.robot.time_step
logging.info('Frequency of being in danger: %.2f and average min separate distance in danger: %.2f',
too_close / total_time, average(min_dist))
too_close / num_step, average(min_dist))

if print_failure:
logging.info('Collision cases: ' + ' '.join([str(x) for x in collision_cases]))
Expand Down

0 comments on commit 503173b

Please sign in to comment.