sumocr.scenario package
Submodules
sumocr.scenario.abstract_scenario_wrapper module
sumocr.scenario.scenario_wrapper module
- class sumocr.scenario.scenario_wrapper.ScenarioWrapper[source]
Bases:
AbstractScenarioWrapper
- get_rou_file()[source]
Gets the net file configured in the cfg file.
- Parameters:
sumo_cfg_file – SUMO config file (.sumocfg)
- Return type:
str
- Returns:
net-file specified in the config file
- classmethod init_from_scenario(config, scenario_path=<class 'str'>, ego_start_time=None, cr_map_file=None)[source]
Initializes the ScenarioWrapper according to the given scenario_name/ego_start_time and returns the ScenarioWrapper. :type config:
DefaultConfig
:param config: config file for the initialization, contain scenario_name. :type scenario_path: :param scenario_path: path to the scenario folder :type ego_start_time:Optional
[int
] :param ego_start_time: the start time of the ego vehicle. :type cr_map_file: :param cr_map_file: path to commonroad map, if not in scenario folder- Return type:
- initialize(scenario_name, sumo_cfg_file, cr_map_file, ego_start_time=None)[source]
Initializes the ScenarioWrapper.
- Parameters:
scenario_name (
str
) – the name of the scenariosumo_cfg_file (
str
) – the .sumocfg filecr_map_file (
str
) – the commonroad map fileego_start_time (
Optional
[int
]) – the start time of the ego vehicle
- Return type:
None
Module contents
- class sumocr.scenario.AbstractScenarioWrapper[source]
Bases:
object
- property initial_scenario: Scenario
- property lanelet_network: LaneletNetwork
- planning_problem_set = None
- sumo_cfg_file = ''
- class sumocr.scenario.ScenarioWrapper[source]
Bases:
AbstractScenarioWrapper
- get_rou_file()[source]
Gets the net file configured in the cfg file.
- Parameters:
sumo_cfg_file – SUMO config file (.sumocfg)
- Return type:
str
- Returns:
net-file specified in the config file
- classmethod init_from_scenario(config, scenario_path=<class 'str'>, ego_start_time=None, cr_map_file=None)[source]
Initializes the ScenarioWrapper according to the given scenario_name/ego_start_time and returns the ScenarioWrapper. :type config:
DefaultConfig
:param config: config file for the initialization, contain scenario_name. :type scenario_path: :param scenario_path: path to the scenario folder :type ego_start_time:Optional
[int
] :param ego_start_time: the start time of the ego vehicle. :type cr_map_file: :param cr_map_file: path to commonroad map, if not in scenario folder- Return type:
- initialize(scenario_name, sumo_cfg_file, cr_map_file, ego_start_time=None)[source]
Initializes the ScenarioWrapper.
- Parameters:
scenario_name (
str
) – the name of the scenariosumo_cfg_file (
str
) – the .sumocfg filecr_map_file (
str
) – the commonroad map fileego_start_time (
Optional
[int
]) – the start time of the ego vehicle
- Return type:
None