Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dead actor accumulation in CDP #1091

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Daraan
Copy link
Contributor

@Daraan Daraan commented Jun 26, 2024

I realized that in the CarlaDataProvider._carla_actor_pool more and more dead actors accumulated over time when scenarios run. The reason is that actors are created over the CDP and are added to the pool, however, they are not destroyed over the CDP.
I think I located most of the locations where this is the case - however I think there is still at least one missing.

As a side result it the remove_actor_by_id function is now also slightly more informative. If the return value is None the users needs to take care of the destruction.


I also propose an update to the CarlaDataProvider._actor_[velocity, location, transform]_map, while this new code is in itself more expensive it was in the long run still faster as the sizes were overall smaller. Of course, just talking about a few ms.


Tested on

Platform(s): Ubuntu
Python version(s): 3.7 and 3.10
Unreal Engine version(s): 4.24
CARLA version: 0.9.15 dev

This change is Reviewable

@Daraan Daraan force-pushed the dead-actor-cleanup branch from f47ab67 to 7b935b7 Compare June 26, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant