Skip to content
Snippets Groups Projects
Commit 107622c2 authored by Christian Baumberger's avatar Christian Baumberger
Browse files

Merge branch 'bugfix-error-on-existing-folder' into 'master'

bugfix create existing folder

See merge request flatland/flatland!200
parents f4872575 629063cc
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,9 @@ from flatland.envs.rail_generators_city_generator import city_generator
from flatland.envs.schedule_generators import city_schedule_generator
from flatland.utils.rendertools import RenderTool, AgentRenderVariant
os.mkdir("./../render_output/")
OUTPUT_DIR = "./../render_output/"
if not os.path.exists(OUTPUT_DIR):
os.mkdir(OUTPUT_DIR)
for itrials in np.arange(1, 15, 1):
print(itrials, "generate new city")
......@@ -52,7 +54,7 @@ for itrials in np.arange(1, 15, 1):
# store rendered file into render_output if the path exists
env_renderer.gl.save_image(
os.path.join(
"./../render_output/",
OUTPUT_DIR,
"flatland_frame_{:04d}.png".format(itrials)
))
......
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