Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nuplan-devkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eli Henry Dykhne
nuplan-devkit
Commits
bf5d8e37
Commit
bf5d8e37
authored
1 year ago
by
sacardoz
Browse files
Options
Downloads
Patches
Plain Diff
comments
parent
0d3c1e79
No related branches found
Branches containing commit
No related tags found
2 merge requests
!21
Major changes. convert nuplan devkit to handle occlusions for project
,
!4
Multiagent ML Agents + Inserting New Agents into the scene
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nuplan/planning/simulation/observation/ml_planner_agents.py
+4
-2
4 additions, 2 deletions
nuplan/planning/simulation/observation/ml_planner_agents.py
with
4 additions
and
2 deletions
nuplan/planning/simulation/observation/ml_planner_agents.py
+
4
−
2
View file @
bf5d8e37
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment