From 096689d6173b11ca520f246f3b916d54b85522fc Mon Sep 17 00:00:00 2001 From: Felipe Date: Wed, 2 Jun 2021 22:07:19 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20energy=20penalty=20bug=20i?= =?UTF-8?q?n=20VSS=20environments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wheel speed command was being converted twice for energy penalty calculation --- rsoccer_gym/vss/env_ma/vss_gym_ma.py | 1 - rsoccer_gym/vss/env_vss/vss_gym.py | 1 - 2 files changed, 2 deletions(-) diff --git a/rsoccer_gym/vss/env_ma/vss_gym_ma.py b/rsoccer_gym/vss/env_ma/vss_gym_ma.py index b4929e5b..733f5bde 100644 --- a/rsoccer_gym/vss/env_ma/vss_gym_ma.py +++ b/rsoccer_gym/vss/env_ma/vss_gym_ma.py @@ -344,7 +344,6 @@ def _energy_penalty(self, robot_idx: int): en_penalty_1 = abs(self.sent_commands[robot_idx].v_wheel0) en_penalty_2 = abs(self.sent_commands[robot_idx].v_wheel1) energy_penalty = - (en_penalty_1 + en_penalty_2) - energy_penalty /= self.field.rbt_wheel_radius return energy_penalty diff --git a/rsoccer_gym/vss/env_vss/vss_gym.py b/rsoccer_gym/vss/env_vss/vss_gym.py index 0606c925..0bd701d6 100644 --- a/rsoccer_gym/vss/env_vss/vss_gym.py +++ b/rsoccer_gym/vss/env_vss/vss_gym.py @@ -308,5 +308,4 @@ def __energy_penalty(self): en_penalty_1 = abs(self.sent_commands[0].v_wheel0) en_penalty_2 = abs(self.sent_commands[0].v_wheel1) energy_penalty = - (en_penalty_1 + en_penalty_2) - energy_penalty /= self.field.rbt_wheel_radius return energy_penalty