Skip to content
Snippets Groups Projects
Commit de0654aa authored by sacardoz's avatar sacardoz
Browse files

remaining documentation

parent a3530f1a
No related branches found
No related tags found
2 merge requests!21Major changes. convert nuplan devkit to handle occlusions for project,!1Shea occlusion manager
......@@ -52,6 +52,10 @@ class AbstractOcclusionManager(metaclass=ABCMeta):
@abstractmethod
def _compute_visible_agents(self, ego_state: EgoState, observations: DetectionsTracks) -> set:
"""
Returns set of track tokens that represents the observations visible to the ego
at this time step.
"""
pass
def _mask_input(self, time_us: int, observations: DetectionsTracks) -> DetectionsTracks:
......
......@@ -19,7 +19,16 @@ class RangeOcclusionManager(AbstractOcclusionManager):
self.range_threshold = range_threshold
def _compute_visible_agents(self, ego_state: EgoState, observations: DetectionsTracks) -> set:
"""
Returns set of track tokens that represents the observations visible to the ego
at this time step.
"""
# Visible track token set
not_occluded = set()
# Loop through observations and check if it's closer to the ego then range_threshold,
# add to output set if so.
for track in observations.tracked_objects.tracked_objects:
if ((ego_state.center.x - track.center.x) ** 2 + \
(ego_state.center.y - track.center.y) ** 2) ** 0.5 <= self.range_threshold:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment