Error on loading custom OpenDRIVE map

Hi,

I’ve been trying to run the OSC-ALKS-scenarios. There is an issue with the provided OpenDRIVE map “Scenarios/ALKS_Road_Different_Curvatures.xodr” when running the simplest scenario. This is the console output I get from the runner:

q496134@cmucl872167:~/OSC-ALKS-scenarios/Scenarios$ python …/…/CARLA/scenario_runner-0.9.11/scenario_runner.py --openscenario ALKS_Scenario_4.1_1_FreeDriving_TEMPLATE.xosc --reloadWorld
WARNING:[SR:OpenScenarioConfiguration]: Wrong OpenDRIVE map in use. Forcing reload of CARLA world
WARNING: cannot parse georeference: ‘’. Using default values.
WARNING: cannot parse georeference: ‘’. Using default values.
Traceback (most recent call last):
File “…/…/CARLA/scenario_runner-0.9.11/scenario_runner.py”, line 600, in
sys.exit(main())
File “…/…/CARLA/scenario_runner-0.9.11/scenario_runner.py”, line 590, in main
result = scenario_runner.run()
File “…/…/CARLA/scenario_runner-0.9.11/scenario_runner.py”, line 494, in run
result = self._run_openscenario()
File “…/…/CARLA/scenario_runner-0.9.11/scenario_runner.py”, line 484, in _run_openscenario
result = self._load_and_run_scenario(config)
File “…/…/CARLA/scenario_runner-0.9.11/scenario_runner.py”, line 354, in _load_and_run_scenario
if not self._load_and_wait_for_world(config.town, config.ego_vehicles):
File “…/…/CARLA/scenario_runner-0.9.11/scenario_runner.py”, line 304, in _load_and_wait_for_world
self.world = self.client.load_world(town)
RuntimeError: map not found

From the error message I cannot see how to fix the issue. Actually the map is found and loaded in CARLA because in the CARLA window I can see the map changing and I can navigate through it. This is the console output of CARLA:

q496134@cmucl872167:~/CARLA/CARLA_0.9.11$ ./CarlaUE4.sh
4.24.3-0+++UE4+Release-4.24 518 0
Disabling core dumps.
WARNING: cannot parse georeference: ‘’. Using default values.
Loading…
Building…
WARNING: cannot parse georeference: ‘’. Using default values.
Saving…

Can you please assist, what is missing / wrong in the custom xodr map?
You should be able to reproduce the issue by loading the ALKS_Road_Different_Curvatures.xodr, which is provided on GitHub.

Edit:
When first exchanging the map in the scenario with the TownBig.xodr from CARLA and running the scenario (which will then fail because of positioning of the entity) and afterwards running the original scenario with the ALKS…xodr as LogicFile with the same CARLA instance, then it works.

Still I need some advice how to fix the issue because I want to include instructions on GitHub how to run the OSC-ALKS-scenarios with CARLA.

Hey @arauschert. Don’t use the --reloadWorld argument with OSC, as it already relaods the map when necessary. this might not be a problem with normal maps but when using OpenDrive maps, the output of the OSC parser will make SR break (as you can see in that error)

Thanks for the hint! Now the scenario can be run directly.

BTW: I added some remarks to the Test & Support ALKS OpenSCENARIO examples issue in GitHub scenario-runner repository: https://github.com/carla-simulator/scenario_runner/issues/655