Skip to content

Commit

Permalink
🐛 Fix energy penalty bug in VSS environments
Browse files Browse the repository at this point in the history
Wheel speed command was being converted twice for energy penalty calculation
  • Loading branch information
FelipeMartins96 committed Jun 3, 2021
1 parent 31f0d99 commit 096689d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion rsoccer_gym/vss/env_ma/vss_gym_ma.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
1 change: 0 additions & 1 deletion rsoccer_gym/vss/env_vss/vss_gym.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 096689d

Please sign in to comment.