Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flatland-rl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
manavsinghal157
flatland-rl
Commits
c53baa0b
Commit
c53baa0b
authored
Oct 18, 2019
by
spmohanty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused imports and stray print statements
parent
2c91e486
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
5 deletions
+0
-5
my_observation_builder.py
my_observation_builder.py
+0
-5
No files found.
my_observation_builder.py
View file @
c53baa0b
...
...
@@ -8,10 +8,7 @@ import numpy as np
from
flatland.core.env
import
Environment
from
flatland.core.env_observation_builder
import
ObservationBuilder
from
flatland.core.env_prediction_builder
import
PredictionBuilder
from
flatland.core.grid.grid4_utils
import
get_new_position
from
flatland.core.grid.grid_utils
import
coordinate_to_position
from
flatland.envs.agent_utils
import
RailAgentStatus
,
EnvAgent
from
flatland.utils.ordered_set
import
OrderedSet
class
CustomObservationBuilder
(
ObservationBuilder
):
...
...
@@ -35,7 +32,6 @@ class CustomObservationBuilder(ObservationBuilder):
# The instantiations which depend on parameters of the Env object should be
# done here, as it is only here that the updated self.env instance is available
self
.
rail_obs
=
np
.
zeros
((
self
.
env
.
height
,
self
.
env
.
width
))
print
(
"Env Width : "
,
self
.
env
.
width
,
"Env Height : "
,
self
.
env
.
height
)
def
reset
(
self
):
"""
...
...
@@ -48,7 +44,6 @@ class CustomObservationBuilder(ObservationBuilder):
# Get the transition map value at location _x, _y
transition_value
=
self
.
env
.
rail
.
get_full_transitions
(
_y
,
_x
)
self
.
rail_obs
[
_y
,
_x
]
=
transition_value
print
(
"Responding to obs_builder.reset()"
)
def
get
(
self
,
handle
:
int
=
0
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment