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
CARLA version: 0.9.15
Platform/OS: Windows
Problem you have experienced: I'm spawning actors that run on autopilot. When spawning I add the corresponding actor to a list to later destroy that actor. But once I call the destroy method the simulation & my kernel crashes and I get no error message.
What you expected to happen: The corresponding (or all) actors to be destroyed (removed from the simulation) and the simulation still running
Steps to reproduce:
From my notebook. Everything works fine and my cars get spawned but once I run the last cell with the vehicle.destroy() method everything crashes.
``
import carla
import random
import time
client = carla.Client('localhost', 2000)
client.set_timeout(5.0)
world = client.get_world()
spawn_points = world.get_map().get_spawn_points()
spawned_cars = []
for _ in range(60):
car_blueprint = random.choice(world.get_blueprint_library().filter("vehicle"))
if car_blueprint.has_attribute('color'):
color = random.choice(car_blueprint.get_attribute('color').recommended_values)
car_blueprint.set_attribute('color', color)
car_blueprint.set_attribute('role_name', 'autopilot')
for _ in range(5):
try:
spawn_point = random.choice(spawn_points)
car_actor = world.spawn_actor(car_blueprint, spawn_point)
car_actor.set_autopilot()
break
except:
time.sleep(0.1)
continue
spawned_cars.append(car_actor)
for vehicle in spawned_cars:
try:
vehicle.destroy()
except Exception as e:
print("Failed to destroy car:", e)
``
The text was updated successfully, but these errors were encountered:
CARLA
version: 0.9.15Platform/OS: Windows
Problem you have experienced: I'm spawning actors that run on autopilot. When spawning I add the corresponding actor to a list to later destroy that actor. But once I call the destroy method the simulation & my kernel crashes and I get no error message.
What you expected to happen: The corresponding (or all) actors to be destroyed (removed from the simulation) and the simulation still running
Steps to reproduce:
From my notebook. Everything works fine and my cars get spawned but once I run the last cell with the vehicle.destroy() method everything crashes.
``
import carla
import random
import time
client = carla.Client('localhost', 2000)
client.set_timeout(5.0)
world = client.get_world()
spawn_points = world.get_map().get_spawn_points()
spawned_cars = []
for _ in range(60):
car_blueprint = random.choice(world.get_blueprint_library().filter("vehicle"))
if car_blueprint.has_attribute('color'):
color = random.choice(car_blueprint.get_attribute('color').recommended_values)
car_blueprint.set_attribute('color', color)
car_blueprint.set_attribute('role_name', 'autopilot')
for vehicle in spawned_cars:
try:
vehicle.destroy()
except Exception as e:
print("Failed to destroy car:", e)
``
The text was updated successfully, but these errors were encountered: