From 12361ebb2c641d4747d681e388d5cd75bcf69b7a Mon Sep 17 00:00:00 2001 From: Masaki Waga Date: Thu, 15 Aug 2024 15:39:42 +0900 Subject: [PATCH] Use self.speed to compute rewards fixes #237 --- src/gym_duckietown/simulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gym_duckietown/simulator.py b/src/gym_duckietown/simulator.py index 98f56ab6..417a9a18 100644 --- a/src/gym_duckietown/simulator.py +++ b/src/gym_duckietown/simulator.py @@ -1699,7 +1699,7 @@ def _compute_done_reward(self) -> DoneRewardInfo: done_code = "max-steps-reached" else: done = False - reward = self.compute_reward(self.cur_pos, self.cur_angle, self.robot_speed) + reward = self.compute_reward(self.cur_pos, self.cur_angle, self.speed) msg = "" done_code = "in-progress" return DoneRewardInfo(done=done, done_why=msg, reward=reward, done_code=done_code)