Skip to content

Commit

Permalink
Fix for OpenDrive maps with schema argument (#967)
Browse files Browse the repository at this point in the history
Reading OpenDrive maps that have the xml schema added as an argument on the root element failed before.
  • Loading branch information
frankbaumgarten committed Nov 12, 2023
1 parent 5324864 commit ad39faf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions srunner/scenarioconfigs/openscenario_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ def _set_carla_town(self):
if ".xodr" in self.town:
with open(self.town, 'r', encoding='utf-8') as od_file:
data = od_file.read()
index = data.find('<OpenDRIVE>')
index = data.find('<OpenDRIVE')
data = data[index:]

old_map = ""
if wmap is not None:
old_map = wmap.to_opendrive()
index = old_map.find('<OpenDRIVE>')
index = old_map.find('<OpenDRIVE')
old_map = old_map[index:]

if data != old_map:
Expand Down

0 comments on commit ad39faf

Please sign in to comment.