You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I built Carla from source on Windows and created my own map with a parking garage and a car. Now, I want to execute python code on this map and pressed "Play", which functioned. Then, I went to the commandline , to the folder with the other python scripts and tried to execute my own code with "python test.py". In the python file test.py, there was the following code:
import sys
Add the path to the CARLA .egg file
sys.path.append(r'C:\carla\PythonAPI\carla\dist\carla-0.9.15-py3.7-win-amd64.egg') # Update 'py3.7' if using Python 3.8
import carla
try:
# Connect to the CARLA server
client = carla.Client('localhost', 2000)
client.set_timeout(10.0) # Set a timeout for the connection
print("Successfully connected to CARLA server.")
# Get the current world and print map name to confirm connection
world = client.get_world()
print("Connected to CARLA world:", world.get_map().name)
# List available vehicle blueprints as a test
blueprint_library = world.get_blueprint_library()
vehicle_blueprints = blueprint_library.filter("vehicle.*")
print("Number of available vehicle blueprints:", len(vehicle_blueprints))
except Exception as e:
print("An error occurred:", e)
There comes "Successfully connected to CARLA server.", but unfortuanteley then came the error message: "ERROR: unable to parse the OpenDRIVE XML string An error occurred: failed to generate map". When I try this with Town01, it functions well without a error.
I tried very much and also asked ChatGPT, here it was for example said that I should export xord files and something like that and that this would be very complex. I also know ChatGPT is unreliable, so I don't want to spend much time for a false way.
Does somebody know how I can solve this problem on a preferably easy way? If the only way is exporting xord files, I will do this but I don't want to trust ChatGPT in this case. Thank you for your answers and your help!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I built Carla from source on Windows and created my own map with a parking garage and a car. Now, I want to execute python code on this map and pressed "Play", which functioned. Then, I went to the commandline , to the folder with the other python scripts and tried to execute my own code with "python test.py". In the python file test.py, there was the following code:
import sys
Add the path to the CARLA .egg file
sys.path.append(r'C:\carla\PythonAPI\carla\dist\carla-0.9.15-py3.7-win-amd64.egg') # Update 'py3.7' if using Python 3.8
import carla
try:
# Connect to the CARLA server
client = carla.Client('localhost', 2000)
client.set_timeout(10.0) # Set a timeout for the connection
print("Successfully connected to CARLA server.")
# Get the current world and print map name to confirm connection
world = client.get_world()
print("Connected to CARLA world:", world.get_map().name)
# List available vehicle blueprints as a test
blueprint_library = world.get_blueprint_library()
vehicle_blueprints = blueprint_library.filter("vehicle.*")
print("Number of available vehicle blueprints:", len(vehicle_blueprints))
except Exception as e:
print("An error occurred:", e)
There comes "Successfully connected to CARLA server.", but unfortuanteley then came the error message: "ERROR: unable to parse the OpenDRIVE XML string An error occurred: failed to generate map". When I try this with Town01, it functions well without a error.
I tried very much and also asked ChatGPT, here it was for example said that I should export xord files and something like that and that this would be very complex. I also know ChatGPT is unreliable, so I don't want to spend much time for a false way.
Does somebody know how I can solve this problem on a preferably easy way? If the only way is exporting xord files, I will do this but I don't want to trust ChatGPT in this case. Thank you for your answers and your help!
Beta Was this translation helpful? Give feedback.
All reactions