def __init__(self, filename): self.xml_tree = ET.parse(filename) self._validate_openscenario_configuration() self.other_actors = [] self.ego_vehicles = [] self.trigger_points = [] self.weather = WeatherConfiguration() self.storyboard = self.xml_tree.find("Storyboard") self.story = self.storyboard.find("Story") self.init = self.storyboard.find("Init") self._parse_openscenario_configuration()
def __init__(self, filename, client): self.xml_tree = ET.parse(filename) self._set_global_parameters() self._validate_openscenario_configuration() self.client = client self.catalogs = {} self.other_actors = [] self.ego_vehicles = [] self.trigger_points = [] self.weather = WeatherConfiguration() self.storyboard = self.xml_tree.find("Storyboard") self.story = self.storyboard.find("Story") self.init = self.storyboard.find("Init") logging.basicConfig() self.logger = logging.getLogger("OpenScenarioConfiguration") self._parse_openscenario_configuration()