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

Use k-NN to compute ego-centric road observations #106

Merged
merged 1 commit into from
May 9, 2024
Merged

Conversation

SamanKazemkhani
Copy link
Collaborator

@SamanKazemkhani SamanKazemkhani commented May 7, 2024

This introduces selectKNearestRoadEntities(), which computes a given agent's ego-centric observations of road entities. It performs the following sequence of steps to fill in AgentMapObservations:

  1. Find the K nearest road entities to the agent, where K is defined by consts::kMaxAgentMapObservationsCount
  2. Filter out road entities further than observationRadius computed in (1)
  3. Zero out values if there are fewer than K road-entity observations left

(1) is accomplished by using a binary heap (implementation in binary_heap.hpp) with time-complexity O(N * log K) and space-complexity O(K).

src/consts.hpp Outdated Show resolved Hide resolved
@SamanKazemkhani SamanKazemkhani mentioned this pull request May 7, 2024
@SamanKazemkhani SamanKazemkhani force-pushed the sk/knn branch 5 times, most recently from 92c91f7 to 3d6b59e Compare May 8, 2024 22:22
Add feature flag
@SamanKazemkhani SamanKazemkhani merged commit b47781b into main May 9, 2024
1 check failed
@SamanKazemkhani SamanKazemkhani deleted the sk/knn branch August 9, 2024 19:13
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.

2 participants