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

tile initialize and re-initialize needs to dynamically respond to the amount of drivable area in the underlying FOV #166

Open
fwood opened this issue Dec 19, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@fwood
Copy link

fwood commented Dec 19, 2023

when running tile initialize naively, initialize will fail or potentially take a very long time initializing in areas with little drivable area. the density should be scaled proportionally to driveable area

@fwood fwood added the enhancement New feature or request label Dec 19, 2023
@KieranRatcliffeInvertedAI
Copy link
Contributor

This is something Berend and I discussed before and came to the same conclusion as the fix. The constraints will be that this will be on the client side with all of the design implications therein. That being said, @ruinixu were discussing it a moment ago and came to 2 solutions:

  1. Quick and dirty: From the birdview image in location_info endpoint, per map tile, we can average the colour of every pixel to get a rough idea of how much road surface is present to determine the number of agents requested from the API (or to just not call INITIALIZE at all if 0).
  2. More accurate but longer development: From the osm map acquired from locaction_info endpoint, calculate the percentage "spawnable area" per agent type per tile for similar number of vehicles request scaling. The reason this will take a bit longer to pull off is due to the need to familiarize with the OSM data format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants