Skip to content

Commit

Permalink
to follow setting, use lane_num=1
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhenghao committed May 13, 2024
1 parent d40dfc2 commit 07e758f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions metadrive/envs/multigoal_intersection.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

"""
This file implement an intersection environment with multiple goals.
"""
Expand Down Expand Up @@ -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)
}
)

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -490,4 +491,4 @@ def done_function(self, vehicle_id: str):
env.reset()
s = 0
finally:
env.close()
env.close()

0 comments on commit 07e758f

Please sign in to comment.