Skip to content
Snippets Groups Projects
Commit db3a7c31 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

complex scene added

parent c208d612
No related branches found
No related tags found
No related merge requests found
File added
......@@ -163,12 +163,8 @@ if False:
demo_flatland_000.run_demo(60)
demo_flatland_000 = None
demo_001 = Demo(Scenario_Generator.load_scenario('./env-data/railway/temp.pkl'))
demo_001.run_demo(10)
demo_001 = None
if True:
demo_001 = Demo(Scenario_Generator.load_scenario('./env-data/railway/example_flatland_001.pkl'))
demo_001 = Demo(Scenario_Generator.load_scenario('./env-data/railway/complex_scene.pkl'))
demo_001.set_record_frames('./rendering/frame_{:04d}.bmp')
demo_001.run_demo(60)
demo_001.run_demo(360)
demo_001 = None
%% Cell type:markdown id: tags:
# Railway Scene Editor
%% Cell type:code id: tags:
``` python
%load_ext autoreload
%autoreload 2
```
%% Cell type:code id: tags:
``` python
import numpy as np
from numpy import array
import ipywidgets
import IPython
from IPython.core.display import display, HTML
```
%% Cell type:code id: tags:
``` python
display(HTML("<style>.container { width:95% !important; }</style>"))
```
%% Cell type:code id: tags:
``` python
from flatland.utils.editor import EditorMVC
```
%% Cell type:code id: tags:
``` python
mvc = EditorMVC(sGL="PILSVG" )
```
%% Cell type:markdown id: tags:
## Instructions
- Drag to draw (improved dead-ends)
- ctrl-click to add agent or select agent
- if agent is selected:
- ctrl-click to move agent position
- use rotate agent to rotate 90°
- ctrl-shift-click to set target for selected agent
- target can be moved by repeating
- to Resize the env (cannot preserve work):
- select "Regen" tab, set regen size slider, click regenerate.
- alt-click remove all rails from cell
Demo Scene: complex_scene.pkl
%% Cell type:code id: tags:
``` python
mvc.view.display()
```
......
File added
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