carla-simulator / scenario_runner

Traffic scenario definition and execution engine
https://carla-scenariorunner.readthedocs.io/en/latest/
MIT License
532 stars 364 forks source link

Carla [0.9.2] getting slower after each repetition of scenario_runner #37

Open anshulpaigwar opened 5 years ago

anshulpaigwar commented 5 years ago

In scenario_runner --version 0.1. I found that the FPS of Carla Server drops after every repetition. I think the problem being that actors are not properly destroyed from the server. After the end of scenario I get this output:

LIFETIME: WARNING! the following objects were not destructed. 
LIFETIME: Actor 168 (sensor.other.collision) still alive. 
LIFETIME: tcp client 94 still alive. 
LIFETIME: Actor 163 (vehicle.tesla.model3) still alive. 
LIFETIME: tcp client 89 still alive. 
LIFETIME: tcp client 88 still alive. 
LIFETIME: Actor 159 (sensor.other.collision) still alive. 
LIFETIME: Actor 155 (vehicle.tesla.model3) still alive. 
LIFETIME: Actor 152 (sensor.other.collision) still alive. 
LIFETIME: tcp client 82 still alive. 
LIFETIME: Actor 151 (sensor.other.collision) still alive. 
LIFETIME: Actor 148 (vehicle.nissan.micra) still alive. 
LIFETIME: Actor 147 (vehicle.tesla.model3) still alive. 
LIFETIME: tcp client 77 still alive. 
LIFETIME: Actor 144 (sensor.other.collision) still alive. 
LIFETIME: tcp client 76 still alive. 
LIFETIME: Actor 143 (sensor.other.collision) still alive. 
LIFETIME: Actor 167 (sensor.other.collision) still alive. 
LIFETIME: Actor 139 (vehicle.tesla.model3) still alive. 
LIFETIME: tcp client 28 still alive. 
LIFETIME: Actor 164 (vehicle.nissan.micra) still alive. 
LIFETIME: Actor 120 (sensor.other.collision) still alive. 
LIFETIME: Actor 55 (sensor.other.collision) still alive. 
LIFETIME: Actor 156 (vehicle.nissan.micra) still alive. 
LIFETIME: Actor 136 (sensor.other.collision) still alive. 
LIFETIME: tcp client 23 still alive.

I am doing actor.destroy() and actor = None after each repetition and they are being destroyed (I cannot see them in the server) but the memory still not being released and I get above output.

Could someone help me how to destroy the actors properly??

danmou commented 5 years ago

I'm seeing the same problem when using Carla from the normal client API.

anshulpaigwar commented 5 years ago

@Danmou you are correct this is happening with me too.

fabianoboril commented 5 years ago

@anshulpaigwar @Danmou Does this problem still exist when you use CARLA 0.9.4 and the latest version from the development branch?

Could you please provide the exact setup that you use? CARLA version, how you start CARLA, what kind of client do you run etc. Thank you.

damascenodiego commented 5 years ago

This is happening to me as well with Carla version 0.9.5

TigerStone93 commented 2 years ago

Is this problem solved?