Problems when adding a new Map

Hi everyone,
I am using Ubuntu 18.04 and Carla 9.10. I have problems when trying to add a new map in the simulator. Following the documentation, I selected a portion of the map on OpenStreetMap and I was able to obtain an opendrive file. However when I try to import it into the simulator it does not work and the result can be seen in the following picture (rendering missing):

I don´t think that the problem is with the script I use when launching the .xodr file (because if I try to select a different path and run the example “TownBig.xodr” it works and I am able to see the streets), on the other hand I think that the problem could be in my .xodr file and how it is generated.
At first I thought that the problem could be on the Osm2OdrSettings and I did several attempt with different settings, however the problem was not solved.

Moreover, when comparing TownBig.xodr with my .xodr file I can notice that my file is missing the GeoReference tag and the userData tag:

<geoReference><![CDATA[+proj=tmerc +lat_0=37.35429341239328 +lon_0=-122.0859797650754 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm96_15.gtx +vunits=m +no_defs ]]></geoReference> <userData> <vectorScene program="RoadRunner" version="2019.2.11 (build 1eb1d9099)"/> </userData>

When trying to copy and paste the georeference strings into my file, it does not work.

I have no clue if this could be the problem and how to generate the before mentioned tags. Could you please help me solve the problem? Are there any other ways to import a specific portion of the map into the simulator?

Thank you in advance.

1 Like

Hi @Gigi, did you try running the manual_control.py script? Sometimes OSM maps can be placed away from the origin but the vehicles should spawn without problems. We still don’t have proper projection capabilities when importing OSM maps, that’s why the georeference is missing.

1 Like

HI @Axel, thanks for your time and reply!
I have tried to run manual control.py and I get the following:

WARNING: cannot parse georeference: ''. Using default values. 
No recommended values for 'speed' attribute
Traceback (most recent call last):
  File "manual_control.py", line 1178, in <module>
    main()
  File "manual_control.py", line 1170, in main
    game_loop(args)
  File "manual_control.py", line 1086, in game_loop
    world = World(client.get_world(), hud, args)
  File "manual_control.py", line 186, in __init__
    self.restart()
  File "manual_control.py", line 246, in restart
    self.collision_sensor = CollisionSensor(self.player, self.hud)
  File "manual_control.py", line 751, in __init__
    self.sensor = world.spawn_actor(bp, carla.Transform(), attach_to=self._parent)
RuntimeError: unable to attach actor: parent actor not found

The same script works when running “Town3” environment. Any ideas?
Thanks.

Looks like the imported map is empty. How are you importing the map? Are you using the config.py script or your own? Could you share the OSM file so that I can take a look please?

Hi @Axel,
I am using my own script, following the tutorial: https://carla.readthedocs.io/en/latest/tuto_G_openstreetmap/
I am using standard settings: vertex_distance = 2.0 , max_road_length = 500.0 , wall_height = 0.0 ,
extra_width = 0.6. However, changing the settings to other values does not improve the situation.

The OSM file is automatically generated by OpenStreetMap and in my case appears like this:
https://easyupload.io/93q7uv

I have taken a random part of the map in order to give you an example

Regards.

Hi @Gigi,
I think your problem is in in the OSM to OpenDRIVE conversion. Try using settings.use_offsets = False (instead of True). The issue is that the road is too far away from the origin of the world which causes issues with Unreal Engine. Let me know if this fixes your issue or it persists.
Regards.

Hi @Axel, the problem is solved :slight_smile:
Thank you for your time and help!
Best regards