diff --git a/docs/_static/css/theme.css b/docs/_static/css/theme.css new file mode 100644 index 0000000000..07d5ef3766 --- /dev/null +++ b/docs/_static/css/theme.css @@ -0,0 +1,328 @@ +/* From https://github.com/rusty1s/pytorch_geometric */ + +.wy-side-nav-search { + background: rgb(143,144,147); +} + +.wy-side-nav-search > div.version { + color: black; +} + + +.wy-nav-content-wrap { + background: inherit; +} + +.wy-side-nav-search input[type="text"] { + border: none; + box-shadow: none; + background: white; + border-radius: 0; + font-size: 100%; +} + +.wy-menu-vertical li.current a, +.wy-menu-vertical li.toctree-l1.current > a { + border: none; +} + +.ethical-rtd > div.ethical-sidebar, +.ethical-rtd > div.ethical-footer { + display: none !important; +} + +h1 { + /* text-transform: uppercase; */ + font-family: inherit; + font-weight: 200; +} + +h2, +.rst-content .toctree-wrapper p.caption { + font-family: inherit; + font-weight: 200; +} + +.rst-content a:visited { + color: #3091d1; +} + +/* Begin code */ +.rst-content pre.literal-block, +.rst-content div[class^="highlight"] { + border: none; +} + +.rst-content pre.literal-block, +.rst-content div[class^="highlight"] pre, +.rst-content .linenodiv pre { + font-size: 80%; +} + +.highlight { + background: #f6f8fa; + border-radius: 6px; +} + +.highlight .kn, +.highlight .k { + color: #d73a49; +} + +.highlight .nn { + color: inherit; + font-weight: inherit; +} + +.highlight .nc { + color: #e36209; + font-weight: inherit; +} + +.highlight .fm, +.highlight .nd, +.highlight .nf, +.highlight .nb { + color: #6f42c1; +} + +.highlight .bp, +.highlight .n { + color: inherit; +} + +.highlight .kc, +.highlight .s1, +.highlight .s2, +.highlight .mi, +.highlight .mf, +.highlight .bp, +.highlight .bn, +.highlight .ow { + color: #005cc5; + font-weight: inherit; +} + +.highlight .c1 { + color: #6a737d; +} + +.rst-content code.xref { + padding: .2em .4em; + background: rgba(27,31,35,.05); + border-radius: 6px; + border: none; +} +/* End code */ + +.rst-content dl:not(.docutils) dt, +.rst-content dl:not(.docutils) dl dt { + background: rgb(243,244,247); +} + +.rst-content dl:not(.docutils) dt.field-odd, +.rst-content dl:not(.docutils) dt.field-odd { + text-transform: uppercase; + background: inherit; + border: none; + padding: 6px 0; +} + +.rst-content dl:not(.docutils) .property { + text-transform: uppercase; + font-style: normal; + padding-right: 12px; +} + +em.sig-param span.n:first-child, em.sig-param span.n:nth-child(2) { + color: black; + font-style: normal; +} + +em.sig-param span.n:nth-child(3), +em.sig-param span.n:nth-child(3) a { + color: inherit; + font-weight: normal; + font-style: normal; +} + +em.sig-param span.default_value { + font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace; + font-style: normal; + font-size: 90%; +} + +.sig-paren { + padding: 0 4px; +} + +.wy-table-responsive table td, +.wy-table-responsive table th { + white-space: normal; +} + +.wy-table-bordered-all, +.rst-content table.docutils { + border: none; +} + +.wy-table-bordered-all td, +.rst-content table.docutils td { + border: none; +} + +.wy-table-odd td, +.wy-table-striped tr:nth-child(2n-1) td, +.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td { + background: rgb(243,244,247); +} + +.wy-table td, +.rst-content table.docutils td, +.rst-content table.field-list td, +.wy-table th, +.rst-content table.docutils th, +.rst-content table.field-list th { + padding: 16px; +} +/* +.admonition { + content: '\f12a'; + font-family: FontAwesome; +} */ + +.admonition.note, div.admonition.note { + border-color: rgba(var(--pst-color-admonition-note),1); +} + +.admonition.note>.admonition-title:before, div.admonition.note>.admonition-title:before { + color: rgba(var(--pst-color-admonition-note),1); + content: '\f12a'!important; + /* content: var(--pst-icon-admonition-note); */ +} + +.admonition.question>.admonition-title:before, div.admonition.question>.admonition-title:before { + color: rgba(var(--pst-color-admonition-note),1); + content: '\003f'!important; + /* content: var(--pst-icon-admonition-note); */ +} + +.admonition.explanation>.admonition-title:before, div.admonition.explanation>.admonition-title:before { + color: rgba(var(--pst-color-admonition-note),1); + content: '\f02d'!important; + /* content: var(--pst-icon-admonition-note); */ +} + +.card { + /* Add shadows to create the "card" effect */ + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); + transition: 0.3s; + border-radius: 5px; /* 5px rounded corners */ + width: 100%; + padding-bottom: 10px; +} + +/* On mouse-over, add a deeper shadow */ +.card:hover { + box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); + +} + +/* Add some padding inside the card container */ +.container { + padding: 2px 16px; +} + +.row:after { + content: ""; + display: table; + clear: both; +} + +.column { + float: left; + width: 50%; + padding: 20px 10px; +} + +.box{ + display: none; + width: 100%; +} + +a:hover + .box,.box:hover{ + display: block; + position: absolute; + z-index: 100; + border-radius: 50px!important; + margin-left: 60px; + margin-top: 0px; +} + +a:hover + .card:hover{ + display: block; + position: absolute; + z-index: 100; + border-radius: 50px!important; + margin-left: 60px; + margin-top: 0px; +} + +a.reference.external { + color: #6695B0!important; +} + +#p1 a { + color: #E98D64!important; +} + + +#frame { zoom: 0.75; -moz-transform: scale(0.75); -moz-transform-origin: 0 0; } + +/* Google Fonts */ +@import url(https://fonts.googleapis.com/css?family=Anonymous+Pro); + +/* Global */ + +#typewriter body{ + height: calc(100vh - 8em); + padding: 4em; + color: rgba(255,255,255,.75); + font-family: 'Anonymous Pro', monospace; + background-color: rgb(25,25,25); +} +#typewriter .line-1{ + position: relative; + top: 50%; + width: 24em; + margin: 0 auto; + border-right: 2px solid rgba(255,255,255,.75); + font-size: 180%; + text-align: center; + white-space: nowrap; + overflow: hidden; + transform: translateY(-50%); +} + +/* Animation */ +.anim-typewriter{ + animation: typewriter 4s steps(44) 1s 1 normal both, + blinkTextCursor 500ms steps(44) infinite normal; +} +@keyframes typewriter{ + from{width: 0;} + to{width: 24em;} +} +@keyframes blinkTextCursor{ + from{border-right-color: rgba(255,255,255,.75);} + to{border-right-color: transparent;} +} + + +.trimmed-cover { + object-fit: cover; + width: 120%; + height: 177px; + object-position: center 40%; + margin-right: -100px; +} \ No newline at end of file diff --git a/docs/_static/js/custom.js b/docs/_static/js/custom.js new file mode 100644 index 0000000000..8489b8f02a --- /dev/null +++ b/docs/_static/js/custom.js @@ -0,0 +1,3 @@ +$(document).ready(function () { + $('a[href^="http://"], a[href^="https://"]').not('a[class*=internal]').attr('target', '_blank'); + }); \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 89d7068b65..61d39aeddf 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,7 +21,7 @@ sys.path.insert(0, os.path.abspath(".")) -import sphinx_rtd_theme +import sphinx_book_theme import robosuite @@ -36,7 +36,6 @@ # ones. extensions = [ "sphinx.ext.napoleon", - "sphinx_rtd_theme", "sphinx_markdown_tables", "sphinx.ext.mathjax", "sphinx.ext.githubpages", @@ -45,6 +44,19 @@ "nbsphinx", ] +mathjax_config = { + 'tex2jax': { + 'inlineMath': [ ["\\(","\\)"] ], + 'displayMath': [["\\[","\\]"] ], + }, +} + +mathjax3_config = { + "tex": { + "inlineMath": [['\\(', '\\)']], + "displayMath": [["\\[", "\\]"]], + } +} # Sphinx-apidoc variables apidoc_module_dir = "../robosuite" @@ -68,16 +80,16 @@ # General information about the project. project = "robosuite" copyright = "Stanford University and The University of Texas at Austin 2022" -author = "Yuke Zhu, Josiah Wong, Ajay Mandlekar, Roberto Martín-Martín" +author = "the robosuite core team" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = robosuite.__version__ +version = (".").join(robosuite.__version__.split(".")[:-1]) # The full version, including alpha/beta/rc tags. -release = robosuite.__version__ +release = (".").join(robosuite.__version__.split(".")[:-1]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -103,7 +115,8 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "sphinx_rtd_theme" +html_theme = "sphinx_book_theme" +html_logo = "robosuite_color.png" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -116,13 +129,14 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] -html_context = { - "css_files": [ - "_static/css/theme.css", - "_static/pygments.css", - "_static/theme_overrides.css", # override wide tables in RTD theme - ], -} +html_css_files = [ + "css/theme.css", +] + +html_js_files = [ + "js/custom.js" +] + # -- Options for HTMLHelp output ------------------------------------------ diff --git a/docs/installation.md b/docs/installation.md index 2a660f3773..2dfe2acaf5 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -4,22 +4,24 @@ The base installation requires the MuJoCo physics engine (with [mujoco](https://github.com/deepmind/mujoco), refer to link for troubleshooting the installation and further instructions) and [numpy](http://www.numpy.org/). To avoid interfering with system packages, it is recommended to install it under a virtual environment by first running `virtualenv -p python3 . && source bin/activate` or setting up a Conda environment by installing [Anaconda](https://www.anaconda.com/) and running `conda create -n robosuite python=3.8`. ### Install from pip + 1. After setting up mujoco, robosuite can be installed with -```sh -$ pip install robosuite -``` + ```sh + $ pip install robosuite + ``` 2. Test your installation with -```sh -$ python -m robosuite.demos.demo_random_action -``` + ```sh + $ python -m robosuite.demos.demo_random_action + ``` ### Install from source + 1. Clone the robosuite repository -```sh -$ git clone https://github.com/ARISE-Initiative/robosuite.git -$ cd robosuite -``` + ```sh + $ git clone https://github.com/ARISE-Initiative/robosuite.git + $ cd robosuite + ``` 2. Install the base requirements with ```sh @@ -33,6 +35,6 @@ $ cd robosuite ``` 4. Test your installation with -```sh -$ python robosuite/demos/demo_random_action.py -``` \ No newline at end of file + ```sh + $ python robosuite/demos/demo_random_action.py + ``` \ No newline at end of file diff --git a/docs/modules/devices.md b/docs/modules/devices.md index 5561dd40fc..a496f8a5f4 100644 --- a/docs/modules/devices.md +++ b/docs/modules/devices.md @@ -11,7 +11,7 @@ We support keyboard input through the OpenCV2 window created by the mujoco rende Note that the rendering window must be active for these commands to work. | Keys | Command | -| :------: | :--------------------------------: | +| :------- | :--------------------------------- | | q | reset simulation | | spacebar | toggle gripper (open/close) | | w-a-s-d | move arm horizontally in x-y plane | @@ -28,7 +28,7 @@ We support the use of a [SpaceMouse](https://www.3dconnexion.com/spacemouse_comp **3Dconnexion SpaceMouse controls** | Control | Command | -| :-----------------------: | :-----------------------------------: | +| :------------------------ | :------------------------------------ | | Right button | reset simulation | | Left button (hold) | close gripper | | Move mouse laterally | move arm horizontally in x-y plane | diff --git a/docs/modules/renderers.md b/docs/modules/renderers.md index 081e464f62..2fec43bf1d 100644 --- a/docs/modules/renderers.md +++ b/docs/modules/renderers.md @@ -29,7 +29,7 @@ Installing NVISII can be done using the command `pip install nvisii`. Note that The following table shows the estimated frame rate of each renderer in frames per second (FPS). The profiling was conducted on a machine with Ubuntu 18.04, Intel Core i9-900K CPU@3.60GHz, and Nvidia RTX. The FPS numbers of each rendering option are reported below. These numbers are estimated on the Door environment with IIWA robot and Joint Velocity controller and 256x256 image size. | | mujoco | NVISII | -|-------------------|:---------:|:---------------------------------:|:-----------------------:|:----------------------:|:------:| +|-------------------|:---------:|:---------------------------------:| | Simulation + rendering | 62 | 0.5 | | Rendering only | 508 | 0.5 | @@ -38,7 +38,7 @@ For the same environment setup, we profiled the renderer on a machine with Ubunt and Nvidia GTX 1080ti. | | mujoco | NVISII | -|-------------------|:---------:|:---------------------------------:|:-----------------------:|:----------------------:|:------:| +|-------------------|:---------:|:---------------------------------:| | Simulation + rendering | 65 | 0.4 | | Rendering only | 1000 | 0.4 | diff --git a/docs/robosuite_color.png b/docs/robosuite_color.png new file mode 100644 index 0000000000..cad7964f13 Binary files /dev/null and b/docs/robosuite_color.png differ diff --git a/docs/simulation/environment.rst b/docs/simulation/environment.rst index f35a89f967..2773c27221 100644 --- a/docs/simulation/environment.rst +++ b/docs/simulation/environment.rst @@ -11,7 +11,6 @@ Base Environment .. autoclass:: robosuite.environments.base.MujocoEnv .. automethod:: initialize_time - .. automethod:: set_model_postprocessor .. automethod:: reset .. automethod:: step .. automethod:: reward diff --git a/docs/source/robosuite.renderers.rst b/docs/source/robosuite.renderers.rst index 749890cfeb..872c8aef73 100644 --- a/docs/source/robosuite.renderers.rst +++ b/docs/source/robosuite.renderers.rst @@ -7,7 +7,7 @@ Subpackages .. toctree:: :maxdepth: 4 - robosuite.renderers.mujoco + robosuite.renderers.context robosuite.renderers.nvisii Submodules diff --git a/docs/source/robosuite.rst b/docs/source/robosuite.rst index dbbc006723..444d18344c 100644 --- a/docs/source/robosuite.rst +++ b/docs/source/robosuite.rst @@ -16,6 +16,17 @@ Subpackages robosuite.utils robosuite.wrappers +Submodules +---------- + +robosuite.macros module +----------------------- + +.. automodule:: robosuite.macros + :members: + :undoc-members: + :show-inheritance: + Module contents --------------- diff --git a/docs/source/robosuite.utils.rst b/docs/source/robosuite.utils.rst index 641fda1433..be45a0de2e 100644 --- a/docs/source/robosuite.utils.rst +++ b/docs/source/robosuite.utils.rst @@ -4,6 +4,14 @@ robosuite.utils package Submodules ---------- +robosuite.utils.binding\_utils module +------------------------------------- + +.. automodule:: robosuite.utils.binding_utils + :members: + :undoc-members: + :show-inheritance: + robosuite.utils.buffers module ------------------------------ @@ -44,10 +52,10 @@ robosuite.utils.input\_utils module :undoc-members: :show-inheritance: -robosuite.macros module ------------------------------ +robosuite.utils.log\_utils module +--------------------------------- -.. automodule:: robosuite.macros +.. automodule:: robosuite.utils.log_utils :members: :undoc-members: :show-inheritance: @@ -84,6 +92,14 @@ robosuite.utils.observables module :undoc-members: :show-inheritance: +robosuite.utils.opencv\_renderer module +--------------------------------------- + +.. automodule:: robosuite.utils.opencv_renderer + :members: + :undoc-members: + :show-inheritance: + robosuite.utils.placement\_samplers module ------------------------------------------