Newer
Older
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Railway Scene Editor "
]
},
{
"cell_type": "code",
"outputs": [
{
"data": {
"text/html": [
"<style>.container { width:95% !important; }</style>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"from IPython.core.display import display, HTML\n",
"display(HTML(\"<style>.container { width:95% !important; }</style>\"))"
]
},
{
"cell_type": "code",
"outputs": [],
"from flatland.utils.editor import EditorMVC\n",
"mvc = EditorMVC(sGL=\"PILSVG\" ) "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Instructions\n",
"- Drag to draw (improved dead-ends)\n",
"- ctrl-click to add agent or select agent\n",
" - if agent is selected:\n",
" - ctrl-click to move agent position\n",
" - use rotate agent to rotate 90° \n",
" - ctrl-shift-click to set target for selected agent \n",
" - target can be moved by repeating\n",
"- to Resize the env (cannot preserve work):\n",
" - select \"Regen\" tab, set regen size slider, click regenerate.\n",
"- alt-click remove all rails from cell \n",
"\n",
"\n",
"Demo Scene: complex_scene.pkl\n"
]
},
{
"cell_type": "code",
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3c677934baaa4b64b6c0aa12e1a8e593",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Canvas(), VBox(children=(Text(value='temp.pkl', description='Filename'), Button(description='Re…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"mvc.view.display()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"hide_input": false,
"kernelspec": {
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
"autoclose": false,
"autocomplete": true,
"bibliofile": "biblio.bib",
"cite_by": "apalike",
"current_citInitial": 1,
"eqLabelWithNumbers": true,
"eqNumInitial": 1,
"hotkeys": {
"equation": "Ctrl-E",
"itemize": "Ctrl-I"
},
"labels_anchors": false,
"latex_user_defs": false,
"report_style_numbering": false,
"user_envs_cfg": false
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}