diff --git a/scenarios/argoverse/straight/00a445fb-7293-4be6-adbc-e30c949b6cf7_agents_1/scenario.py b/scenarios/argoverse/straight/00a445fb-7293-4be6-adbc-e30c949b6cf7_agents_1/scenario.py new file mode 100644 index 0000000000..faea1c5fd1 --- /dev/null +++ b/scenarios/argoverse/straight/00a445fb-7293-4be6-adbc-e30c949b6cf7_agents_1/scenario.py @@ -0,0 +1,41 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t + +# scenario_path is a directory with the following structure: +# /path/to/dataset/{scenario_id} +# ├── log_map_archive_{scenario_id}.json +# └── scenario_{scenario_id}.parquet + +scenario_id = "00a445fb-7293-4be6-adbc-e30c949b6cf7" # e.g. "0000b6ab-e100-4f6b-aee8-b520b57c0530" +scenario_path = None # e.g. Path("/home/user/argoverse/train/") / scenario_id + +ego_mission = [ + t.Mission( + t.Route( + begin=("road-206498749-206498861", 0, 28.3), + end=("road-206498749-206498861", 0, 52.3), + ), + entry_tactic=t.TrapEntryTactic( + start_time=0.1, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ) +] + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/straight/0a53dd99-2946-4b4d-ab66-c4d6fef97be2_agents_1/scenario.py b/scenarios/argoverse/straight/0a53dd99-2946-4b4d-ab66-c4d6fef97be2_agents_1/scenario.py new file mode 100644 index 0000000000..03f143289c --- /dev/null +++ b/scenarios/argoverse/straight/0a53dd99-2946-4b4d-ab66-c4d6fef97be2_agents_1/scenario.py @@ -0,0 +1,40 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t + +# scenario_path is a directory with the following structure: +# /path/to/dataset/{scenario_id} +# ├── log_map_archive_{scenario_id}.json +# └── scenario_{scenario_id}.parquet + + +scenario_id = "0a53dd99-2946-4b4d-ab66-c4d6fef97be2" # e.g. "0000b6ab-e100-4f6b-aee8-b520b57c0530" +scenario_path = None # e.g. Path("/home/user/argoverse/train/") / scenario_id + +ego_mission = [ + t.Mission( + t.Route( + begin=("road-353638670-353638219-353638558", 1, 6.7), + end=("road-353637909-353637861-353637941-353637727", 1, 4.2), + ), + entry_tactic=t.IdEntryTactic(start_time=0.1, actor_id="history-vehicle-5717"), + ) +] + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/straight/0a576bf1-66ae-495a-9c87-236f3fc2aa01_agents_1/scenario.py b/scenarios/argoverse/straight/0a576bf1-66ae-495a-9c87-236f3fc2aa01_agents_1/scenario.py new file mode 100644 index 0000000000..ee9ab5531b --- /dev/null +++ b/scenarios/argoverse/straight/0a576bf1-66ae-495a-9c87-236f3fc2aa01_agents_1/scenario.py @@ -0,0 +1,39 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t + +# scenario_path is a directory with the following structure: +# /path/to/dataset/{scenario_id} +# ├── log_map_archive_{scenario_id}.json +# └── scenario_{scenario_id}.parquet + + +scenario_id = "0a576bf1-66ae-495a-9c87-236f3fc2aa01" # e.g. "0000b6ab-e100-4f6b-aee8-b520b57c0530" +scenario_path = None # e.g. Path("/home/user/argoverse/train/") / scenario_id + +ego_mission = [ + t.Mission( + t.Route( + begin=("road-431632924-431632618", 0, 0), + end=("road-431673448-431673312-431673462", 1, 17.0), + ) + ) +] + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/turn/00aae286-362a-4240-aa89-50871a4bd924_agents_1/scenario.py b/scenarios/argoverse/turn/00aae286-362a-4240-aa89-50871a4bd924_agents_1/scenario.py new file mode 100644 index 0000000000..6a4651660f --- /dev/null +++ b/scenarios/argoverse/turn/00aae286-362a-4240-aa89-50871a4bd924_agents_1/scenario.py @@ -0,0 +1,37 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t + +# scenario_path is a directory with the following structure: +# /path/to/dataset/{scenario_id} +# ├── log_map_archive_{scenario_id}.json +# └── scenario_{scenario_id}.parquet + +scenario_id = "00aae286-362a-4240-aa89-50871a4bd924" # e.g. "0000b6ab-e100-4f6b-aee8-b520b57c0530" +scenario_path = None # e.g. Path("/home/user/argoverse/train/") / scenario_id +ego_mission = [ + t.Mission( + t.Route( + begin=("road-423412446-423411525-423411465-423412854", 1, 0), + end=("road-423412446-423411525-423411465-423412854", 2, 20.5), + ) + ) +] + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/turn/00b15e74-04a8-4bd4-9a78-eb24f0c0a980_agents_1/scenario.py b/scenarios/argoverse/turn/00b15e74-04a8-4bd4-9a78-eb24f0c0a980_agents_1/scenario.py new file mode 100644 index 0000000000..fdb77955a6 --- /dev/null +++ b/scenarios/argoverse/turn/00b15e74-04a8-4bd4-9a78-eb24f0c0a980_agents_1/scenario.py @@ -0,0 +1,48 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t + +# scenario_path is a directory with the following structure: +# /path/to/dataset/{scenario_id} +# ├── log_map_archive_{scenario_id}.json +# └── scenario_{scenario_id}.parquet + +scenario_id = "00b15e74-04a8-4bd4-9a78-eb24f0c0a980" # e.g. "0000b6ab-e100-4f6b-aee8-b520b57c0530" +scenario_path = None # e.g. Path("/home/user/argoverse/train/") / scenario_id + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] +actor = t.SocialAgentActor( + name="Agent_007", + agent_locator="zoo.policies:chase-via-points-agent-v0", +) + +ego_mission = [ + t.Mission( + route=t.Route(begin=("road-240118388", 0, 1.3), end=("road-240118351", 0, 1.0)) + ) +] + +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + # bubbles=[ + # t.Bubble( + # actor=actor, + # zone=t.PositionalZone(pos=(0, 0), size=(50, 50)), + # follow_offset=(0, 0), + # margin=0, + # follow_actor_id="Agent_0", + # ), + # ], + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/turn/0a60b442-56b0-46c3-be45-cf166a182b67_agents_1/scenario.py b/scenarios/argoverse/turn/0a60b442-56b0-46c3-be45-cf166a182b67_agents_1/scenario.py new file mode 100644 index 0000000000..a17332adf9 --- /dev/null +++ b/scenarios/argoverse/turn/0a60b442-56b0-46c3-be45-cf166a182b67_agents_1/scenario.py @@ -0,0 +1,37 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t + +# scenario_path is a directory with the following structure: +# /path/to/dataset/{scenario_id} +# ├── log_map_archive_{scenario_id}.json +# └── scenario_{scenario_id}.parquet + +scenario_id = "0a60b442-56b0-46c3-be45-cf166a182b67" # e.g. "0000b6ab-e100-4f6b-aee8-b520b57c0530" +scenario_path = None # e.g. Path("/home/user/argoverse/train/") / scenario_id +ego_mission = [ + t.Mission( + t.Route( + begin=("road-390747694", 0, 1.1), + end=("road-390753337-390753391-390752985", 1, 22.5), + ) + ) +] + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/turn/0a764a82-b44e-481e-97e7-05e1f1f925f6_agents_1/scenario.py b/scenarios/argoverse/turn/0a764a82-b44e-481e-97e7-05e1f1f925f6_agents_1/scenario.py new file mode 100644 index 0000000000..26897661ce --- /dev/null +++ b/scenarios/argoverse/turn/0a764a82-b44e-481e-97e7-05e1f1f925f6_agents_1/scenario.py @@ -0,0 +1,37 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t + +# scenario_path is a directory with the following structure: +# /path/to/dataset/{scenario_id} +# ├── log_map_archive_{scenario_id}.json +# └── scenario_{scenario_id}.parquet + +scenario_id = "0a764a82-b44e-481e-97e7-05e1f1f925f6" # e.g. "0000b6ab-e100-4f6b-aee8-b520b57c0530" +scenario_path = None # e.g. Path("/home/user/argoverse/train/") / scenario_id +ego_mission = [ + t.Mission( + t.Route( + begin=("road-395015353-395015556", 0, 0.4), + end=("road-394994351", 0, 8.1), + ) + ) +] + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/turn/0bf054e3-7698-4b86-9c98-626df2dee9f4_agents_1/scenario.py b/scenarios/argoverse/turn/0bf054e3-7698-4b86-9c98-626df2dee9f4_agents_1/scenario.py new file mode 100644 index 0000000000..c38aa6abf1 --- /dev/null +++ b/scenarios/argoverse/turn/0bf054e3-7698-4b86-9c98-626df2dee9f4_agents_1/scenario.py @@ -0,0 +1,37 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t + +# scenario_path is a directory with the following structure: +# /path/to/dataset/{scenario_id} +# ├── log_map_archive_{scenario_id}.json +# └── scenario_{scenario_id}.parquet + +scenario_id = "0bf054e3-7698-4b86-9c98-626df2dee9f4" # e.g. "0000b6ab-e100-4f6b-aee8-b520b57c0530" +scenario_path = None # e.g. Path("/home/user/argoverse/train/") / scenario_id + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] +ego_mission = [ + t.Mission( + route=t.Route( + begin=("road-331937899", 0, 10.1), + end=("road-331938057-331937870-331937776", 1, 13.4), + ) + ) +] + +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/vehicle_following/ff239c9d-e4ff-4acc-bad5-bd55648c212e_0_agents_1/scenario.py b/scenarios/argoverse/vehicle_following/ff239c9d-e4ff-4acc-bad5-bd55648c212e_0_agents_1/scenario.py new file mode 100644 index 0000000000..4f068d3d70 --- /dev/null +++ b/scenarios/argoverse/vehicle_following/ff239c9d-e4ff-4acc-bad5-bd55648c212e_0_agents_1/scenario.py @@ -0,0 +1,31 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t +from smarts.core.colors import Colors + + +scenario_id = "ff239c9d-e4ff-4acc-bad5-bd55648c212e" +scenario_path = None + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +ego_mission = [t.EndlessMission(begin=("road-202833190-202832889-202833142", 2, "max"))] + +leader_id = "history-vehicle-46408$" +# runtime = 11 +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + scenario_metadata=t.ScenarioMetadata(leader_id, Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/vehicle_following/ff239c9d-e4ff-4acc-bad5-bd55648c212e_agents_1/scenario.py b/scenarios/argoverse/vehicle_following/ff239c9d-e4ff-4acc-bad5-bd55648c212e_agents_1/scenario.py new file mode 100644 index 0000000000..06f0893183 --- /dev/null +++ b/scenarios/argoverse/vehicle_following/ff239c9d-e4ff-4acc-bad5-bd55648c212e_agents_1/scenario.py @@ -0,0 +1,31 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t +from smarts.core.colors import Colors + + +scenario_id = "ff239c9d-e4ff-4acc-bad5-bd55648c212e" +scenario_path = None + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +ego_mission = [t.EndlessMission(begin=("road-202833190-202832889-202833142", 0, "max"))] + +leader_id = "history-vehicle-46408$" +# runtime = 11 +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + scenario_metadata=t.ScenarioMetadata(leader_id, Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/vehicle_following/ff6dc43b-dd27-4fe4-94b6-5c1b3940daed_agents_1/scenario.py b/scenarios/argoverse/vehicle_following/ff6dc43b-dd27-4fe4-94b6-5c1b3940daed_agents_1/scenario.py new file mode 100644 index 0000000000..69393f7c45 --- /dev/null +++ b/scenarios/argoverse/vehicle_following/ff6dc43b-dd27-4fe4-94b6-5c1b3940daed_agents_1/scenario.py @@ -0,0 +1,31 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t +from smarts.core.colors import Colors + + +scenario_id = "ff6dc43b-dd27-4fe4-94b6-5c1b3940daed" +scenario_path = None + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +ego_mission = [t.EndlessMission(begin=("road-243772234-243772033", 1, 10.9))] + +leader_id = "history-vehicle-40031$" +# runtime = 11 +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + scenario_metadata=t.ScenarioMetadata(leader_id, Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/vehicle_following/ff9619b5-b0c0-4942-b5d8-df6a5814f8a2_agents_1/scenario.py b/scenarios/argoverse/vehicle_following/ff9619b5-b0c0-4942-b5d8-df6a5814f8a2_agents_1/scenario.py new file mode 100644 index 0000000000..3426703175 --- /dev/null +++ b/scenarios/argoverse/vehicle_following/ff9619b5-b0c0-4942-b5d8-df6a5814f8a2_agents_1/scenario.py @@ -0,0 +1,33 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t +from smarts.core.colors import Colors + + +scenario_id = "ff9619b5-b0c0-4942-b5d8-df6a5814f8a2" # e.g. "0000b6ab-e100-4f6b-aee8-b520b57c0530" +scenario_path = None + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +ego_mission = [ + t.EndlessMission(begin=("road-358009253-358009468", 1, 0.7), start_time=1) +] + +leader_id = "history-vehicle-15518$" +# runtime = 11 +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + scenario_metadata=t.ScenarioMetadata(leader_id, Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/argoverse/vehicle_following/ffd10ec2-715b-48af-a89d-b11f79927f63_agents_1/scenario.py b/scenarios/argoverse/vehicle_following/ffd10ec2-715b-48af-a89d-b11f79927f63_agents_1/scenario.py new file mode 100644 index 0000000000..17d4879ba7 --- /dev/null +++ b/scenarios/argoverse/vehicle_following/ffd10ec2-715b-48af-a89d-b11f79927f63_agents_1/scenario.py @@ -0,0 +1,35 @@ +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio import types as t +from smarts.core.colors import Colors + + +scenario_id = "ffd10ec2-715b-48af-a89d-b11f79927f63" +scenario_path = None + +traffic_histories = [ + t.TrafficHistoryDataset( + name=f"argoverse_{scenario_id}", + source_type="Argoverse", + input_path=scenario_path, + ) +] + +ego_mission = [ + t.EndlessMission( + begin=("road-190016713-190015427-190016290-190015703", 1, 0.7), start_time=1 + ) +] + +leader_id = "history-vehicle-56304$" +# runtime = 11 +gen_scenario( + t.Scenario( + ego_missions=ego_mission, + map_spec=t.MapSpec(source=f"{scenario_path}", lanepoint_spacing=1.0), + traffic_histories=traffic_histories, + scenario_metadata=t.ScenarioMetadata(leader_id, Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/intersections/1_to_3lane_left_turn_c_agents_1/map.net.xml b/scenarios/sumo/intersections/1_to_3lane_left_turn_c_agents_1/map.net.xml new file mode 100644 index 0000000000..3f66d5c793 --- /dev/null +++ b/scenarios/sumo/intersections/1_to_3lane_left_turn_c_agents_1/map.net.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/intersections/1_to_3lane_left_turn_c_agents_1/scenario.py b/scenarios/sumo/intersections/1_to_3lane_left_turn_c_agents_1/scenario.py new file mode 100644 index 0000000000..000193efa2 --- /dev/null +++ b/scenarios/sumo/intersections/1_to_3lane_left_turn_c_agents_1/scenario.py @@ -0,0 +1,100 @@ +# Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +import random +from itertools import combinations +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import Flow, Mission, Route, Scenario, Traffic, TrafficActor + +normal = TrafficActor( + name="car", +) + +vertical_routes = [ + ("E2", 0, "E7", 0), + ("E8", 0, "E1", 1), +] + +horizontal_routes = [ + ("E3", 0, "E5", 0), + ("E3", 1, "E5", 1), + ("E3", 2, "E5", 2), + ("E6", 1, "E4", 1), + ("E6", 0, "E4", 0), +] + +turn_left_routes = [ + ("E8", 0, "E5", 2), + ("E6", 1, "E1", 1), + ("E2", 1, "E4", 1), + ("E3", 2, "E7", 0), +] + +turn_right_routes = [ + ("E6", 0, "E7", 0), + ("E3", 0, "E1", 0), + ("E2", 0, "E5", 0), + ("E8", 0, "E4", 0), +] + +# Total route combinations = 14C1 + 14C2 + 14C3 + 14C4 = 1470 +all_routes = vertical_routes + horizontal_routes + turn_left_routes + turn_right_routes +route_comb = [com for elems in range(4, 5) for com in combinations(all_routes, elems)] +traffic = {} +for name, routes in enumerate(route_comb): + traffic[str(name)] = Traffic( + flows=[ + Flow( + route=Route( + begin=(f"{r[0]}", r[1], 0), + end=(f"{r[2]}", r[3], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(2, 5), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 3), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60 * 15, + actors={normal: 1}, + ) + for r in routes + ] + ) + +route = Route(begin=("E8", 0, 5), end=("E5", 0, "max")) +ego_missions = [ + Mission( + route=route, + start_time=15, # Delayed start, to ensure road has prior traffic. + ) +] +# runtime = 14 +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/intersections/1_to_3lane_left_turn_middle_lane_c_agents_1/map.net.xml b/scenarios/sumo/intersections/1_to_3lane_left_turn_middle_lane_c_agents_1/map.net.xml new file mode 100644 index 0000000000..3f66d5c793 --- /dev/null +++ b/scenarios/sumo/intersections/1_to_3lane_left_turn_middle_lane_c_agents_1/map.net.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/intersections/1_to_3lane_left_turn_middle_lane_c_agents_1/scenario.py b/scenarios/sumo/intersections/1_to_3lane_left_turn_middle_lane_c_agents_1/scenario.py new file mode 100644 index 0000000000..2b8a70c07a --- /dev/null +++ b/scenarios/sumo/intersections/1_to_3lane_left_turn_middle_lane_c_agents_1/scenario.py @@ -0,0 +1,100 @@ +# Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +import random +from itertools import combinations +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import Flow, Mission, Route, Scenario, Traffic, TrafficActor + +normal = TrafficActor( + name="car", +) + +vertical_routes = [ + ("E2", 0, "E7", 0), + ("E8", 0, "E1", 1), +] + +horizontal_routes = [ + ("E3", 0, "E5", 0), + ("E3", 1, "E5", 1), + ("E3", 2, "E5", 2), + ("E6", 1, "E4", 1), + ("E6", 0, "E4", 0), +] + +turn_left_routes = [ + ("E8", 0, "E5", 2), + ("E6", 1, "E1", 1), + ("E2", 1, "E4", 1), + ("E3", 2, "E7", 0), +] + +turn_right_routes = [ + ("E6", 0, "E7", 0), + ("E3", 0, "E1", 0), + ("E2", 0, "E5", 0), + ("E8", 0, "E4", 0), +] + +# Total route combinations = 14C1 + 14C2 + 14C3 + 14C4 = 1470 +all_routes = vertical_routes + horizontal_routes + turn_left_routes + turn_right_routes +route_comb = [com for elems in range(4, 5) for com in combinations(all_routes, elems)] +traffic = {} +for name, routes in enumerate(route_comb): + traffic[str(name)] = Traffic( + flows=[ + Flow( + route=Route( + begin=(f"{r[0]}", r[1], 0), + end=(f"{r[2]}", r[3], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(5, 10), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 3), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60 * 15, + actors={normal: 1}, + ) + for r in routes + ] + ) + +route = Route(begin=("E8", 0, 5), end=("E5", 1, "max")) +ego_missions = [ + Mission( + route=route, + start_time=15, # Delayed start, to ensure road has prior traffic. + ) +] +# runtime = 14 +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/straight/cruise_2lane_agents_1/map.net.xml b/scenarios/sumo/straight/cruise_2lane_agents_1/map.net.xml new file mode 100644 index 0000000000..b313395d59 --- /dev/null +++ b/scenarios/sumo/straight/cruise_2lane_agents_1/map.net.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/scenarios/sumo/straight/cruise_2lane_agents_1/scenario.py b/scenarios/sumo/straight/cruise_2lane_agents_1/scenario.py new file mode 100644 index 0000000000..e8352c2813 --- /dev/null +++ b/scenarios/sumo/straight/cruise_2lane_agents_1/scenario.py @@ -0,0 +1,97 @@ +# Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +import random +from itertools import combinations +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + Flow, + Mission, + Route, + Scenario, + Traffic, + TrafficActor, +) + +normal = TrafficActor( + name="car", + speed=Distribution(sigma=0.3, mean=1.0), +) + +# flow_name = (start_lane, end_lane,) +route_opt = [ + (0, 0), + (1, 1), +] + +# Traffic combinations = 3C2 + 3C3 = 3 + 1 = 4 +# Repeated traffic combinations = 4 * 100 = 400 +min_flows = 2 +max_flows = 2 +route_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(route_opt, elems) +] * 100 + +traffic = {} +for name, routes in enumerate(route_comb): + traffic[str(name)] = Traffic( + flows=[ + Flow( + route=Route( + begin=("gneE3", r[0], 0), + end=("gneE3", r[1], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(5, 10), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 5), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60 * 15, + actors={normal: 1}, + randomly_spaced=True, + ) + for r in routes + ] + ) + + +route = Route(begin=("gneE3", 0, 5), end=("gneE3", 1, "max")) +ego_missions = [ + Mission( + route=route, + start_time=17, # Delayed start, to ensure road has prior traffic. + ) +] +# runtime = 17 +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/straight/cutin_2lane_agents_1/map.net.xml b/scenarios/sumo/straight/cutin_2lane_agents_1/map.net.xml new file mode 100644 index 0000000000..9aad8e59fb --- /dev/null +++ b/scenarios/sumo/straight/cutin_2lane_agents_1/map.net.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/straight/cutin_2lane_agents_1/scenario.py b/scenarios/sumo/straight/cutin_2lane_agents_1/scenario.py new file mode 100644 index 0000000000..3bfd935e2b --- /dev/null +++ b/scenarios/sumo/straight/cutin_2lane_agents_1/scenario.py @@ -0,0 +1,85 @@ +import random +from itertools import combinations +from pathlib import Path +from numpy import random + +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + Flow, + Mission, + Route, + Scenario, + SmartsLaneChangingModel, + Traffic, + TrafficActor, +) + +normal = TrafficActor( + name="car", + sigma=1, + speed=Distribution(sigma=0.3, mean=1.5), + min_gap=Distribution(sigma=0, mean=1), + lane_changing_model=SmartsLaneChangingModel( + cutin_prob=1, assertive=10, dogmatic=True, slow_down_after=0.7, hold_period=5 + ), +) + +# flow_name = (start_lane, end_lane,) +route_opt = [ + (0, 0), + (1, 1), +] + +# Traffic combinations = 3C2 + 3C3 = 3 + 1 = 4 +# Repeated traffic combinations = 4 * 100 = 400 +min_flows = 1 +max_flows = 3 +route_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(route_opt, elems) +] + +traffic = {} +for name, routes in enumerate(route_comb): + traffic[str(name)] = Traffic( + engine="SMARTS", + flows=[ + Flow( + route=Route( + begin=("gneE3", r[0], 0), + end=("gneE3", r[1], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(5, 10), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 5), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60, + actors={normal: 1}, + randomly_spaced=True, + ) + for r in routes + ], + ) + + +route = Route(begin=("gneE3", 1, 5), end=("gneE3", 1, "max")) +ego_missions = [ + Mission( + route=route, + start_time=10, # Delayed start, to ensure road has prior traffic. + ) +] + +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/straight/merge_exit_sumo_t_agents_1/map.net.xml b/scenarios/sumo/straight/merge_exit_sumo_t_agents_1/map.net.xml new file mode 100644 index 0000000000..65a0fb2e73 --- /dev/null +++ b/scenarios/sumo/straight/merge_exit_sumo_t_agents_1/map.net.xml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/straight/merge_exit_sumo_t_agents_1/scenario.py b/scenarios/sumo/straight/merge_exit_sumo_t_agents_1/scenario.py new file mode 100644 index 0000000000..3fb02f5f19 --- /dev/null +++ b/scenarios/sumo/straight/merge_exit_sumo_t_agents_1/scenario.py @@ -0,0 +1,100 @@ +import random +from itertools import combinations, product +from pathlib import Path + +from smarts.core.colors import Colors +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + EndlessMission, + Flow, + Route, + Scenario, + ScenarioMetadata, + Traffic, + TrafficActor, + TrapEntryTactic, + Trip, + MapSpec, + Mission, +) + +normal = TrafficActor( + name="car", + speed=Distribution(sigma=0, mean=1.0), +) + + +# Social path = (start_lane, end_lane) +social_paths = [ + (0, 0), + (0, 1), + (0, 2), + (1, 0), + (1, 1), + (1, 2), + (2, 0), + (2, 1), + (2, 2), +] +min_flows = 2 +max_flows = 4 +social_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(social_paths, elems) +] + +# Leader path = (start_lane, end_lane) +leader_paths = [0, 1, 2] + +# Overall routes +route_comb = product(social_comb, leader_paths) + +traffic = {} +for name, (social_path, leader_path) in enumerate(route_comb): + traffic[str(name)] = Traffic( + engine="SUMO", + flows=[ + Flow( + route=Route( + begin=("E1", r[0], 0), + end=("E3", r[1], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(1, 3), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 5), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60 * 15, + actors={normal: 1}, + randomly_spaced=True, + ) + for r in social_path + ], + ) + +ego_missions = [ + Mission( + route=Route(begin=("E0", 2, 5), end=("E4", 0, "max")), + start_time=30, + entry_tactic=TrapEntryTactic( + start_time=30, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ) # Delayed start, to ensure road has prior traffic. +] + +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + map_spec=MapSpec( + source=Path(__file__).resolve().parents[0], lanepoint_spacing=1.0 + ), + scenario_metadata=ScenarioMetadata("Leader-007", Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/straight/overtake_2lane_agents_1/map.net.xml b/scenarios/sumo/straight/overtake_2lane_agents_1/map.net.xml new file mode 100644 index 0000000000..b313395d59 --- /dev/null +++ b/scenarios/sumo/straight/overtake_2lane_agents_1/map.net.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/scenarios/sumo/straight/overtake_2lane_agents_1/scenario.py b/scenarios/sumo/straight/overtake_2lane_agents_1/scenario.py new file mode 100644 index 0000000000..b1c57e6161 --- /dev/null +++ b/scenarios/sumo/straight/overtake_2lane_agents_1/scenario.py @@ -0,0 +1,97 @@ +# Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +import random +from itertools import combinations +from pathlib import Path + +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + Flow, + Mission, + Route, + Scenario, + Traffic, + TrafficActor, +) + +normal = TrafficActor( + name="car", + speed=Distribution(sigma=0.2, mean=0.5), +) + +# flow_name = (start_lane, end_lane,) +route_opt = [ + (0, 0), + (1, 1), +] + +# Traffic combinations = 3C2 + 3C3 = 3 + 1 = 4 +# Repeated traffic combinations = 4 * 100 = 400 +min_flows = 2 +max_flows = 2 +route_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(route_opt, elems) +] * 100 + +traffic = {} +for name, routes in enumerate(route_comb): + traffic[str(name)] = Traffic( + flows=[ + Flow( + route=Route( + begin=("gneE3", r[0], 0), + end=("gneE3", r[1], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(5, 10), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 5), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60 * 15, + actors={normal: 1}, + randomly_spaced=True, + ) + for r in routes + ] + ) + + +route = Route(begin=("gneE3", 0, 5), end=("gneE3", 1, "max")) +ego_missions = [ + Mission( + route=route, + start_time=17, # Delayed start, to ensure road has prior traffic. + ) +] +# runtime = 15 +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/vehicle_following/merge_exit_sumo_agents_1/map.net.xml b/scenarios/sumo/vehicle_following/merge_exit_sumo_agents_1/map.net.xml new file mode 100644 index 0000000000..d0a6ab3b0d --- /dev/null +++ b/scenarios/sumo/vehicle_following/merge_exit_sumo_agents_1/map.net.xml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/vehicle_following/merge_exit_sumo_agents_1/scenario.py b/scenarios/sumo/vehicle_following/merge_exit_sumo_agents_1/scenario.py new file mode 100644 index 0000000000..ee7584228a --- /dev/null +++ b/scenarios/sumo/vehicle_following/merge_exit_sumo_agents_1/scenario.py @@ -0,0 +1,98 @@ +import random +from itertools import combinations, product +from pathlib import Path + +from smarts.core.colors import Colors +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + EndlessMission, + Flow, + Route, + Scenario, + ScenarioMetadata, + Traffic, + TrafficActor, + TrapEntryTactic, + Trip, + MapSpec, + Mission, +) + +normal = TrafficActor( + name="car", + speed=Distribution(sigma=0, mean=1.0), +) + +leader = TrafficActor( + name="Leader-007", + depart_speed=0, + speed=Distribution(sigma=0.2, mean=0.8), +) + +# Social path = (start_lane, end_lane) +social_paths = [ + (0, 0), + (0, 1), + (0, 2), + (1, 0), + (1, 1), + (1, 2), + (2, 0), + (2, 1), + (2, 2), +] +min_flows = 2 +max_flows = 4 +social_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(social_paths, elems) +] + +# Leader path = (start_lane, end_lane) +leader_paths = [0, 1, 2] + +# Overall routes +route_comb = product(social_comb, leader_paths) + +traffic = {} +for name, (social_path, leader_path) in enumerate(route_comb): + traffic[str(name)] = Traffic( + engine="SUMO", + flows=[], + trips=[ + Trip( + vehicle_name="Leader-007", + route=Route( + begin=("E0", leader_path, 25), + end=("E4", 0, "max"), + ), + actor=leader, + vehicle_type="truck", + ), + ], + ) +ego_missions = [] +lane_idx = [0, 1, 2] +for i in lane_idx: + ego_missions.append( + EndlessMission( + begin=("E0", i, 5), + entry_tactic=TrapEntryTactic( + start_time=1, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ) + ) + +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + map_spec=MapSpec( + source=Path(__file__).resolve().parents[0], lanepoint_spacing=1.0 + ), + scenario_metadata=ScenarioMetadata("Leader-007", Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_1/map.net.xml b/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_1/map.net.xml new file mode 100644 index 0000000000..d0a6ab3b0d --- /dev/null +++ b/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_1/map.net.xml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_1/scenario.py b/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_1/scenario.py new file mode 100644 index 0000000000..9216e346e1 --- /dev/null +++ b/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_1/scenario.py @@ -0,0 +1,118 @@ +import random +from itertools import combinations, product +from pathlib import Path + +from smarts.core.colors import Colors +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + EndlessMission, + Flow, + Route, + Scenario, + ScenarioMetadata, + Traffic, + TrafficActor, + TrapEntryTactic, + Trip, + MapSpec, + Mission, + JunctionModel, +) + +normal = TrafficActor( + name="car", + speed=Distribution(sigma=0.2, mean=0.7), +) + +leader = TrafficActor( + name="Leader-007", + depart_speed=0, + speed=Distribution(sigma=0, mean=1), + junction_model=JunctionModel(impatience=1), +) + +# Social path = (start_lane, end_lane) +social_paths = [ + (0, 0), + (0, 1), + (0, 2), + (1, 0), + (1, 1), + (1, 2), + (2, 0), + (2, 1), + (2, 2), +] +min_flows = 2 +max_flows = 4 +social_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(social_paths, elems) +] + +# Leader path = (start_lane, end_lane) +leader_paths = [0, 1, 2] + +# Overall routes +route_comb = product(social_comb, leader_paths) + +traffic = {} +for name, (social_path, leader_path) in enumerate(route_comb): + traffic[str(name)] = Traffic( + engine="SUMO", + flows=[ + Flow( + route=Route( + begin=("E1", r[0], 0), + end=("E3", r[1], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(1, 5), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 5), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60 * 15, + actors={normal: 1}, + randomly_spaced=True, + ) + for r in social_path + ], + trips=[ + Trip( + vehicle_name="Leader-007", + route=Route( + begin=("E0", leader_path, 25), + end=("E4", 0, "max"), + ), + depart=30, + actor=leader, + vehicle_type="truck", + ), + ], + ) + +ego_missions = [ + EndlessMission( + begin=("E0", 2, 5), + entry_tactic=TrapEntryTactic( + start_time=31, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ) # Delayed start, to ensure road has prior traffic. +] + +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + map_spec=MapSpec( + source=Path(__file__).resolve().parents[0], lanepoint_spacing=1.0 + ), + scenario_metadata=ScenarioMetadata("Leader-007", Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_2/map.net.xml b/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_2/map.net.xml new file mode 100644 index 0000000000..d0a6ab3b0d --- /dev/null +++ b/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_2/map.net.xml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_2/scenario.py b/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_2/scenario.py new file mode 100644 index 0000000000..9b0d8a3aef --- /dev/null +++ b/scenarios/sumo/vehicle_following/merge_exit_sumo_t_agents_2/scenario.py @@ -0,0 +1,124 @@ +import random +from itertools import combinations, product +from pathlib import Path + +from smarts.core.colors import Colors +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + EndlessMission, + Flow, + Route, + Scenario, + ScenarioMetadata, + Traffic, + TrafficActor, + TrapEntryTactic, + Trip, + MapSpec, + Mission, + JunctionModel, +) + +normal = TrafficActor( + name="car", + speed=Distribution(sigma=0.2, mean=0.7), +) + +leader = TrafficActor( + name="Leader-007", + depart_speed=0, + speed=Distribution(sigma=0.1, mean=0.9), + junction_model=JunctionModel(impatience=1), +) + +# Social path = (start_lane, end_lane) +social_paths = [ + (0, 0), + (0, 1), + (0, 2), + (1, 0), + (1, 1), + (1, 2), + (2, 0), + (2, 1), + (2, 2), +] +min_flows = 2 +max_flows = 4 +social_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(social_paths, elems) +] + +# Leader path = (start_lane, end_lane) +leader_paths = [0, 1, 2] + +# Overall routes +route_comb = product(social_comb, leader_paths) + +traffic = {} +for name, (social_path, leader_path) in enumerate(route_comb): + traffic[str(name)] = Traffic( + engine="SUMO", + flows=[ + Flow( + route=Route( + begin=("E1", r[0], 0), + end=("E3", r[1], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(1, 5), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 5), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60 * 15, + actors={normal: 1}, + randomly_spaced=True, + ) + for r in social_path + ], + trips=[ + Trip( + vehicle_name="Leader-007", + route=Route( + begin=("E0", leader_path, 25), + end=("E4", 0, "max"), + ), + depart=30, + actor=leader, + vehicle_type="truck", + ), + ], + ) + +ego_missions = [ + EndlessMission( + begin=("E0", 2, 5), + entry_tactic=TrapEntryTactic( + start_time=31, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ), + EndlessMission( + begin=("E0", 1, 10), + entry_tactic=TrapEntryTactic( + start_time=31, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ), +] + +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + map_spec=MapSpec( + source=Path(__file__).resolve().parents[0], lanepoint_spacing=1.0 + ), + scenario_metadata=ScenarioMetadata("Leader-007", Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/vehicle_following/straight_2lane_sumo_agents_1/map.net.xml b/scenarios/sumo/vehicle_following/straight_2lane_sumo_agents_1/map.net.xml new file mode 100644 index 0000000000..a3439bc75f --- /dev/null +++ b/scenarios/sumo/vehicle_following/straight_2lane_sumo_agents_1/map.net.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/vehicle_following/straight_2lane_sumo_agents_1/scenario.py b/scenarios/sumo/vehicle_following/straight_2lane_sumo_agents_1/scenario.py new file mode 100644 index 0000000000..05c204e8fc --- /dev/null +++ b/scenarios/sumo/vehicle_following/straight_2lane_sumo_agents_1/scenario.py @@ -0,0 +1,83 @@ +import random +from itertools import combinations, product +from pathlib import Path + +from smarts.core.colors import Colors +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + EndlessMission, + Flow, + Route, + Scenario, + ScenarioMetadata, + Traffic, + TrafficActor, + TrapEntryTactic, + Trip, +) + +normal = TrafficActor( + name="car", + depart_speed=0, + speed=Distribution(mean=1, sigma=0.2), +) + +leader = TrafficActor(name="Leader-007", depart_speed=0) + +# Social path = (start_lane, end_lane) +social_paths = [ + (0, 0), + (0, 1), + (1, 0), + (1, 1), +] +min_flows = 2 +max_flows = 3 +social_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(social_paths, elems) +] * 10 + +# Leader path = (start_lane, end_lane) +leader_paths = [(0, 0), (0, 1)] + +# Overall routes +route_comb = product(social_comb, leader_paths) + +traffic = {} +for name, (social_path, leader_path) in enumerate(route_comb): + traffic[str(name)] = Traffic( + engine="SUMO", + flows=[], + trips=[ + Trip( + vehicle_name="Leader-007", + route=Route( + begin=("E0", 1, 15), + end=("E1.243", leader_path[1], "max"), + ), + actor=leader, + vehicle_type="truck", + ), + ], + ) + +ego_missions = [ + EndlessMission( + begin=("E0", 1, 5), + entry_tactic=TrapEntryTactic( + start_time=1, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ) # Delayed start, to ensure road has prior traffic. +] + +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + scenario_metadata=ScenarioMetadata("Leader-007", Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/vehicle_following/straight_2lane_sumo_t_agents_1/map.net.xml b/scenarios/sumo/vehicle_following/straight_2lane_sumo_t_agents_1/map.net.xml new file mode 100644 index 0000000000..a3439bc75f --- /dev/null +++ b/scenarios/sumo/vehicle_following/straight_2lane_sumo_t_agents_1/map.net.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/vehicle_following/straight_2lane_sumo_t_agents_1/scenario.py b/scenarios/sumo/vehicle_following/straight_2lane_sumo_t_agents_1/scenario.py new file mode 100644 index 0000000000..fd221ea1e3 --- /dev/null +++ b/scenarios/sumo/vehicle_following/straight_2lane_sumo_t_agents_1/scenario.py @@ -0,0 +1,103 @@ +import random +from itertools import combinations, product +from pathlib import Path + +from smarts.core.colors import Colors +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + EndlessMission, + Flow, + Route, + Scenario, + ScenarioMetadata, + Traffic, + TrafficActor, + TrapEntryTactic, + Trip, +) + +normal = TrafficActor( + name="car", + depart_speed=0, + speed=Distribution(mean=1, sigma=0.2), +) + +leader = TrafficActor(name="Leader-007", depart_speed=0) + +# Social path = (start_lane, end_lane) +social_paths = [ + (0, 0), + (0, 1), + (1, 0), + (1, 1), +] +min_flows = 2 +max_flows = 3 +social_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(social_paths, elems) +] * 10 + +# Leader path = (start_lane, end_lane) +leader_paths = [(0, 0), (0, 1)] + +# Overall routes +route_comb = product(social_comb, leader_paths) + +traffic = {} +for name, (social_path, leader_path) in enumerate(route_comb): + traffic[str(name)] = Traffic( + engine="SUMO", + flows=[ + Flow( + route=Route( + begin=("E0", 0, 0), + end=("E1.243", r[1], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(3, 6), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 5), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60 * 15, + actors={normal: 1}, + randomly_spaced=True, + ) + for r in social_path + ], + trips=[ + Trip( + vehicle_name="Leader-007", + route=Route( + begin=("E0", 1, 15), + end=("E1.243", leader_path[1], "max"), + ), + depart=19, + actor=leader, + vehicle_type="truck", + ), + ], + ) + +ego_missions = [ + EndlessMission( + begin=("E0", 1, 5), + entry_tactic=TrapEntryTactic( + start_time=20, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ) # Delayed start, to ensure road has prior traffic. +] + +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + scenario_metadata=ScenarioMetadata("Leader-007", Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/vehicle_following/straight_3lanes_sumo_agents_1/map.net.xml b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_agents_1/map.net.xml new file mode 100644 index 0000000000..79dedfb7a9 --- /dev/null +++ b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_agents_1/map.net.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/vehicle_following/straight_3lanes_sumo_agents_1/scenario.py b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_agents_1/scenario.py new file mode 100644 index 0000000000..2b22d4eacf --- /dev/null +++ b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_agents_1/scenario.py @@ -0,0 +1,78 @@ +import random +from itertools import combinations, product +from pathlib import Path + +from smarts.core.colors import Colors +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + EndlessMission, + Flow, + Route, + Scenario, + ScenarioMetadata, + Traffic, + TrafficActor, + TrapEntryTactic, + Trip, +) + +normal = TrafficActor( + name="car", + depart_speed=0, + min_gap=Distribution(mean=3, sigma=0), + speed=Distribution(mean=0.7, sigma=0), +) + +leader = TrafficActor(name="Leader-007", depart_speed=0) + +# Social path = (start_lane, end_lane) +social_paths = [(0, 0), (0, 2), (2, 0), (2, 2)] +min_flows = 2 +max_flows = 4 +social_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(social_paths, elems) +] + +# Leader path = (start_lane, end_lane) +leader_paths = [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)] + +# Overall routes +route_comb = product(social_comb, leader_paths) +traffic = {} +for name, (social_path, leader_path) in enumerate(route_comb): + traffic[str(name)] = Traffic( + engine="SUMO", + flows=[], + trips=[ + Trip( + vehicle_name="Leader-007", + route=Route( + begin=("E0", 1, 30), + end=("E_end", leader_path[1], "max"), + ), + actor=leader, + vehicle_type="truck", + ), + ], + ) + +ego_missions = [ + EndlessMission( + begin=("E0", 1, 20), + entry_tactic=TrapEntryTactic( + start_time=1, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ) # Delayed start, to ensure road has prior traffic. +] + +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + scenario_metadata=ScenarioMetadata("Leader-007", Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_1/map.net.xml b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_1/map.net.xml new file mode 100644 index 0000000000..79dedfb7a9 --- /dev/null +++ b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_1/map.net.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_1/scenario.py b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_1/scenario.py new file mode 100644 index 0000000000..3abafa5899 --- /dev/null +++ b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_1/scenario.py @@ -0,0 +1,100 @@ +import random +from itertools import combinations, product +from pathlib import Path + +from smarts.core.colors import Colors +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + EndlessMission, + Flow, + Route, + Scenario, + ScenarioMetadata, + Traffic, + TrafficActor, + TrapEntryTactic, + Trip, +) + +normal = TrafficActor( + name="car", + depart_speed=0, + # min_gap=Distribution(mean=3, sigma=0), + speed=Distribution(mean=0.7, sigma=0.2), +) + +leader = TrafficActor( + name="Leader-007", depart_speed=0, speed=Distribution(mean=0.9, sigma=0.1) +) + +# Social path = (start_lane, end_lane) +social_paths = [(0, 0), (0, 2), (2, 0), (2, 2)] +min_flows = 2 +max_flows = 4 +social_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(social_paths, elems) +] + +# Leader path = (start_lane, end_lane) +leader_paths = [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)] + +# Overall routes +route_comb = product(social_comb, leader_paths) +traffic = {} +for name, (social_path, leader_path) in enumerate(route_comb): + traffic[str(name)] = Traffic( + engine="SUMO", + flows=[ + Flow( + route=Route( + begin=("E0", r[1], 0), + end=("E_end", r[1], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(3, 5), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 5), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60 * 15, + actors={normal: 1}, + randomly_spaced=True, + ) + for r in social_path + ], + trips=[ + Trip( + vehicle_name="Leader-007", + route=Route( + begin=("E0", 1, 30), + end=("E_end", leader_path[1], "max"), + ), + depart=30, + actor=leader, + vehicle_type="truck", + ), + ], + ) + +ego_missions = [ + EndlessMission( + begin=("E0", 1, 20), + entry_tactic=TrapEntryTactic( + start_time=31, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ) # Delayed start, to ensure road has prior traffic. +] + +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + scenario_metadata=ScenarioMetadata("Leader-007", Colors.Blue), + ), + output_dir=Path(__file__).parent, +) diff --git a/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_2/map.net.xml b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_2/map.net.xml new file mode 100644 index 0000000000..4bc4dd91a0 --- /dev/null +++ b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_2/map.net.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_2/scenario.py b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_2/scenario.py new file mode 100644 index 0000000000..f768de2614 --- /dev/null +++ b/scenarios/sumo/vehicle_following/straight_3lanes_sumo_t_agents_2/scenario.py @@ -0,0 +1,107 @@ +import random +from itertools import combinations, product +from pathlib import Path + +from smarts.core.colors import Colors +from smarts.sstudio import gen_scenario +from smarts.sstudio.types import ( + Distribution, + EndlessMission, + Flow, + Route, + Scenario, + ScenarioMetadata, + Traffic, + TrafficActor, + TrapEntryTactic, + Trip, +) + +normal = TrafficActor( + name="car", + depart_speed=0, + # min_gap=Distribution(mean=3, sigma=0), + speed=Distribution(mean=0.7, sigma=0.2), +) + +leader = TrafficActor( + name="Leader-007", depart_speed=0, speed=Distribution(mean=0.9, sigma=0.1) +) + +# Social path = (start_lane, end_lane) +social_paths = [(0, 0), (0, 2), (2, 0), (2, 2)] +min_flows = 2 +max_flows = 4 +social_comb = [ + com + for elems in range(min_flows, max_flows + 1) + for com in combinations(social_paths, elems) +] + +# Leader path = (start_lane, end_lane) +leader_paths = [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)] + +# Overall routes +route_comb = product(social_comb, leader_paths) +traffic = {} +for name, (social_path, leader_path) in enumerate(route_comb): + traffic[str(name)] = Traffic( + engine="SUMO", + flows=[ + Flow( + route=Route( + begin=("E0", 0, 0), + end=("E_end", r[1], "max"), + ), + # Random flow rate, between x and y vehicles per minute. + rate=60 * random.uniform(3, 5), + # Random flow start time, between x and y seconds. + begin=random.uniform(0, 5), + # For an episode with maximum_episode_steps=3000 and step + # time=0.1s, maximum episode time=300s. Hence, traffic set to + # end at 900s, which is greater than maximum episode time of + # 300s. + end=60 * 15, + actors={normal: 1}, + randomly_spaced=True, + ) + for r in social_path + ], + trips=[ + Trip( + vehicle_name="Leader-007", + route=Route( + begin=("E0", 1, 30), + end=("E_end", leader_path[1], "max"), + ), + depart=30, + actor=leader, + vehicle_type="truck", + ), + ], + ) + +ego_missions = [ + EndlessMission( + begin=("E0", 1, 20), + entry_tactic=TrapEntryTactic( + start_time=31, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ), + EndlessMission( + begin=("E0", 1, 10), + start_time=31, + entry_tactic=TrapEntryTactic( + start_time=31, wait_to_hijack_limit_s=0, default_entry_speed=0 + ), + ), +] + +gen_scenario( + scenario=Scenario( + traffic=traffic, + ego_missions=ego_missions, + scenario_metadata=ScenarioMetadata("Leader-007", Colors.Blue), + ), + output_dir=Path(__file__).parent, +)