Closed ThierryDeruyttere closed 1 year ago
@Axel1092 could you have a look at this please?
Hi @ThierryDeruyttere, sorry for the late response, apparently your OSM data does not contain the type of the roads it is exporting (highway, railway, waterway, cycleway, busway, route, sidewalk, highspeed or usage) which is necessary to properly generate the representation of the road. How are you generating this data?
I was using https://github.com/gdlg/nuscenes-to-osm-exporter to generate the file I believe.
After seeing the code you would have to add the road type for our converter to work. Something like changing in nuscenes_map_to_osm_exporter.py
line 110 with export_polygon(output_file, numap, 'drivable_area', record, '<tag k="highway" v="residential"/>')
. The issue with not having the tag "highway"
is that we cannot know if the way is defining a road or a shape of something different.
Have you found a valid solution to this problem? I believe I have fallen into a similar circumstance as you. I have been trying to convert a .osm file in the Lanelet2 structure to a .xodr file, which could be imported by the Driving Scenario Designer of Matlab.
The Carla version is 0.9.11, the Ubuntu 18.04, operated with Intel i7-8700K and Nvidia GTX1070.
location1.zip The python code is as follows:
import carla f = open("location1.osm", 'r') # Windows will need to encode the file in UTF-8. Read the note below. osm_data = f.read() f.close()
settings = carla.Osm2OdrSettings() xodr_data = carla.Osm2Odr.convert(osm_data, settings)
f = open("location.xodr", 'w') f.write(xodr_data) f.close()
And these codes are performed in the Examples folder of PythonAPI. The Carla is installed both through Linux build and a recommended quick start installation.
Could you help with this problem? The .osm file is attached. Any suggestions will be helpful.
Hi @driverych have you found a solution for osm to xodr conversion yet
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I tried to convert Lanelet maps in OSM format to OpenDRIVE and ran into the same issue as well. Any ideas?
@driverych how did you resolve this issue in the end?
So I follow the instructions from the documentation on how to convert the openstreetmap format to open drive. However, I get an error saying:
RuntimeError: No nodes loaded.
The code that I use is:
File to recreate the issue: sing-one.zip