carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.29k stars 3.65k forks source link

Carla lights give off two different errors (AttributeError and Aborted (core dumped)) #6176

Open angelomorgado opened 1 year ago

angelomorgado commented 1 year ago

CARLA version: 0.9.14 Platform/OS: Ubuntu 18

When I tried learning how lights work I ended up making a script to control them, however two errors appeared:

_terminate called after throwing an instance of 'std::runtimeerror' what(): trying to operate on a destroyed actor; an actor's function was called, but the actor is already destroyed. Aborted (core dumped)

and

_my_lights = lmanager.get_lightgroup(carla.LightGroup.Street) AttributeError: 'LightGroup' object has no attribute ' iter '

So I tried using the code in the documentation and this is what happened:

# Get the light manager and lights lmanager = world.get_lightmanager()

# Custom all lights - Gives off Aborted (core dumped) mylights = lmanager.get_all_lights() lmanager.turn_on(mylights) lmanager.set_color(mylights,carla.Color(255,0,0))

# Custom a group of lights - Gives off AttributeError my_lights = lmanager.get_light_group(carla.LightGroup.Street) lmanager.turn_on(my_lights) lmanager.set_color(my_lights,carla.Color(255,0,0))

Is something wrong with my code? I tried looking for other problems similar to mine but I didn't find any

stale[bot] commented 1 year ago

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.