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

comments

parent 0d3c1e79
No related branches found
No related tags found
2 merge requests!21Major changes. convert nuplan devkit to handle occlusions for project,!4Multiagent ML Agents + Inserting New Agents into the scene
......@@ -133,6 +133,7 @@ class MLPlannerAgents(AbstractObservation):
traffic_light_data = list(self._scenario.get_traffic_light_status_at_iteration(iteration.index))
# TODO: Find way to parallelize.
# TODO: Propagate non-ego and lower frequency to improve performance.
for agent_token, agent_data in self._agents.items():
history_input = self._build_history_input(agent_token, agent_data['ego_state'], history)
planner_input = PlannerInput(iteration=iteration, history=history_input, traffic_light_data=traffic_light_data)
......@@ -207,10 +208,11 @@ class MLPlannerAgents(AbstractObservation):
timestamp_us=ego_state.time_us))
# Get agent object corresponding to agent from observation buffer. If one does not exist for current timestep, take from the future,
# if one does not exist from the future, take the current state.
# if one does not exist from the future, take the current state. This might occur at the first timestep for observations that have no
# logged history prior to simulation start, or observations inserted mid-simulation.
i = t
matched_obs = []
while not matched_obs and i < len(observation_buffer):
while len(matched_obs) == 0 and i < len(observation_buffer):
matched_obs = [ag for ag in observation_buffer[i].tracked_objects.tracked_objects if ag.metadata.track_token == agent_track_token]
i += 1
......
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