carla-simulator / carla

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

Dormant/Collided vehicles disappear even after commenting lines in ALSM.CPP #5872

Open sk9073 opened 2 years ago

sk9073 commented 2 years ago

Version: 0.9.13 Platform: Windows 10

Setting: I spawn something like 100 vehicles using the PythonAPI/examples/generate_traffic.py script by making each vehicle ignore traffic_light 100% of the time to create traffic congestion, and set up another script that polls the locations of all actors in the simulation and writes them to a file

Issue: The actors that remain dormant/have collided with other actors get destroyed after a min. I added this argument to trafficManager but this didn't have any effect : traffic_manager.set_respawn_dormant_vehicles(False)

Following the steps of #3860 I even commented on these lines (106-111). in ALSM.CPP but it doesn't seem to have any effect.

      // if (IsVehicleStuck(max_idle_time.first)
      //     && (current_timestamp.elapsed_seconds - elapsed_last_actor_destruction) > DELTA_TIME_BETWEEN_DESTRUCTIONS) {
      //   registered_vehicles.Destroy(max_idle_time.first);
      //   RemoveActor(max_idle_time.first, true);
      //   elapsed_last_actor_destruction = current_timestamp.elapsed_seconds;
      // }
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.