From dc1ccd520c6a3cd705e7b37315aa85475e76707c Mon Sep 17 00:00:00 2001 From: ll7 <32880741+ll7@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:42:28 +0100 Subject: [PATCH] refactor: remove simulation UI display calls from environment classes --- robot_sf/gym_env/empty_robot_env.py | 3 --- robot_sf/gym_env/pedestrian_env.py | 3 --- robot_sf/gym_env/robot_env.py | 4 ---- robot_sf/render/playback_recording.py | 1 - 4 files changed, 11 deletions(-) diff --git a/robot_sf/gym_env/empty_robot_env.py b/robot_sf/gym_env/empty_robot_env.py index 1e0d312..97ec601 100644 --- a/robot_sf/gym_env/empty_robot_env.py +++ b/robot_sf/gym_env/empty_robot_env.py @@ -96,9 +96,6 @@ def __init__( goal_radius=env_config.sim_config.goal_radius, ) - # Display the simulation UI - self.sim_ui.show() - def step(self, action): """ Execute one time step within the environment. diff --git a/robot_sf/gym_env/pedestrian_env.py b/robot_sf/gym_env/pedestrian_env.py index 72c1617..4eafd13 100644 --- a/robot_sf/gym_env/pedestrian_env.py +++ b/robot_sf/gym_env/pedestrian_env.py @@ -147,9 +147,6 @@ def __init__( goal_radius=env_config.sim_config.goal_radius, ) - # Display the simulation UI - self.sim_ui.show() - def step(self, action): """ Execute one time step within the environment. diff --git a/robot_sf/gym_env/robot_env.py b/robot_sf/gym_env/robot_env.py index bc94aef..8ffb72d 100644 --- a/robot_sf/gym_env/robot_env.py +++ b/robot_sf/gym_env/robot_env.py @@ -136,10 +136,6 @@ def __init__( video_fps=video_fps, ) - # Only show window if in debug mode - if debug: - self.sim_ui.show() - def step(self, action): """ Execute one time step within the environment. diff --git a/robot_sf/render/playback_recording.py b/robot_sf/render/playback_recording.py index ad8b9e9..ae72c5c 100644 --- a/robot_sf/render/playback_recording.py +++ b/robot_sf/render/playback_recording.py @@ -34,7 +34,6 @@ def visualize_states(states: List[VisualizableSimState], map_def: MapDefinition) on the recorded map defintion """ sim_view = SimulationView(map_def=map_def, caption="RobotSF Recording") - sim_view.show() # to activate key_events for state in states: sim_view.render(state)