Skip to content
Snippets Groups Projects
Commit 9630e5f3 authored by hagrid67's avatar hagrid67 Committed by spmohanty
Browse files

Added debug / error line in observations.py for editor

parent e102b800
No related branches found
No related tags found
No related merge requests found
......@@ -195,7 +195,8 @@ class TreeObsForRailEnv(ObservationBuilder):
# for loc in self.env.agents_position:
# self.location_has_agent[(loc[0], loc[1])] = 1
self.location_has_agent = {tuple(agent.position): 1 for agent in self.env.agents}
if handle > len(self.env.agents):
print("ERROR: obs _get - handle ", handle, " len(agents)", len(self.env.agents))
agent = self.env.agents[handle] # TODO: handle being treated as index
# position = self.env.agents_position[handle]
# orientation = self.env.agents_direction[handle]
......
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