Skip to content

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

Merged
SamanKazemkhani merged 1 commit into
mainfrom
sk/knn
May 9, 2024
Merged

Use k-NN to compute ego-centric road observations#106
SamanKazemkhani merged 1 commit into
mainfrom
sk/knn

Conversation

@SamanKazemkhani

@SamanKazemkhani SamanKazemkhani commented May 7, 2024

Copy link
Copy Markdown
Collaborator

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).

Comment thread src/consts.hpp Outdated
@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
@SamanKazemkhani SamanKazemkhani deleted the sk/knn branch August 9, 2024 19:13
wangbingke0 pushed a commit to wangbingke0/gpudrive that referenced this pull request Feb 13, 2026
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