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