Unverified Commit 26d76f5a authored by Calvin Yu's avatar Calvin Yu Committed by GitHub

Adds tutorial for creating a new environment

* updates documentation for creating a new env
* updates gitignore for orbit_assets

---------
Co-authored-by: 's avatarMayank Mittal <mittalma@leggedrobotics.com>
parent db73f9d4
......@@ -40,6 +40,7 @@ _build
# Internal
# TODO: Remove this once we have a better way to handle internal files.
source/extensions/omni.isaac.assets
source/extensions/omni.isaac.orbit_assets
# RL-Games
**/runs/*
......
......@@ -43,6 +43,7 @@ extensions = [
"myst_parser",
"autodocsumm",
"sphinx_copybutton",
"sphinx_panels",
]
# mathjax hacks
......@@ -53,6 +54,10 @@ mathjax3_config = {
},
}
# panels hacks
panels_add_bootstrap_css = False
panels_add_fontawesome_css = True
# supported file extensions for source files
source_suffix = {
".rst": "restructuredtext",
......
......@@ -44,13 +44,20 @@ using the following BibTeX entry:
.. toctree::
:maxdepth: 1
:caption: Tutorials (beginner)
:caption: Tutorials (Core)
source/tutorials/00_empty
source/tutorials/01_arms
source/tutorials/02_cloner
source/tutorials/03_ik_controller
source/tutorials/04_gym_env
.. toctree::
:hidden:
:maxdepth: 1
:caption: Tutorials (Environments)
source/tutorials_envs/00_gym_env
source/tutorials_envs/01_create_env
.. toctree::
:maxdepth: 2
......
......@@ -7,6 +7,7 @@ myst-parser==0.18.1
sphinxcontrib-bibtex==2.5.0
autodocsumm==0.2.9
sphinx-copybutton
sphinx-panels
# basic python
numpy
......
......@@ -20,7 +20,7 @@ The tutorial corresponds to the ``zero_agent.py`` script in the ``orbit/source/s
.. literalinclude:: ../../../source/standalone/environments/zero_agent.py
:language: python
:emphasize-lines: 35-36,42-45,50-57
:emphasize-lines: 34-35,41-44,49-55
:linenos:
The Code Explained
......@@ -53,9 +53,9 @@ we must import the module at the start of the script.
.. literalinclude:: ../../../source/standalone/environments/zero_agent.py
:language: python
:lines: 32-36
:lines: 33-35
:linenos:
:lineno-start: 32
:lineno-start: 33
.. note::
......@@ -83,18 +83,18 @@ Once creating the environment, the rest of the execution follows the standard re
.. literalinclude:: ../../../source/standalone/environments/zero_agent.py
:language: python
:lines: 47-54
:lines: 45-55
:linenos:
:lineno-start: 47
:lineno-start: 45
Similar to previous tutorials, to ensure a safe exit when running the script, we need to add checks
for whether the simulation is stopped or not.
.. literalinclude:: ../../../source/standalone/environments/zero_agent.py
:language: python
:lines: 55-57
:lines: 57-59
:linenos:
:lineno-start: 55
:lineno-start: 57
The Code Execution
......
This diff is collapsed.
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