From 07e758fd3b266bc272d5d713eb342d656b90aa97 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Sun, 12 May 2024 17:12:44 -0700 Subject: [PATCH] to follow setting, use lane_num=1 --- metadrive/envs/multigoal_intersection.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/metadrive/envs/multigoal_intersection.py b/metadrive/envs/multigoal_intersection.py index 93c2cf616..cf198eb06 100644 --- a/metadrive/envs/multigoal_intersection.py +++ b/metadrive/envs/multigoal_intersection.py @@ -1,3 +1,4 @@ + """ This file implement an intersection environment with multiple goals. """ @@ -135,8 +136,8 @@ class CustomizedIntersection(InterSectionWithUTurn): Parameter.radius: ConstantSpace(8), # unchanged: - Parameter.change_lane_num: DiscreteSpace(min=0, max=1), - Parameter.decrease_increase: DiscreteSpace(min=0, max=1) + Parameter.change_lane_num: DiscreteSpace(min=0, max=0), + Parameter.decrease_increase: DiscreteSpace(min=0, max=0) } ) @@ -227,7 +228,7 @@ def default_config(cls): "map_config": dict( type="block_sequence", config=[ CustomizedIntersection, - ], lane_num=2, lane_width=3.5 + ], lane_num=1, lane_width=3.5 ), "agent_observation": CustomizedObservation, @@ -405,8 +406,8 @@ def done_function(self, vehicle_id: str): if __name__ == "__main__": config = dict( - use_render=True, - manual_control=True, + use_render=False, + manual_control=False, vehicle_config=dict(show_lidar=False, show_navi_mark=True, show_line_to_navi_mark=True), accident_prob=1.0, decision_repeat=5, @@ -490,4 +491,4 @@ def done_function(self, vehicle_id: str): env.reset() s = 0 finally: - env.close() + env.close() \ No newline at end of file