Skip to content

Commit

Permalink
Fix agentManager (#610)
Browse files Browse the repository at this point in the history
* hotfix afterstep for agentManager

* MetaDriveTYpe
  • Loading branch information
QuanyiLi committed Jan 22, 2024
1 parent 32fc74e commit b1ed015
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions documentation/source/scenario_description.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@
" \"tracks\": {\n",
" \"vehicle1\": {\n",
"\n",
" # The type string in metadrive.scenario.MetaDriveType\n",
" # The type string in metadrive.type.MetaDriveType\n",
" \"type\": \"VEHICLE\",\n",
"\n",
" # The state dict. All values must have T elements.\n",
Expand Down Expand Up @@ -587,7 +587,7 @@
" \"dynamic_map_states\": {\n",
" \"trafficlight1\": {\n",
"\n",
" # The type string in metadrive.scenario.MetaDriveType\n",
" # The type string in metadrive.type.MetaDriveType\n",
" \"type\": \"TRAFFIC_LIGHT\",\n",
"\n",
" # The state dict. All values must have T elements.\n",
Expand Down
4 changes: 2 additions & 2 deletions metadrive/manager/base_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ def before_step(self):
return step_infos

def after_step(self, *args, **kwargs):
step_infos = self.for_each_active_agents(lambda v: v.after_step())
step_infos = self.try_actuate_agent(step_infos, stage="after_step")
step_infos = self.try_actuate_agent({}, stage="after_step")
step_infos.update(self.for_each_active_agents(lambda v: v.after_step()))
return step_infos

def _translate(self, d):
Expand Down
4 changes: 2 additions & 2 deletions metadrive/scenario/scenario_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"tracks": {
"vehicle1": {
# The type string in metadrive.scenario.MetaDriveType
# The type string in metadrive.type.MetaDriveType
"type": "VEHICLE",
# The state dict. All values must have T elements.
Expand Down Expand Up @@ -81,7 +81,7 @@
"dynamic_map_states": {
"trafficlight1": {
# The type string in metadrive.scenario.MetaDriveType
# The type string in metadrive.type.MetaDriveType
"type": "TRAFFIC_LIGHT",
# The state dict. All values must have T elements.
Expand Down

0 comments on commit b1ed015

Please sign in to comment.