Commit 2f7ee5c1 authored by Erik Nygren's avatar Erik Nygren
Browse files

minor changes to rendering

parent 8eec5856
Pipeline #457 passed with stage
in 2 minutes and 39 seconds
......@@ -30,13 +30,13 @@ env = RailEnv(width=20,
rail_generator=complex_rail_generator(nr_start_goal=20, min_dist=10, max_dist=99999, seed=0),
number_of_agents=5)
"""
env = RailEnv(width=20,
height=20,
rail_generator=rail_from_list_of_saved_GridTransitionMap_generator(
['../env-data/tests/circle.npy']),
number_of_agents=1)
"""
env_renderer = RenderTool(env, gl="QT")
handle = env.get_agent_handles()
......
......@@ -394,7 +394,7 @@ class TreeObsForRailEnv(ObservationBuilder):
observation = observation + branch_observation
elif last_isSwitch and self.env.rail.get_transition((position[0], position[1], direction),
):
(branch_direction + 2) % 4):
new_cell = self._new_position(position, branch_direction)
branch_observation = self._explore_branch(handle,
......
......@@ -7,7 +7,7 @@ import numpy as np
class QTGL(GraphicsLayer):
def __init__(self, width, height):
self.cell_pixels = 50
self.cell_pixels = 60
self.tile_size = self.cell_pixels
self.width = width
......
......@@ -211,11 +211,11 @@
oEditor.env.number_of_agents
```
%%%% Output: execute_result
1
0
%% Cell type:code id: tags:
``` python
wid_output
......@@ -260,11 +260,11 @@
%%%% Output: error
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-21-a40691809d2c> in <module>()
<ipython-input-20-a40691809d2c> in <module>()
----> 1 oEnv.rail.save_transition_map("../flatland/env-data/tests/test-editor.npy")
c:\users\u224870\appdata\local\programs\python\python36\lib\site-packages\flatland_rl-0.1.1-py3.6.egg\flatland\core\transition_map.py in save_transition_map(self, filename)
259
260 """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment