Closed souvikboseGM closed 4 years ago
@souvikboseGM this function is only available in the Pre-Release 0.9.10 Version -> https://github.com/carla-simulator/carla/blob/master/Docs/download.md#pre-release-0910
@TKeutgens Thanks for the reply. After downloading "Pre-Release 0.9.10 Version", I tried to run. Now I am getting below error I am not sure ,how to go about it ?
@souvikboseGM I'm not 100% sure what the error is but you can try running your script from the folder WindowsNoEditor\PythonAPI\examples. For me that worked.
The xsd file sould be located under WindowsNoEditor\PythonAPI\carla\data\xsd
@TKeutgens It works . Great. I am getting below warnings .I am assuming this should not be a problem. If you could point out something about "junctions.scurve-stretch",please let me know. In any case , .xodr is generated, so I will close this issue. But if you could point something about the warnings that will be great. Thanks again
Hi @souvikboseGM, I'm also trying to convert the osm data but i'm getting the following error message when i try to run the converter script inside the PythonAPI/examples folder:
AttributeError:
'module' object has no attribute 'Osm2OdrSettings'
Could you tell me the exact steps that you followed or share the final code that you used?
I downloaded the pre-release version and used the same code suggested in the documentation
Thanks
@salvatoresan I used the below code and running the below code from "..PythonAPI/examples" path
Read the .osm data f = open("map_openstreet.osm", 'r') osm_data = f.read() f.close()
Define the desired settings. In this case, default values. settings = carla.Osm2OdrSettings()
Convert to .xodr xodr_data = carla.Osm2Odr.convert(osm_data, settings)
save opendrive file f = open("CARLMAP_openstreet.xodr", 'w') f.write(xodr_data) f.close()
Hi , Goodmorning,
I was trying to convert .osm file to .xodr file to use in CARLA [Using CARLA 0.9.8 ,Ubuntu 18]. I am getting error message = > " AttributeError: module 'carla' has no attribute 'Osm2OdrSettings' " I am not sure how to get this "Osm2OdrSettings" Module ?
Below is the code .
import carla
Read the .osm data
f = open("map_openstreet.osm", 'r') osm_data = f.read() f.close()
Define the desired settings. In this case, default values.
settings = carla.Osm2OdrSettings()
Convert to .xodr
xodr_data = carla.Osm2Odr.convert(osm_data, settings)
save opendrive file
f = open("CARLMAP_openstreet.xodr", 'w') f.write(xodr_data) f.close()