Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhenghao committed Dec 17, 2024
1 parent 92ef53e commit 5d79705
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions metadrive/tests/test_sensors/test_simgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from metadrive.obs.observation_base import BaseObservation
from metadrive.policy.replay_policy import ReplayEgoCarPolicy

WIN_HEIGHT = 45
WIN_WIDTH = 80

def test_simgen():
class SimGenObservation(BaseObservation):
Expand Down Expand Up @@ -89,8 +91,6 @@ def observe(self, vehicle):

# ===== MetaDrive Setup =====

sensor_size = (80, 45) #if os.getenv('TEST_DOC') else (800, 450)

env = ScenarioEnv(
{
'agent_observation': SimGenObservation,
Expand Down Expand Up @@ -128,7 +128,7 @@ def observe(self, vehicle):

# ===== Set some sensor and visualization configs =====
"daytime": "08:10",
"window_size": (800, 450),
"window_size": (WIN_WIDTH, WIN_HEIGHT),
"camera_dist": 0.8, # 0.8, 1.71
"camera_height": 1.5, # 1.5
"camera_pitch": None,
Expand Down Expand Up @@ -222,7 +222,7 @@ def observe(self, vehicle):
# "show_interface": True,
"sensors": dict(
# semantic_camera=(SemanticCamera, 1600, 900),
depth_camera=(DepthCamera, 800, 600),
depth_camera=(DepthCamera, WIN_WIDTH, WIN_HEIGHT),
# rgb_camera=(RGBCamera, 800, 600),
),
}
Expand Down

0 comments on commit 5d79705

Please sign in to comment.