Skip to content

Commit

Permalink
refactor: remove commented out code
Browse files Browse the repository at this point in the history
It is recommended to remove any commented code in your codebase.
  • Loading branch information
deepsource-autofix[bot] authored Jan 26, 2024
1 parent f7a4cb4 commit 04096d6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
11 changes: 0 additions & 11 deletions model-gym-ros-env/car_node/car_node/wrapper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import gym
import numpy as np
#from gym import spaces
from gym import spaces
from pathlib import Path
from argparse import Namespace
Expand Down Expand Up @@ -157,11 +156,6 @@ def step(self, action):
np.power((observation["poses_y"][0] - self.last_position['y']), 2)
)

# if distance_from_last_position > 0.0005:
# reward += 0.8
# else:
# reward = 0
# # Update the last position
reward += distance_from_last_position

self.last_position['x'] = observation['poses_x'][0]
Expand Down Expand Up @@ -228,8 +222,6 @@ def reset(self):
self.race_line_y = race_line_y
self.race_line_theta = race_line_theta

# else:
# x, y, t = self.start_position()

self.episode_returns = []

Expand All @@ -243,9 +235,6 @@ def update_map(self, map_name, map_extension, update_render=False):
self.env.map_name = map_name
self.env.map_ext = map_extension
self.env.update_map(f"{map_name}.yaml", map_extension)
# if update_render and self.env.renderer:
# self.env.renderer.close()
# self.env.renderer = None

def seed(self, seed):
self.current_seed = seed
Expand Down
5 changes: 0 additions & 5 deletions src/wrapper/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ def reset(self):
self.race_line_y = race_line_y
self.race_line_theta = race_line_theta

# else:
# x, y, t = self.start_position()

self.episode_returns = []
self.step_for_episode = 0
Expand All @@ -272,9 +270,6 @@ def update_map(self, map_name, map_extension, update_render=False):
self.env.map_name = map_name
self.env.map_ext = map_extension
self.env.update_map(f"{map_name}.yaml", map_extension)
# if update_render and self.env.renderer:
# self.env.renderer.close()
# self.env.renderer = None

def seed(self, seed):
self.current_seed = seed
Expand Down

0 comments on commit 04096d6

Please sign in to comment.