diff --git a/.gitignore b/.gitignore index 07706deb..ed3d2114 100644 --- a/.gitignore +++ b/.gitignore @@ -79,6 +79,7 @@ instance/ # Sphinx documentation docs/_build/ +docs/src/api/_generated # PyBuilder .pybuilder/ diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..04f19676 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,37 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.10" + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/src/conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + # builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: docs/requirements.txt + - method: pip + path: . \ No newline at end of file diff --git a/README.md b/README.md index deafba72..68b8fb71 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -![Python 3.8 3.9](https://github.com/f1tenth/f1tenth_gym/actions/workflows/ci.yml/badge.svg) -![Docker](https://github.com/f1tenth/f1tenth_gym/actions/workflows/docker.yml/badge.svg) -![Code Style](https://github.com/f1tenth/f1tenth_gym/actions/workflows/lint.yml/badge.svg) +![Python 3.9 3.10 3.11](https://github.com/f1tenth/f1tenth_gym/actions/workflows/ci.yml/badge.svg?branch=v1.0.0) +![Code Style](https://github.com/f1tenth/f1tenth_gym/actions/workflows/lint.yml/badge.svg?branch=v1.0.0) # The F1TENTH Gym environment diff --git a/docs/Doxyfile b/docs/Doxyfile deleted file mode 100644 index 0faf1511..00000000 --- a/docs/Doxyfile +++ /dev/null @@ -1,11 +0,0 @@ -PROJECT_NAME = "f1tenth_gym" -INPUT = ../gym/f110_gym -GENERATE_LATEX = NO -GENERATE_MAN = NO -GENERATE_RTF = NO -CASE_SENSE_NAMES = NO -GENERATE_HTML = YES -GENERATE_XML = YES -RECURSIVE = YES -QUIET = YES -JAVADOC_AUTOBRIEF = YES \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile index d4bb2cbb..cf551fee 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,7 +5,7 @@ # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build -SOURCEDIR = . +SOURCEDIR = ./src BUILDDIR = _build # Put it first so that "make" without argument is like "make help". diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css deleted file mode 100644 index f09cf5d6..00000000 --- a/docs/_static/css/custom.css +++ /dev/null @@ -1,651 +0,0 @@ -/** - * Various tweaks to the Read the Docs theme to better conform with Godot's - * visual identity. Many colors are also overridden to use CSS variables. - * This makes it possible to provide an automatically-used dark theme - * based on browser preferences. - */ - - /* Default (light) theme colors */ - :root { - --body-color: #404040; - --content-wrap-background-color: #efefef; - --content-background-color: #fcfcfc; - --logo-opacity: 1.0; - --navbar-background-color: #333f67; - --navbar-background-color-hover: #29355c; - --navbar-background-color-active: #212d51; - --navbar-current-background-color: #212d51; - --navbar-current-background-color-hover: #182343; - --navbar-current-background-color-active: #131e3b; - --navbar-level-1-color: #c3e3ff; - --navbar-level-2-color: #b8d6f0; - --navbar-level-3-color: #a3c4e1; - --navbar-heading-color: #ff7381; - - --link-color: #2980b9; - --link-color-hover: #3091d1; - --link-color-active: #105078; - --link-color-visited: #9b59b6; - - --hr-color: #e1e4e5; - --table-row-odd-background-color: #f3f6f6; - --code-background-color: #fff; - --code-border-color: #e1e4e5; - --code-literal-color: #d04c60; - --input-background-color: #fcfcfc; - --input-focus-border-color: #5f8cff; - - --highlight-background-color: #f5ffe1; - --highlight-comment-color: #408090; - --highlight-keyword-color: #007020; - --highlight-keyword2-color: #902000; - --highlight-number-color: #208050; - --highlight-decorator-color: #4070a0; - --highlight-type-color: #007020; - --highlight-type2-color: #0e84b5; - --highlight-function-color: #06287e; - --highlight-operator-color: #666666; - --highlight-string-color: #4070a0; - - --admonition-note-background-color: #e7f2fa; - --admonition-note-color: #404040; - --admonition-note-title-background-color: #6ab0de; - --admonition-note-title-color: #fff; - --admonition-attention-background-color: #ffedcc; - --admonition-attention-color: #404040; - --admonition-attention-title-background-color: #f0b37e; - --admonition-attention-title-color: #fff; - --admonition-tip-background-color: #dbfaf4; - --admonition-tip-color: #404040; - --admonition-tip-title-background-color: #1abc9c; - --admonition-tip-title-color: #fff; - - --btn-neutral-background-color: #f3f6f6; - --btn-neutral-hover-background-color: #e5ebeb; - --footer-color: #808080; -} - - -/* Dark theme colors */ -/*@media (prefers-color-scheme: light) { - :root { - --body-color: rgba(255, 255, 255, 0.85); - --content-wrap-background-color: #202326; - --content-background-color: #2e3236; - /* Decrease the logo opacity when using the dark theme to be less distracting */ - --logo-opacity: 0.85; - --navbar-background-color: #25282b; - --navbar-background-color-hover: #333639; - --navbar-background-color-active: #111417; - --navbar-current-background-color: #333639; - --navbar-current-background-color-hover: #44474a; - --navbar-current-background-color-active: #222528; - --navbar-level-1-color: #ddd; - --navbar-level-2-color: #ccc; - --navbar-level-3-color: #bbb; - --navbar-heading-color: #ee7381; - - --link-color: #8cf; - --link-color-hover: #9df; - --link-color-active: #6ad; - --link-color-visited: #cb99f6; - - --hr-color: #555; - --table-row-odd-background-color: #3b3e41; - --code-background-color: #434649; - --code-border-color: #505356; - --code-literal-color: #faa; - --input-background-color: #333537; - --input-focus-border-color: #5f8cff; - - Colors taken from the Godot script editor with the Adaptive theme - --highlight-background-color: #202531; - --highlight-comment-color: rgba(204, 206, 211, 0.5); - --highlight-keyword-color: #ff7085; - --highlight-keyword2-color: #42ffc2; - --highlight-number-color: #a1ffe0; - --highlight-decorator-color: #abc8ff; - --highlight-type-color: #8effda; - --highlight-type2-color: #c6ffed; - --highlight-function-color: #57b3ff; - --highlight-operator-color: #abc8ff; - --highlight-string-color: #ffeca1; - - --admonition-note-background-color: #303d4f; - --admonition-note-color: #bfeeff; - --admonition-note-title-background-color: #305070; - --admonition-note-title-color: #bfefff; - --admonition-attention-background-color: #444033; - --admonition-attention-color: #ffeeaf; - --admonition-attention-title-background-color: #665022; - --admonition-attention-title-color: #ffeeaf; - --admonition-tip-background-color: #28382d; - --admonition-tip-color: #dfd; - --admonition-tip-title-background-color: #336648; - --admonition-tip-title-color: #dfd; - - --btn-neutral-background-color: #404040; - --btn-neutral-hover-background-color: #505050; - --footer-color: #aaa; - } -}*/ - - -body, -h1, -h2, -h3, -h4, -h5, -h6, -input[type="text"], -input[type="button"], -input[type="reset"], -input[type="submit"], -textarea, -legend, -.btn, -.rst-content .toctree-wrapper p.caption, -.rst-versions { - /* Use a system font stack for better performance (no Web fonts required) */ - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; -} - -h1, -h2, -h3, -h4, -h5, -h6, -legend, -.rst-content .toctree-wrapper p.caption { - /* Use a lighter font for headers (Medium instead of Bold) */ - font-weight: 500; -} - -p, -article ul, -article ol, -.wy-plain-list-disc, -.wy-plain-list-decimal, -.rst-content ol.arabic, -.rst-content .section ul, -.rst-content .toctree-wrapper ul, -.rst-content .section ol { - /* Increase the line height slightly to account for the different font */ - line-height: 25px; -} - -body, -.rst-content table.docutils thead { - color: var(--body-color); -} - -a { - color: var(--link-color); -} - -.sphinx-tabs .sphinx-menu a.item { - /* Original definition has `!important` */ - color: var(--link-color) !important; -} - -a:hover { - color: var(--link-color-hover); - text-decoration: underline; -} - -a:active { - /* Add visual feedback when clicking on a link */ - color: var(--link-color-active); -} - -a:visited { - color: var(--link-color-visited); -} - -a.btn:hover { - text-decoration: none; -} - -hr, -#search-results .search li:first-child, -#search-results .search li { - border-color: var(--hr-color); -} - -/* Doesn't seem to be used on Read the Docs online builds, but is present when building locally */ -.rst-content dl:not(.docutils) dt { - background-color: var(--admonition-note-background-color); - border-color: var(--admonition-note-title-background-color); - color: var(--admonition-note-color); -} - -footer, -#search-results .context { - color: var(--footer-color); -} - -.footer { - padding: 1vw; -} -.footer-print { - font-size: 12px; - font-family: Montserrat; - text-align: center; - padding: 2vw; - border: 1px; - border-style: solid; - border-top-color: rgb(223,210,255); - border-left-color: #fff; - border-right-color: #fff; - border-bottom-color: #fff; - margin:0vw 10vw; -} - -/* Main sections */ - -.wy-nav-content-wrap { - background-color: var(--content-wrap-background-color); -} - -.wy-nav-content { - background-color: var(--content-background-color); -} - -.wy-body-for-nav { - background-color: var(--content-wrap-background-color); -} - -@media only screen and (min-width: 768px) { - .wy-body-for-nav { - /* Center the page on wide displays for better readability */ - max-width: 1100px; - margin: 0 auto; - } -} - -/* Table display tweaks */ - -.rst-content table.docutils, -.wy-table-bordered-all td, -.rst-content table.docutils td, -.wy-table thead th, -.rst-content table.docutils thead th, -.rst-content table.field-list thead th { - border-color: var(--code-border-color); -} - -.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-color: var(--table-row-odd-background-color); -} - -/* Code display tweaks */ - -code, -.rst-content tt, -.rst-content code { - font-size: 14px; - background-color: var(--code-background-color); - border: 1px solid var(--code-border-color); -} - -.rst-content tt.literal, -.rst-content code.literal { - color: var(--code-literal-color); -} - -.rst-content div[class^="highlight"] { - border-color: var(--code-border-color); -} - -.rst-content pre.literal-block, -.rst-content div[class^="highlight"] pre, -.rst-content .linenodiv pre { - /* Increase the font size and line height in code blocks */ - font-size: 14px; - line-height: 1.5; -} - -/* Code tab display tweaks */ - -.ui.tabular.menu .active.item, -.ui.segment { - background-color: var(--code-background-color); -} - -/* Syntax highlighting */ - -.highlight { - background-color: var(--highlight-background-color); -} - -.highlight .c1, -.highlight .cm { - color: var(--highlight-comment-color); -} - -.highlight .bp, -.highlight .k, -.highlight .kd, -.highlight .kn, -.highlight .kt, -.highlight .ow { - color: var(--highlight-keyword-color); -} - -.highlight .cp { - color: var(--highlight-keyword2-color); -} - -.highlight .m, -.highlight .mf, -.highlight .mi { - color: var(--highlight-number-color); -} - -.highlight .na { - color: var(--highlight-decorator-color); -} - -.highlight .nb { - color: var(--highlight-type-color); -} - -.highlight .nc, -.highlight .nn, -.highlight .nv { - color: var(--highlight-type2-color); -} - -.highlight .nf { - color: var(--highlight-function-color); -} - -.highlight .o { - color: var(--highlight-operator-color); -} - -.highlight .cpf, -.highlight .s, -.highlight .s1, -.highlight .s2, -.highlight .se { - color: var(--highlight-string-color); -} - -/* Admonition tweaks */ - -.rst-content .admonition.note, -.rst-content .admonition.seealso { - background-color: var(--admonition-note-background-color); - color: var(--admonition-note-color); -} - -.rst-content .admonition.note .admonition-title, -.rst-content .admonition.seealso .admonition-title { - background-color: var(--admonition-note-title-background-color); - color: var(--admonition-note-title-color); -} - -.rst-content .admonition.attention, -.rst-content .admonition.caution, -.rst-content .admonition.warning { - background-color: var(--admonition-attention-background-color); - color: var(--admonition-attention-color); -} - -.rst-content .admonition.attention .admonition-title, -.rst-content .admonition.caution .admonition-title, -.rst-content .admonition.warning .admonition-title { - background-color: var(--admonition-attention-title-background-color); - color: var(--admonition-attention-title-color); -} - -.rst-content .admonition.tip, -.rst-content .admonition.important { - background-color: var(--admonition-tip-background-color); - color: var(--admonition-tip-color); -} - -.rst-content .admonition.tip .admonition-title, -.rst-content .admonition.important .admonition-title { - background-color: var(--admonition-tip-title-background-color); - color: var(--admonition-tip-title-color); -} - -/* Buttons */ - -.btn-neutral { - background-color: var(--btn-neutral-background-color) !important; - color: var(--body-color) !important; -} - -.btn-neutral:hover { - background-color: var(--btn-neutral-hover-background-color) !important; -} - -.btn-neutral:visited { - color: var(--body-color) !important; -} - -/* Navigation bar logo and search */ - -.logo { - opacity: var(--logo-opacity); -} - -.wy-side-nav-search { - background-color: var(--navbar-background-color); -} - -.wy-side-nav-search.fixed { - position: fixed; -} - -@media only screen and (min-width: 768px) { - /* Simulate a drop shadow that only affects the bottom edge */ - /* This is used to indicate the search bar is fixed */ - .wy-side-nav-search.fixed::after { - content: ''; - position: absolute; - left: 0; - bottom: -8px; - width: 300px; - height: 8px; - pointer-events: none; - background: linear-gradient(hsla(0, 0%, 0%, 0.2), transparent); - } -} - -.wy-side-nav-search > a:hover, -.wy-side-nav-search .wy-dropdown > a:hover { - background-color: var(--navbar-background-color-hover); -} - -.wy-side-nav-search > a:active, -.wy-side-nav-search .wy-dropdown > a:active { - background-color: var(--navbar-background-color-active); -} - -.wy-side-nav-search input[type="text"] { - background-color: var(--input-background-color); - color: var(--body-color); - /* Avoid reflowing when toggling the focus state */ - border: 2px solid transparent; - box-shadow: none; - /* Make visual feedback instant */ - transition: none; - font-size: 14px; -} - -.wy-side-nav-search input[type="text"]:focus { - border: 2px solid var(--input-focus-border-color); -} - -.wy-side-nav-search input[type="text"]::placeholder { - color: var(--body-color); - opacity: 0.55; -} - -/* Navigation bar */ - -.wy-nav-side { - background-color: var(--navbar-background-color); -} - -@media only screen and (min-width: 768px) { - .wy-nav-side { - /* Required to center the page on wide displays */ - left: inherit; - } -} - -.wy-menu-vertical header, -.wy-menu-vertical p.caption { - color: var(--navbar-heading-color); - - /* Improves the appearance of uppercase text */ - letter-spacing: 0.75px; -} - -/* Mobile navigation */ - -.wy-nav-top, -.wy-nav-top a { - background-color: var(--navbar-background-color); - color: var(--navbar-level-1-color); -} - -/* Version branch label below the logo */ -.wy-side-nav-search > div.version { - color: var(--navbar-level-3-color); - opacity: 0.9; -} - -/* First level of navigation items */ - -.wy-menu-vertical { - /* Account for the increased `toctree-expand` button margins */ - width: 308px; -} - -.wy-menu-vertical a { - color: var(--navbar-level-1-color); -} - -.wy-menu-vertical a:hover { - background-color: var(--navbar-background-color-hover); - color: var(--navbar-level-1-color); -} - -.wy-menu-vertical a:active { - background-color: var(--navbar-background-color-active); -} - -.wy-menu-vertical li.toctree-l1.current > a { - border: none; -} - -.wy-side-nav-search, .wy-menu-vertical a, .wy-menu-vertical a span.toctree-expand, -.wy-menu-vertical li.toctree-l2 a span.toctree-expand { - color: var(--navbar-level-3-color); - opacity: 0.9; - margin-right: 8px; -} - -.wy-side-nav-search, .wy-menu-vertical a, .wy-menu-vertical a:hover span.toctree-expand, -.wy-menu-vertical li.toctree-l2 a:hover span.toctree-expand { - color: var(--navbar-level-2-color); - opacity: 1; -} - -.wy-side-nav-search, .wy-menu-vertical a, .wy-menu-vertical a:active span.toctree-expand, -.wy-menu-vertical li.toctree-l2 a:active span.toctree-expand { - color: var(--navbar-level-1-color); - opacity: 1; -} - -/* Second (and higher) levels of navigation items */ - -.wy-menu-vertical li.current a { - /* Make long words always display on a single line, keep wrapping for multiple words */ - /* This fixes the class reference titles' display with very long class names */ - display: flex; -} - -.wy-menu-vertical li.current a, -.wy-menu-vertical li.toctree-l2.current > a, -.wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a, -.wy-menu-vertical li.toctree-l2.current li.toctree-l4 > a { - background-color: var(--navbar-current-background-color); - color: var(--navbar-level-2-color); - border-color: var(--navbar-current-background-color); -} - -.wy-menu-vertical li.current a:hover, -.wy-menu-vertical li.toctree-l2.current > a:hover, -.wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a:hover, -.wy-menu-vertical li.toctree-l3.current li.toctree-l4 > a:hover { - background-color: var(--navbar-current-background-color-hover); -} - -.wy-menu-vertical li.current a:active, -.wy-menu-vertical li.toctree-l2.current > a:active, -.wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a:active, -.wy-menu-vertical li.toctree-l3.current li.toctree-l4 > a:active { - background-color: var(--navbar-current-background-color-active); -} - -/* Version selector (only visible on Read the Docs) */ - -.rst-versions { - background-color: var(--navbar-current-background-color); -} - -@media only screen and (min-width: 768px) { - .rst-versions { - /* Required to center the page on wide displays */ - left: inherit; - } -} - -.rst-versions a, -.rst-versions .rst-current-version, -.rst-versions .rst-current-version .fa, -.rst-versions .rst-other-versions dd a { - color: var(--navbar-level-1-color); -} - -.rst-versions .rst-other-versions small { - color: var(--navbar-level-3-color); -} - -.rst-versions .rst-other-versions dd a:hover { - text-decoration: underline; -} - -.rst-versions .rst-other-versions { - color: var(--navbar-heading-color); -} - -.rst-versions .rst-current-version { - background-color: var(--navbar-current-background-color); -} - -.rst-versions .rst-current-version:hover { - background-color: var(--navbar-current-background-color-hover); -} - -.rst-versions .rst-current-version:active { - background-color: var(--navbar-current-background-color-active); -} - -/* Hide the obnoxious automatic highlight in search results */ -.rst-content .highlighted { - background-color: transparent; - font-weight: inherit; - padding: 0; -} diff --git a/docs/_static/js/custom.js b/docs/_static/js/custom.js deleted file mode 100644 index 7f05c957..00000000 --- a/docs/_static/js/custom.js +++ /dev/null @@ -1,48 +0,0 @@ -// The number of pixels the user must scroll by before the logo is hidden. -const scrollTopPixels = 234; - -// The margin to apply to the menu when the search bar is made fixed. -// Should roughly match the logo's height as to not hide the top menu items -// behind it. -const menuTopMargin = '330px'; - -// Hide the navigation bar logo when scrolling down on desktop platforms. -// The logo is quite tall, so this helps make the rest of the navigation bar -// more readable. -function registerOnScrollEvent(mediaQuery) { - // The navigation bar that contains the logo. - const $navbar = $('.wy-side-scroll'); - const $menu = $('.wy-menu-vertical'); - const $search = $('.wy-side-nav-search'); - - // The anchor that contains the logo. This element will be hidden - // (instead of hiding just the logo), otherwise, a small clickable area - // would remain visible. - const $logo = $('.wy-side-nav-search > a'); - - if (mediaQuery.matches) { - // We're on desktop; register the scroll event. - $navbar.scroll(function() { - if ($(this).scrollTop() >= scrollTopPixels) { - $logo.hide(); - $search.addClass('fixed'); - $menu.css('margin-top', menuTopMargin); - } else { - $logo.show(); - $search.removeClass('fixed'); - $menu.css('margin-top', 0); - } - }); - } else { - // We're on mobile; unregister the scroll event so the logo isn't hidden - // when scrolling. - $logo.show(); - $navbar.unbind('scroll'); - } -} - -$(document).ready(() => { - const mediaQuery = window.matchMedia('only screen and (min-width: 768px)'); - registerOnScrollEvent(mediaQuery); - mediaQuery.addListener(registerOnScrollEvent); -}); diff --git a/docs/api/dynamic_models.rst b/docs/api/dynamic_models.rst deleted file mode 100644 index c7c9da68..00000000 --- a/docs/api/dynamic_models.rst +++ /dev/null @@ -1,7 +0,0 @@ -Dynamic Models -======================================== - -This file contains all numba just-in-time compiled function for the dynamic models. - -.. doxygenfile:: dynamic_models.py - :project: f1tenth_gym \ No newline at end of file diff --git a/docs/api/env.rst b/docs/api/env.rst deleted file mode 100644 index da9c8413..00000000 --- a/docs/api/env.rst +++ /dev/null @@ -1,7 +0,0 @@ -Gym Environment -======================================== - -This is the top level file that conforms to the OpenAI gym convention. - -.. doxygenfile:: f110_env.py - :project: f1tenth_gym \ No newline at end of file diff --git a/docs/api/obv.rst b/docs/api/obv.rst deleted file mode 100644 index 78c60d45..00000000 --- a/docs/api/obv.rst +++ /dev/null @@ -1,14 +0,0 @@ -What's In an Observation -============================ - -An observation is returned by the gym environment after resetting and stepping. An observation is a dictionary with the following keys: - -- ``'ego_idx'``: index of the ego agent in the list of agents -- ``'scans'``: list of length num_agents of numpy.ndarrays of (num_beams, ), each array is the corresponding laser scan of the agent in the list -- ``'poses_x'``: list of length num_agents of floats, each agent's x pose in the world -- ``'poses_y'``: list of length num_agents of floats, each agent's y pose in the world -- ``'poses_theta'``: list of length num_agents of floats, each agent's theta pose in the world -- ``'linear_vels_x'``: list of length num_agents of floats, each agent's current longitudinal velocity -- ``'linear_vels_y'``: list of length num_agents of zeros -- ``'ang_vels_z'``: list of length num_agents of floats, each agent's current yaw rate -- ``'collisions'``: list of length num_agents of 1s or 0s, whether each agent is in collision with another agent or the environment \ No newline at end of file diff --git a/docs/api/rendering.rst b/docs/api/rendering.rst deleted file mode 100644 index dc439563..00000000 --- a/docs/api/rendering.rst +++ /dev/null @@ -1,7 +0,0 @@ -Rendering Engine -======================================== - -This is the rendering engine using pyglet to visualize the running environment. - -.. doxygenfile:: rendering.py - :project: f1tenth_gym \ No newline at end of file diff --git a/docs/basic_usage.rst b/docs/basic_usage.rst deleted file mode 100644 index 9fbdf928..00000000 --- a/docs/basic_usage.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. _basic_usage: - -Basic Usage Example -===================== - -The environment can work out of the box without too much customization. - -A gym env could be instantiated without any extra arguments. By default, it spawns two agents in the Vegas (IROS 2020) map. You can find the image of the map at ``gym/f110_gym/envs/maps/vegas.png``. At instantiation, the index of the ego agent in the list of agents is 0. - -The agents can be reset by calling the ``reset()`` method using a numpy ndarray of size ``(num_agents, 2)``, where each row represents an agent, and the columns are the ``(x, y)`` coordinate of each agent. - -The ``reset()`` and ``step()`` method returns: - - An *observation* dictionary - - A *step reward*, which in the current release is the physics timestep used. - - A *done* boolean indicator, flips to true when either a collision happens or the ego agent finishes 2 laps. - - An *info* dictionary. Empty in the current release. - -The action taken by the ``step()`` function is a numpy ndarray of size ``(num_agents, 2)``, where each row represents an agent's action (indices corresponds to the list of agents), and the columns are control inputs (steering angle, velocity). - -A working example can be found in ``examples/waypoint_follow.py``. - -The following pseudo code provides a skeleton for creating a simulation loop. - -.. code:: python - - import gym - import numpy as np - from your_custom_policy import planner # the policy/motion planner that you create - - # instantiating the environment - racecar_env = gym.make('f110_gym:f110-v0') - obs, step_reward, done, info = racecar_env.reset(np.array([[0., 0., 0.], # pose of ego - [2., 0., 0.]])) # pose of 2nd agent - # instantiating your policy - planner = planner() - - # simulation loop - lap_time = 0. - - # loops when env not done - while not done: - # get action based on the observation - actions = planner.plan(obs) - - # stepping through the environment - obs, step_reward, done, info = racecar_env.step(actions) - - lap_time += step_reward - -For a more in-depth example that provides more customization to the environment, see :ref:`custom_usage`. diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index c3decdd4..00000000 --- a/docs/conf.py +++ /dev/null @@ -1,82 +0,0 @@ -# flake8: noqa -import os - -import sphinx_rtd_theme - -source_suffix = ".rst" -source_encoding = "utf-8-sig" - -# -- Language ---------------------------------------------------------------- -env_tags = os.getenv("SPHINX_TAGS") -if env_tags is not None: - for tag in env_tags.split(","): - print("Adding Sphinx tag: %s" % tag.strip()) - tags.add(tag.strip()) - -language = os.getenv("READTHEDOCS_LANGUAGE", "en") -is_i18n = tags.has("i18n") - -# -- Theme ------------------------------------------------------------------- -on_rtd = os.environ.get("READTHEDOCS", None) == "True" -html_theme = "sphinx_rtd_theme" -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] -if on_rtd: - using_rtd_theme = True -html_theme_options = { - # 'typekit_id': 'hiw1hhg', - # 'analytics_id': '', - # 'sticky_navigation': True # Set to False to disable the sticky nav while scrolling. - "logo_only": False, # if we have a html_logo below, this shows /only/ the logo with no title text - "collapse_navigation": False, # Collapse navigation (False makes it tree-like) - "prev_next_buttons_location": "bottom", - # 'display_version': True, # Display the docs version - # 'navigation_depth': 4, # Depth of the headers shown in the navigation bar -} -html_context = { - "display_github": not is_i18n, # Integrate GitHub - "github_user": "f1tenth", # Username - "github_repo": "f1tenth_gym", # Repo name - "github_version": "exp_py", # Version - "conf_py_path": "/docs/", # Path in the checkout to the docs root -} - -html_favicon = "assets/f1_stickers_02.png" - -html_css_files = ["css/custom.css"] - -html_js_files = ["css/custom.js"] -html_logo = "assets/f1tenth_gym.svg" - -# -- Project information ----------------------------------------------------- - -project = "f1tenth_gym" -copyright = "2021, Hongrui Zheng, Matthew O'Kelly, Aman Sinha" -author = "Hongrui Zheng" - -# The full version, including alpha/beta/rc tags -release = "latest" -version = "latest" - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = ["breathe", "sphinx_rtd_theme", "sphinx.ext.autosectionlabel"] - -# Breathe configuration -breathe_projects = {"f1tenth_gym": "./xml"} - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] diff --git a/docs/customized_usage.rst b/docs/customized_usage.rst deleted file mode 100644 index 7025de86..00000000 --- a/docs/customized_usage.rst +++ /dev/null @@ -1,165 +0,0 @@ -.. _custom_usage: - -Customized Usage Example -========================== - -For a basic usage example, see :ref:`basic_usage`. - -The environment also provides options for customization. - -Custom Map ------------- - -The environment uses a convention that is similar to the ROS map convention. A map for the environment is created by two files: a ``yaml`` file containing the metadata of the map, and a single channel black and white image that represents the map, where black pixels are obstacles and white pixels are free space. - -Map Metadata File (yaml) -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Only the ``resolution`` and the ``origin`` fields in the yaml files are used by the environment, and only the first two coordinates in the ``origin`` field are used. The unit of the resolution is *m/pixel*. The x and y (first two) numbers in the origin field are used to determine where the origin of the map frame is. Note that these two numbers follow the ROS convention. They represent the **bottom left** corner of the map image's coordinate in the world. - -Map Image File -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -A black and white, single channel image is used to represent free space and obstacles. For example, the Vegas map looks like this: - -.. image:: ../gym/f110_gym/envs/maps/vegas.png - :width: 300 - :align: center - -Using a Custom Map -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The environment can be instantiated with arguments for a custom map. First, you can place your custom map files (.yaml and the image file) in the same directory, for example ``/your/path/to/map.yaml`` and ``/your/path/to/map.png``. Then you can create the environment with the absolute path to these files like this: - -.. code:: python - - env = gym.make('f110_gym:f110-v0', - map='/your/path/to/map', - map_ext='.png') - -The ``map`` argument takes the absolute path to the map files **without** any extensions, and the ``map_ext`` argument takes the extension to the map image file. **Note** that it is assumed that the two files are in the **same directory**, and have the **same filename** (not including the extensions, for example map.png and map.yaml) - -Random Track Generator (Beta) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -A random track generator derived from the OpenAI CarRacing environment is also provided in ``gym/f110_gym/unittest/random_trackgen.py``. Note that it requires extra dependencies. ``OpenCV`` is required for image manipulation and IO operations, ``shapely`` and ``matplotlib`` are required for image generation. For OpenCV, you can follow the tutorial at https://docs.opencv.org/master/df/d65/tutorial_table_of_content_introduction.html for installation on different platforms. Then you can install ``shapely`` and ``matplotlib`` with: ``$ pip3 install shapely matplotlib``. - -After you've installed the dependencies, you can run the track generator by: - -.. code:: bash - - $ python3 random_trackgen.py --seed 12345 --num_maps 1 - -where the ``--seed`` argument (int, default 123) is for reproducibility, and the ``--num_maps`` argument is for the number of maps you want to generate. By default, the script will create two directories in ``unittest``: ``unittest/maps`` and ``unittest/centerline``. The former contains all the map metadata and map image files, and the latter contains a csv file of the (x, y) coordinates of the points on the centerline of the track. - -An example of a randomly generated track: - -.. image:: ../examples/example_map.png - :width: 300 - :align: center - -Multiple Agents ------------------ - -You can instantiate an environment with any number of agents (default is 2). For example: - -.. code:: python - - env = gym.make('f110_gym:f110-v0', - num_agents=3) - -This will create an environment with 3 agents. Note that your call to the ``reset()`` and ``step()`` function will have to change accordingly: - -.. code:: python - - _, _, _, _ = env.reset(np.array([[ego_x, ego_y], - [opp1_x, opp1_y], - [opp2_x, opp2_y]])) - _, _, _, _ = env.step(np.array([[ego_steer, ego_speed], - [opp1_steer, opp1_speed], - [opp2_steer, opp2_speed]])) - -Note that performance of the environment will start to degrade as more and more agents are added. - -Changing Parameters in Vehicle Dynamics ------------------------------------------- - -The vehicle dynamic model used in the environment is the Single-Track Model from https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/. - -You can change the default paramters (identified on concrete floor with the default configuration F1TENTH vehicle) used in the environment in two ways. - -1. You could instantiate the environment with a parameter dictionary: - -.. code:: python - - params_dict = {'mu': 1.0489, - 'C_Sf': 4.718, - 'C_Sr': 5.4562, - 'lf': 0.15875, - 'lr': 0.17145, - 'h': 0.074, - 'm': 3.74, - 'I': 0.04712, - 's_min': -0.4189, - 's_max': 0.4189, - 'sv_min': -3.2, - 'sv_max': 3.2, - 'v_switch':7.319, - 'a_max': 9.51, - 'v_min':-5.0, - 'v_max': 20.0, - 'width': 0.31, - 'length': 0.58} - env = gym.make('f110_gym:f110-v0', params=params_dict) - -2. Or you could update the parameters of a specific vehicle in the list of vehicles (or all vehicles): - -.. code:: python - - # env with default params and 2 agents - env = gym.make('f110_gym:f110-v0') - - # new params - params_dict = {'mu': 1.0489, - 'C_Sf': 4.718, - 'C_Sr': 5.4562, - 'lf': 0.15875, - 'lr': 0.17145, - 'h': 0.074, - 'm': 3.74, - 'I': 0.04712, - 's_min': -0.4189, - 's_max': 0.4189, - 'sv_min': -3.2, - 'sv_max': 3.2, - 'v_switch':7.319, - 'a_max': 9.51, - 'v_min':-5.0, - 'v_max': 20.0, - 'width': 0.31, - 'length': 0.58} - - # update params of only the 2nd vehicles - env.update_params(params_dict, index=1) - - # update params of all vehicles - env.update_params(params_dict) - -The dynamic model's physical parameters are: - - **mu**: surface friction coefficient *[-]* - - **C_Sf**: Cornering stiffness coefficient, front *[1/rad]* - - **C_Sr**: Cornering stiffness coefficient, rear *[1/rad]* - - **lf**: Distance from center of gravity to front axle *[m]* - - **lr**: Distance from center of gravity to rear axle *[m]* - - **h**: Height of center of gravity *[m]* - - **m**: Total mass of the vehicle *[kg]* - - **I**: Moment of inertial of the entire vehicle about the z axis *[kgm^2]* - - **s_min**: Minimum steering angle constraint *[rad]* - - **s_max**: Maximum steering angle constraint *[rad]* - - **sv_min**: Minimum steering velocity constraint *[rad/s]* - - **sv_max**: Maximum steering velocity constraint *[rad/s]* - - **v_switch**: Switching velocity (velocity at which the acceleration is no longer able to create wheel spin) *[m/s]* - - **a_max**: Maximum longitudinal acceleration *[m/s^2]* - - **v_min**: Minimum longitudinal velocity *[m/s]* - - **v_max**: Maximum longitudinal velocity *[m/s]* - - **width**: width of the vehicle *[m]* - - **length**: length of the vehicle *[m]* diff --git a/docs/html/annotated.html b/docs/html/annotated.html deleted file mode 100644 index aa25b01d..00000000 --- a/docs/html/annotated.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -f1tenth_gym: Class List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Class List
-
-
-
Here are the classes, structs, unions and interfaces with brief descriptions:
-
[detail level 1234]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Nf110_gym
 Nenvs
 Nbase_classes
 CRaceCar
 CSimulator
 Ncollision_models
 CCollisionTests
 Ndynamic_models
 CDynamicsTest
 Nf110_env
 CF110Env
 Nf110_env_backup
 CF110Env
 Nlaser_models
 CScanSimulator2D
 CScanTests
 Nrendering
 CEnvRenderer
 Nunittest
 Ncollision_checks
 CCollisionTests
 Ndynamics_test
 CDynamicsTest
 Npyglet_test
 CCamera
 CCenteredCamera
 Npyglet_test_camera
 CApp
 Nscan_sim
 CScanSimulator2D
 CScanTests
-
-
- - - - diff --git a/docs/html/bc_s.png b/docs/html/bc_s.png deleted file mode 100644 index 224b29aa..00000000 Binary files a/docs/html/bc_s.png and /dev/null differ diff --git a/docs/html/bdwn.png b/docs/html/bdwn.png deleted file mode 100644 index 940a0b95..00000000 Binary files a/docs/html/bdwn.png and /dev/null differ diff --git a/docs/html/classes.html b/docs/html/classes.html deleted file mode 100644 index e273ab58..00000000 --- a/docs/html/classes.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - -f1tenth_gym: Class Index - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Class Index
-
-
-
a | c | d | e | f | r | s
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  a  
-
CenteredCamera (f110_gym.unittest.pyglet_test)   DynamicsTest (f110_gym.unittest.dynamics_test)   F110Env (f110_gym.envs.f110_env)   ScanSimulator2D (f110_gym.envs.laser_models)   
CollisionTests (f110_gym.unittest.collision_checks)   
  e  
-
  r  
-
ScanTests (f110_gym.unittest.scan_sim)   
App (f110_gym.unittest.pyglet_test_camera)   CollisionTests (f110_gym.envs.collision_models)   ScanTests (f110_gym.envs.laser_models)   
  c  
-
  d  
-
EnvRenderer (f110_gym.envs.rendering)   RaceCar (f110_gym.envs.base_classes)   Simulator (f110_gym.envs.base_classes)   
  f  
-
  s  
-
Camera (f110_gym.unittest.pyglet_test)   DynamicsTest (f110_gym.envs.dynamic_models)   
F110Env (f110_gym.envs.f110_env_backup)   ScanSimulator2D (f110_gym.unittest.scan_sim)   
-
a | c | d | e | f | r | s
-
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car-members.html b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car-members.html deleted file mode 100644 index 71b2699e..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car-members.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.envs.base_classes.RaceCar Member List
-
-
- -

This is the complete list of members for f110_gym.envs.base_classes.RaceCar, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
__init__(self, params, is_ego=False, time_step=0.01, num_beams=1080, fov=4.7)f110_gym.envs.base_classes.RaceCar
accel (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
check_ttc(self)f110_gym.envs.base_classes.RaceCar
cosines (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
current_scan (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
fov (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
in_collision (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
is_ego (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
num_beams (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
opp_poses (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
params (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
ray_cast_agents(self, scan)f110_gym.envs.base_classes.RaceCar
reset(self, pose)f110_gym.envs.base_classes.RaceCar
scan_angles (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
scan_simulator (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
set_map(self, map_path, map_ext)f110_gym.envs.base_classes.RaceCar
side_distances (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
state (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
steer_angle_vel (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
steer_buffer (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
steer_buffer_size (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
time_step (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
ttc_thresh (defined in f110_gym.envs.base_classes.RaceCar)f110_gym.envs.base_classes.RaceCar
update_opp_poses(self, opp_poses)f110_gym.envs.base_classes.RaceCar
update_params(self, params)f110_gym.envs.base_classes.RaceCar
update_pose(self, raw_steer, vel)f110_gym.envs.base_classes.RaceCar
update_scan(self)f110_gym.envs.base_classes.RaceCar
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html deleted file mode 100644 index 0f1b2a5c..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.envs.base_classes.RaceCar Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.envs.base_classes.RaceCar Class Reference
-
-
-
-Inheritance diagram for f110_gym.envs.base_classes.RaceCar:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.envs.base_classes.RaceCar:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

def __init__ (self, params, is_ego=False, time_step=0.01, num_beams=1080, fov=4.7)
 
def update_params (self, params)
 
def set_map (self, map_path, map_ext)
 
def reset (self, pose)
 
def ray_cast_agents (self, scan)
 
def check_ttc (self)
 
def update_pose (self, raw_steer, vel)
 
def update_opp_poses (self, opp_poses)
 
def update_scan (self)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

params
 
is_ego
 
time_step
 
num_beams
 
fov
 
state
 
opp_poses
 
accel
 
steer_angle_vel
 
steer_buffer
 
steer_buffer_size
 
in_collision
 
ttc_thresh
 
scan_simulator
 
current_scan
 
cosines
 
scan_angles
 
side_distances
 
-

Detailed Description

-
Base level race car class, handles the physics and laser scan of a single vehicle
-
-Data Members:
-    params (dict): vehicle parameters dictionary
-    is_ego (bool): ego identifier
-    time_step (float): physics timestep
-    num_beams (int): number of beams in laser
-    fov (float): field of view of laser
-    state (np.ndarray (7, )): state vector [x, y, theta, vel, steer_angle, ang_vel, slip_angle]
-    odom (np.ndarray(13, )): odometry vector [x, y, z, qx, qy, qz, qw, linear_x, linear_y, linear_z, angular_x, angular_y, angular_z]
-    accel (float): current acceleration input
-    steer_angle_vel (float): current steering velocity input
-    in_collision (bool): collision indicator

Constructor & Destructor Documentation

- -

◆ __init__()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.RaceCar.__init__ ( self,
 params,
 is_ego = False,
 time_step = 0.01,
 num_beams = 1080,
 fov = 4.7 
)
-
-
Init function
-
-Args:
-    params (dict): vehicle parameter dictionary, includes {'mu', 'C_Sf', 'C_Sr', 'lf', 'lr', 'h', 'm', 'I', 's_min', 's_max', 'sv_min', 'sv_max', 'v_switch', 'a_max': 9.51, 'v_min', 'v_max', 'length', 'width'}
-    is_ego (bool, default=False): ego identifier
-    time_step (float, default=0.01): physics sim time step
-    num_beams (int, default=1080): number of beams in the laser scan
-    fov (float, default=4.7): field of view of the laser
-
-Returns:
-    None
-
-
-
-

Member Function Documentation

- -

◆ check_ttc()

- -
-
- - - - - - - - -
def f110_gym.envs.base_classes.RaceCar.check_ttc ( self)
-
-
Check iTTC against the environment, sets vehicle states accordingly if collision occurs.
-Note that this does NOT check collision with other agents.
-
-state is [x, y, steer_angle, vel, yaw_angle, yaw_rate, slip_angle]
-
-Args:
-    None
-
-Returns:
-    None
-
-
-
- -

◆ ray_cast_agents()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.RaceCar.ray_cast_agents ( self,
 scan 
)
-
-
Ray cast onto other agents in the env, modify original scan
-
-Args:
-    scan (np.ndarray, (n, )): original scan range array
-
-Returns:
-    new_scan (np.ndarray, (n, )): modified scan
-
-
-
- -

◆ reset()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.RaceCar.reset ( self,
 pose 
)
-
-
Resets the vehicle to a pose
-
-Args:
-    pose (np.ndarray (3, )): pose to reset the vehicle to
-
-Returns:
-    None
-
-
-
- -

◆ set_map()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.RaceCar.set_map ( self,
 map_path,
 map_ext 
)
-
-
Sets the map for scan simulator
-
-Args:
-    map_path (str): absolute path to the map yaml file
-    map_ext (str): extension of the map image file
-
-
-
- -

◆ update_opp_poses()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.RaceCar.update_opp_poses ( self,
 opp_poses 
)
-
-
Updates the vehicle's information on other vehicles
-
-Args:
-    opp_poses (np.ndarray(num_other_agents, 3)): updated poses of other agents
-
-Returns:
-    None
-
-
-
- -

◆ update_params()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.RaceCar.update_params ( self,
 params 
)
-
-
Updates the physical parameters of the vehicle
-Note that does not need to be called at initialization of class anymore
-
-Args:
-    params (dict): new parameters for the vehicle
-
-Returns:
-    None
-
-
-
- -

◆ update_pose()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.RaceCar.update_pose ( self,
 raw_steer,
 vel 
)
-
-
Steps the vehicle's physical simulation
-
-Args:
-    steer (float): desired steering angle
-    vel (float): desired longitudinal velocity
-
-Returns:
-    None
-
-
-
- -

◆ update_scan()

- -
-
- - - - - - - - -
def f110_gym.envs.base_classes.RaceCar.update_scan ( self)
-
-
Steps the vehicle's laser scan simulation
-Separated from update_pose because needs to update scan based on NEW poses of agents in the environment
-
-Args:
-    None
-
-Returns:
-    None
-
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car.png b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car.png deleted file mode 100644 index 9c1114a3..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__coll__graph.map b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__coll__graph.map deleted file mode 100644 index 42abcf76..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__coll__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__coll__graph.md5 deleted file mode 100644 index 3a360bb2..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -e036bd71c7bbe37faf37a4e9a1d76183 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__coll__graph.png b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__coll__graph.png deleted file mode 100644 index 5f832796..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__inherit__graph.map b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__inherit__graph.map deleted file mode 100644 index 42abcf76..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__inherit__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__inherit__graph.md5 deleted file mode 100644 index 3a360bb2..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -e036bd71c7bbe37faf37a4e9a1d76183 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__inherit__graph.png b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__inherit__graph.png deleted file mode 100644 index 5f832796..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_race_car__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator-members.html b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator-members.html deleted file mode 100644 index 9a8c8ed3..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator-members.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.envs.base_classes.Simulator Member List
-
-
- -

This is the complete list of members for f110_gym.envs.base_classes.Simulator, including all inherited members.

- - - - - - - - - - - - - - - -
__init__(self, params, num_agents, time_step=0.01, ego_idx=0)f110_gym.envs.base_classes.Simulator
agent_poses (defined in f110_gym.envs.base_classes.Simulator)f110_gym.envs.base_classes.Simulator
agents (defined in f110_gym.envs.base_classes.Simulator)f110_gym.envs.base_classes.Simulator
check_collision(self)f110_gym.envs.base_classes.Simulator
collision_idx (defined in f110_gym.envs.base_classes.Simulator)f110_gym.envs.base_classes.Simulator
collisions (defined in f110_gym.envs.base_classes.Simulator)f110_gym.envs.base_classes.Simulator
ego_idx (defined in f110_gym.envs.base_classes.Simulator)f110_gym.envs.base_classes.Simulator
num_agents (defined in f110_gym.envs.base_classes.Simulator)f110_gym.envs.base_classes.Simulator
params (defined in f110_gym.envs.base_classes.Simulator)f110_gym.envs.base_classes.Simulator
reset(self, poses)f110_gym.envs.base_classes.Simulator
set_map(self, map_path, map_ext)f110_gym.envs.base_classes.Simulator
step(self, control_inputs)f110_gym.envs.base_classes.Simulator
time_step (defined in f110_gym.envs.base_classes.Simulator)f110_gym.envs.base_classes.Simulator
update_params(self, params, agent_idx=-1)f110_gym.envs.base_classes.Simulator
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html deleted file mode 100644 index a5bf17d1..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.envs.base_classes.Simulator Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.envs.base_classes.Simulator Class Reference
-
-
-
-Inheritance diagram for f110_gym.envs.base_classes.Simulator:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.envs.base_classes.Simulator:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - - - - - -

-Public Member Functions

def __init__ (self, params, num_agents, time_step=0.01, ego_idx=0)
 
def set_map (self, map_path, map_ext)
 
def update_params (self, params, agent_idx=-1)
 
def check_collision (self)
 
def step (self, control_inputs)
 
def reset (self, poses)
 
- - - - - - - - - - - - - - - - - -

-Public Attributes

num_agents
 
time_step
 
ego_idx
 
params
 
agent_poses
 
agents
 
collisions
 
collision_idx
 
-

Detailed Description

-
Simulator class, handles the interaction and update of all vehicles in the environment
-
-Data Members:
-    num_agents (int): number of agents in the environment
-    time_step (float): physics time step
-    agent_poses (np.ndarray(num_agents, 3)): all poses of all agents
-    agents (list[RaceCar]): container for RaceCar objects
-    collisions (np.ndarray(num_agents, )): array of collision indicator for each agent
-    collision_idx (np.ndarray(num_agents, )): which agent is each agent in collision with

Constructor & Destructor Documentation

- -

◆ __init__()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.Simulator.__init__ ( self,
 params,
 num_agents,
 time_step = 0.01,
 ego_idx = 0 
)
-
-
Init function
-
-Args:
-    params (dict): vehicle parameter dictionary, includes {'mu', 'C_Sf', 'C_Sr', 'lf', 'lr', 'h', 'm', 'I', 's_min', 's_max', 'sv_min', 'sv_max', 'v_switch', 'a_max', 'v_min', 'v_max', 'length', 'width'}
-    num_agents (int): number of agents in the environment
-    time_step (float, default=0.01): physics time step
-    ego_idx (int, default=0): ego vehicle's index in list of agents
-
-Returns:
-    None
-
-
-
-

Member Function Documentation

- -

◆ check_collision()

- -
-
- - - - - - - - -
def f110_gym.envs.base_classes.Simulator.check_collision ( self)
-
-
Checks for collision between agents using GJK and agents' body vertices
-
-Args:
-    None
-
-Returns:
-    None
-
-
-
- -

◆ reset()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.Simulator.reset ( self,
 poses 
)
-
-
Resets the simulation environment by given poses
-
-Arges:
-    poses (np.ndarray (num_agents, 3)): poses to reset agents to
-
-Returns:
-    None
-
-
-
- -

◆ set_map()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.Simulator.set_map ( self,
 map_path,
 map_ext 
)
-
-
Sets the map of the environment and sets the map for scan simulator of each agent
-
-Args:
-    map_path (str): path to the map yaml file
-    map_ext (str): extension for the map image file
-
-Returns:
-    None
-
-
-
- -

◆ step()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.Simulator.step ( self,
 control_inputs 
)
-
-
Steps the simulation environment
-
-Args:
-    control_inputs (np.ndarray (num_agents, 2)): control inputs of all agents, first column is desired steering angle, second column is desired velocity
-
-Returns:
-    observations (dict): dictionary for observations: poses of agents, current laser scan of each agent, collision indicators, etc.
-
-
-
- -

◆ update_params()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.base_classes.Simulator.update_params ( self,
 params,
 agent_idx = -1 
)
-
-
Updates the params of agents, if an index of an agent is given, update only that agent's params
-
-Args:
-    params (dict): dictionary of params, see details in docstring of __init__
-    agent_idx (int, default=-1): index for agent that needs param update, if negative, update all agents
-
-Returns:
-    None
-
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator.png b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator.png deleted file mode 100644 index 9cd937e0..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__coll__graph.map b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__coll__graph.map deleted file mode 100644 index 5aaf7616..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__coll__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__coll__graph.md5 deleted file mode 100644 index 0ae4a7c7..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -156a552da8b556cdd4df04ddc9078974 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__coll__graph.png b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__coll__graph.png deleted file mode 100644 index d6efe611..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__inherit__graph.map b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__inherit__graph.map deleted file mode 100644 index 5aaf7616..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__inherit__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__inherit__graph.md5 deleted file mode 100644 index 0ae4a7c7..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -156a552da8b556cdd4df04ddc9078974 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__inherit__graph.png b/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__inherit__graph.png deleted file mode 100644 index d6efe611..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1base__classes_1_1_simulator__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests-members.html b/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests-members.html deleted file mode 100644 index 4b4d3d20..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.envs.collision_models.CollisionTests Member List
-
-
- -

This is the complete list of members for f110_gym.envs.collision_models.CollisionTests, including all inherited members.

- - - - - - - - - - -
length (defined in f110_gym.envs.collision_models.CollisionTests)f110_gym.envs.collision_models.CollisionTests
setUp(self) (defined in f110_gym.envs.collision_models.CollisionTests)f110_gym.envs.collision_models.CollisionTests
test_fps(self) (defined in f110_gym.envs.collision_models.CollisionTests)f110_gym.envs.collision_models.CollisionTests
test_get_vert(self) (defined in f110_gym.envs.collision_models.CollisionTests)f110_gym.envs.collision_models.CollisionTests
test_get_vert_fps(self) (defined in f110_gym.envs.collision_models.CollisionTests)f110_gym.envs.collision_models.CollisionTests
test_multiple_collisions(self) (defined in f110_gym.envs.collision_models.CollisionTests)f110_gym.envs.collision_models.CollisionTests
test_random_collision(self) (defined in f110_gym.envs.collision_models.CollisionTests)f110_gym.envs.collision_models.CollisionTests
vertices1 (defined in f110_gym.envs.collision_models.CollisionTests)f110_gym.envs.collision_models.CollisionTests
width (defined in f110_gym.envs.collision_models.CollisionTests)f110_gym.envs.collision_models.CollisionTests
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.html b/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.html deleted file mode 100644 index ac95e878..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.envs.collision_models.CollisionTests Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.envs.collision_models.CollisionTests Class Reference
-
-
-
-Inheritance diagram for f110_gym.envs.collision_models.CollisionTests:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.envs.collision_models.CollisionTests:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - - - - - -

-Public Member Functions

-def setUp (self)
 
-def test_get_vert (self)
 
-def test_get_vert_fps (self)
 
-def test_random_collision (self)
 
-def test_multiple_collisions (self)
 
-def test_fps (self)
 
- - - - - - - -

-Public Attributes

vertices1
 
length
 
width
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.png b/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.png deleted file mode 100644 index 4e19bddf..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__coll__graph.map b/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__coll__graph.map deleted file mode 100644 index dd9d4a71..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__coll__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__coll__graph.md5 deleted file mode 100644 index c5426f31..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -06743ebd17771742fa42539c711fb878 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__coll__graph.png b/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__coll__graph.png deleted file mode 100644 index d47b13a4..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__inherit__graph.map b/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__inherit__graph.map deleted file mode 100644 index dd9d4a71..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__inherit__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__inherit__graph.md5 deleted file mode 100644 index c5426f31..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -06743ebd17771742fa42539c711fb878 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__inherit__graph.png b/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__inherit__graph.png deleted file mode 100644 index d47b13a4..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test-members.html b/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test-members.html deleted file mode 100644 index 80fd8c02..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test-members.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.envs.dynamic_models.DynamicsTest Member List
-
-
- -

This is the complete list of members for f110_gym.envs.dynamic_models.DynamicsTest, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - -
a_max (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
C_Sf (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
C_Sr (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
h (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
I (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
lf (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
lr (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
m (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
mu (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
s_max (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
s_min (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
setUp(self) (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
sv_max (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
sv_min (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
test_derivatives(self) (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
test_zeroinit_acc(self) (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
test_zeroinit_dec(self) (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
test_zeroinit_roll(self) (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
test_zeroinit_rollleft(self) (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
v_max (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
v_min (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
v_switch (defined in f110_gym.envs.dynamic_models.DynamicsTest)f110_gym.envs.dynamic_models.DynamicsTest
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.html b/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.html deleted file mode 100644 index 8b664664..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.envs.dynamic_models.DynamicsTest Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.envs.dynamic_models.DynamicsTest Class Reference
-
-
-
-Inheritance diagram for f110_gym.envs.dynamic_models.DynamicsTest:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.envs.dynamic_models.DynamicsTest:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - - - - - -

-Public Member Functions

-def setUp (self)
 
-def test_derivatives (self)
 
-def test_zeroinit_roll (self)
 
-def test_zeroinit_dec (self)
 
-def test_zeroinit_acc (self)
 
-def test_zeroinit_rollleft (self)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

mu
 
C_Sf
 
C_Sr
 
lf
 
lr
 
h
 
m
 
I
 
s_min
 
s_max
 
sv_min
 
sv_max
 
v_min
 
v_max
 
v_switch
 
a_max
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.png b/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.png deleted file mode 100644 index 53b76fa2..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__coll__graph.map b/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__coll__graph.map deleted file mode 100644 index 97a30a31..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__coll__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__coll__graph.md5 deleted file mode 100644 index f90f78a1..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -ff579a2173cc5523110d429dfe27ac9c \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__coll__graph.png b/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__coll__graph.png deleted file mode 100644 index 1df6686a..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__inherit__graph.map b/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__inherit__graph.map deleted file mode 100644 index 97a30a31..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__inherit__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__inherit__graph.md5 deleted file mode 100644 index f90f78a1..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -ff579a2173cc5523110d429dfe27ac9c \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__inherit__graph.png b/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__inherit__graph.png deleted file mode 100644 index 1df6686a..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env-members.html b/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env-members.html deleted file mode 100644 index 021acabb..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env-members.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.envs.f110_env.F110Env Member List
-
-
- -

This is the complete list of members for f110_gym.envs.f110_env.F110Env, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
__del__(self)f110_gym.envs.f110_env.F110Env
__init__(self, **kwargs) (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
collisions (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
current_obs (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
current_time (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
ego_idx (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
lap_counts (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
lap_times (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
map_ext (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
map_name (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
map_path (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
metadata (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Envstatic
near_start (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
near_starts (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
num_agents (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
num_toggles (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
params (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
poses_theta (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
poses_x (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
poses_y (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
render(self, mode='human')f110_gym.envs.f110_env.F110Env
renderer (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
reset(self, poses)f110_gym.envs.f110_env.F110Env
sim (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
start_rot (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
start_thetas (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
start_thresh (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
start_xs (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
start_ys (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
step(self, action)f110_gym.envs.f110_env.F110Env
timestep (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
toggle_list (defined in f110_gym.envs.f110_env.F110Env)f110_gym.envs.f110_env.F110Env
update_map(self, map_path, map_ext)f110_gym.envs.f110_env.F110Env
update_params(self, params, index=-1)f110_gym.envs.f110_env.F110Env
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html b/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html deleted file mode 100644 index c9280230..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html +++ /dev/null @@ -1,470 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.envs.f110_env.F110Env Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -Static Public Attributes | -List of all members
-
-
f110_gym.envs.f110_env.F110Env Class Reference
-
-
-
-Inheritance diagram for f110_gym.envs.f110_env.F110Env:
-
-
Inheritance graph
- - - - - -
[legend]
-
-Collaboration diagram for f110_gym.envs.f110_env.F110Env:
-
-
Collaboration graph
- - - - - -
[legend]
- - - - - - - - - - - - - - - - -

-Public Member Functions

-def __init__ (self, **kwargs)
 
def __del__ (self)
 
def step (self, action)
 
def reset (self, poses)
 
def update_map (self, map_path, map_ext)
 
def update_params (self, params, index=-1)
 
def render (self, mode='human')
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

map_name
 
map_path
 
map_ext
 
params
 
num_agents
 
timestep
 
ego_idx
 
start_thresh
 
poses_x
 
poses_y
 
poses_theta
 
collisions
 
near_start
 
num_toggles
 
lap_times
 
lap_counts
 
current_time
 
near_starts
 
toggle_list
 
start_xs
 
start_ys
 
start_thetas
 
start_rot
 
sim
 
renderer
 
current_obs
 
- - - -

-Static Public Attributes

-dictionary metadata = {'render.modes': ['human', 'human_fast']}
 
-

Detailed Description

-
OpenAI gym environment for F1TENTH
-
-Env should be initialized by calling gym.make('f110_gym:f110-v0', **kwargs)
-
-Args:
-    kwargs:
-        seed (int): seed for random state and reproducibility
-        
-        map (str, default='vegas'): name of the map used for the environment. Currently, available environments include: 'berlin', 'vegas', 'skirk'. You could use a string of the absolute path to the yaml file of your custom map.
-    
-        map_ext (str, default='png'): image extension of the map image file. For example 'png', 'pgm'
-    
-        params (dict, default={'mu': 1.0489, 'C_Sf':, 'C_Sr':, 'lf': 0.15875, 'lr': 0.17145, 'h': 0.074, 'm': 3.74, 'I': 0.04712, 's_min': -0.4189, 's_max': 0.4189, 'sv_min': -3.2, 'sv_max': 3.2, 'v_switch':7.319, 'a_max': 9.51, 'v_min':-5.0, 'v_max': 20.0, 'width': 0.31, 'length': 0.58}): dictionary of vehicle parameters.
-        mu: surface friction coefficient
-        C_Sf: Cornering stiffness coefficient, front
-        C_Sr: Cornering stiffness coefficient, rear
-        lf: Distance from center of gravity to front axle
-        lr: Distance from center of gravity to rear axle
-        h: Height of center of gravity
-        m: Total mass of the vehicle
-        I: Moment of inertial of the entire vehicle about the z axis
-        s_min: Minimum steering angle constraint
-        s_max: Maximum steering angle constraint
-        sv_min: Minimum steering velocity constraint
-        sv_max: Maximum steering velocity constraint
-        v_switch: Switching velocity (velocity at which the acceleration is no longer able to create wheel spin)
-        a_max: Maximum longitudinal acceleration
-        v_min: Minimum longitudinal velocity
-        v_max: Maximum longitudinal velocity
-        width: width of the vehicle in meters
-        length: length of the vehicle in meters
-
-        num_agents (int, default=2): number of agents in the environment
-
-        timestep (float, default=0.01): physics timestep
-
-        ego_idx (int, default=0): ego's index in list of agents
-

Constructor & Destructor Documentation

- -

◆ __del__()

- -
-
- - - - - - - - -
def f110_gym.envs.f110_env.F110Env.__del__ ( self)
-
-
Finalizer, does cleanup
-
-
-
-

Member Function Documentation

- -

◆ render()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.f110_env.F110Env.render ( self,
 mode = 'human' 
)
-
-
Renders the environment with pyglet. Use mouse scroll in the window to zoom in/out, use mouse click drag to pan. Shows the agents, the map, current fps (bottom left corner), and the race information near as text.
-
-Args:
-    mode (str, default='human'): rendering mode, currently supports:
-'human': slowed down rendering such that the env is rendered in a way that sim time elapsed is close to real time elapsed
-'human_fast': render as fast as possible
-
-Returns:
-    None
-
-
-
- -

◆ reset()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.f110_env.F110Env.reset ( self,
 poses 
)
-
-
Reset the gym environment by given poses
-
-Args:
-    poses (np.ndarray (num_agents, 3)): poses to reset agents to
-
-Returns:
-    obs (dict): observation of the current step
-    reward (float, default=self.timestep): step reward, currently is physics timestep
-    done (bool): if the simulation is done
-    info (dict): auxillary information dictionary
-
-
-
- -

◆ step()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.f110_env.F110Env.step ( self,
 action 
)
-
-
Step function for the gym env
-
-Args:
-    action (np.ndarray(num_agents, 2))
-
-Returns:
-    obs (dict): observation of the current step
-    reward (float, default=self.timestep): step reward, currently is physics timestep
-    done (bool): if the simulation is done
-    info (dict): auxillary information dictionary
-
-
-
- -

◆ update_map()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.f110_env.F110Env.update_map ( self,
 map_path,
 map_ext 
)
-
-
Updates the map used by simulation
-
-Args:
-    map_path (str): absolute path to the map yaml file
-    map_ext (str): extension of the map image file
-
-Returns:
-    None
-
-
-
- -

◆ update_params()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.f110_env.F110Env.update_params ( self,
 params,
 index = -1 
)
-
-
Updates the parameters used by simulation for vehicles
-
-Args:
-    params (dict): dictionary of parameters
-    index (int, default=-1): if >= 0 then only update a specific agent's params
-
-Returns:
-    None
-
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.png b/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.png deleted file mode 100644 index 3c22d12a..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__coll__graph.map b/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__coll__graph.map deleted file mode 100644 index 755fa5c8..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__coll__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__coll__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__coll__graph.md5 deleted file mode 100644 index b3df708a..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -d30ac78a5b547132c6d21ff0f180a868 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__coll__graph.png b/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__coll__graph.png deleted file mode 100644 index af95f74e..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__inherit__graph.map b/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__inherit__graph.map deleted file mode 100644 index 755fa5c8..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__inherit__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__inherit__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__inherit__graph.md5 deleted file mode 100644 index b3df708a..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -d30ac78a5b547132c6d21ff0f180a868 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__inherit__graph.png b/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__inherit__graph.png deleted file mode 100644 index af95f74e..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env-members.html b/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env-members.html deleted file mode 100644 index 5cc3a889..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env-members.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.envs.f110_env_backup.F110Env Member List
-
-
- -

This is the complete list of members for f110_gym.envs.f110_env_backup.F110Env, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
__del__(self)f110_gym.envs.f110_env_backup.F110Env
__init__(self) (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
all_x (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
all_y (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
collision_angle (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
collision_angles (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
context (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
current_time (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
double_finish (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
ego_idx (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
free_thresh (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
in_collision (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
init_map(self, map_path, img_ext, rgb, flip)f110_gym.envs.f110_env_backup.F110Env
lap_counts (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
lap_times (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
map_height (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
map_img (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
map_inited (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
map_path (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
map_resolution (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
map_width (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
metadata (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Envstatic
near_start (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
near_starts (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
num_agents (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
num_toggles (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
origin (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
params (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
params_set (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
port (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
render(self, mode='human', close=False) (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
reset(self, poses=None) (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
sim_p (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
socket (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
start_rot (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
start_theta (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
start_thetas (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
start_thresh (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
start_x (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
start_xs (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
start_y (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
start_ys (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
step(self, action) (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
theta (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
timeout (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
timestep (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
toggle_list (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
update_params(self, mu, h_cg, l_r, cs_f, cs_r, I_z, mass, exe_path, double_finish=False) (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
x (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
y (defined in f110_gym.envs.f110_env_backup.F110Env)f110_gym.envs.f110_env_backup.F110Env
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.html b/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.html deleted file mode 100644 index 9c989905..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.envs.f110_env_backup.F110Env Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -Static Public Attributes | -List of all members
-
-
f110_gym.envs.f110_env_backup.F110Env Class Reference
-
-
-
-Inheritance diagram for f110_gym.envs.f110_env_backup.F110Env:
-
-
Inheritance graph
- - - - - -
[legend]
-
-Collaboration diagram for f110_gym.envs.f110_env_backup.F110Env:
-
-
Collaboration graph
- - - - - -
[legend]
- - - - - - - - - - - - - - - - -

-Public Member Functions

-def __init__ (self)
 
def __del__ (self)
 
-def step (self, action)
 
-def reset (self, poses=None)
 
def init_map (self, map_path, img_ext, rgb, flip)
 
-def render (self, mode='human', close=False)
 
-def update_params (self, mu, h_cg, l_r, cs_f, cs_r, I_z, mass, exe_path, double_finish=False)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

params_set
 
map_inited
 
params
 
num_agents
 
timestep
 
map_path
 
map_img
 
ego_idx
 
timeout
 
start_thresh
 
x
 
y
 
theta
 
in_collision
 
collision_angle
 
near_start
 
num_toggles
 
lap_times
 
lap_counts
 
map_height
 
map_width
 
map_resolution
 
free_thresh
 
origin
 
port
 
context
 
socket
 
sim_p
 
all_x
 
all_y
 
current_time
 
collision_angles
 
near_starts
 
toggle_list
 
start_x
 
start_y
 
start_theta
 
start_xs
 
start_ys
 
start_thetas
 
start_rot
 
double_finish
 
- - - -

-Static Public Attributes

-dictionary metadata = {'render.modes': []}
 
-

Detailed Description

-
OpenAI gym environment for F1/10 simulator
-Use 0mq's REQ-REP pattern to communicate to the C++ simulator
-ONE env has ONE corresponding C++ instance
-Need to create env with map input, full path to map yaml file, map pgm image and yaml should be in same directory
-
-should be initialized with a map, a timestep, and number of agents
-

Constructor & Destructor Documentation

- -

◆ __del__()

- -
-
- - - - - - - - -
def f110_gym.envs.f110_env_backup.F110Env.__del__ ( self)
-
-
Finalizer, does cleanup
-
-
-
-

Member Function Documentation

- -

◆ init_map()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.f110_env_backup.F110Env.init_map ( self,
 map_path,
 img_ext,
 rgb,
 flip 
)
-
-
    init a map for the gym env
-    map_path: full path for the yaml, same as ROS, img and yaml in same dir
-    rgb: map grayscale or rgb
-    flip: if map needs flipping
-
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.png b/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.png deleted file mode 100644 index 77f2b996..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__coll__graph.map b/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__coll__graph.map deleted file mode 100644 index a63ccf1c..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__coll__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__coll__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__coll__graph.md5 deleted file mode 100644 index 894f7dc2..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -4c7f5ed7430f1bf853e67e2973bb8950 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__coll__graph.png b/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__coll__graph.png deleted file mode 100644 index d972765d..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__inherit__graph.map b/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__inherit__graph.map deleted file mode 100644 index a63ccf1c..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__inherit__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__inherit__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__inherit__graph.md5 deleted file mode 100644 index 894f7dc2..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -4c7f5ed7430f1bf853e67e2973bb8950 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__inherit__graph.png b/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__inherit__graph.png deleted file mode 100644 index d972765d..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d-members.html b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d-members.html deleted file mode 100644 index fb05125a..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d-members.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.envs.laser_models.ScanSimulator2D Member List
-
-
- -

This is the complete list of members for f110_gym.envs.laser_models.ScanSimulator2D, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
__init__(self, num_beams, fov, std_dev=0.01, eps=0.0001, theta_dis=2000, max_range=30.0, seed=123) (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
angle_increment (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
cosines (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
dt (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
eps (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
fov (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
get_increment(self) (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
map_height (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
map_img (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
map_resolution (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
map_width (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
max_range (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
num_beams (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
orig_c (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
orig_s (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
orig_x (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
orig_y (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
origin (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
rng (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
scan(self, pose)f110_gym.envs.laser_models.ScanSimulator2D
set_map(self, map_path, map_ext)f110_gym.envs.laser_models.ScanSimulator2D
sines (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
std_dev (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
theta_dis (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
theta_index_increment (defined in f110_gym.envs.laser_models.ScanSimulator2D)f110_gym.envs.laser_models.ScanSimulator2D
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.html b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.html deleted file mode 100644 index e2e04910..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.envs.laser_models.ScanSimulator2D Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.envs.laser_models.ScanSimulator2D Class Reference
-
-
-
-Inheritance diagram for f110_gym.envs.laser_models.ScanSimulator2D:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.envs.laser_models.ScanSimulator2D:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - -

-Public Member Functions

-def __init__ (self, num_beams, fov, std_dev=0.01, eps=0.0001, theta_dis=2000, max_range=30.0, seed=123)
 
def set_map (self, map_path, map_ext)
 
def scan (self, pose)
 
-def get_increment (self)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

num_beams
 
fov
 
std_dev
 
eps
 
theta_dis
 
max_range
 
angle_increment
 
theta_index_increment
 
orig_c
 
orig_s
 
orig_x
 
orig_y
 
map_height
 
map_width
 
map_resolution
 
dt
 
rng
 
sines
 
cosines
 
map_img
 
origin
 
-

Detailed Description

-
2D LIDAR scan simulator class
-
-Init params:
-    num_beams (int): number of beams in the scan
-    fov (float): field of view of the laser scan
-    std_dev (float, default=0.01): standard deviation of the generated whitenoise in the scan
-    eps (float, default=0.0001): ray tracing iteration termination condition
-    theta_dis (int, default=2000): number of steps to discretize the angles between 0 and 2pi for look up
-    max_range (float, default=30.0): maximum range of the laser
-    seed (int, default=123): seed for random number generator for the whitenoise in scan
-

Member Function Documentation

- -

◆ scan()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.laser_models.ScanSimulator2D.scan ( self,
 pose 
)
-
-
Perform simulated 2D scan by pose on the given map
-
-    Args:
-pose (numpy.ndarray (3, )): pose of the scan frame (x, y, theta)
-
-    Returns:
-scan (numpy.ndarray (n, )): data array of the laserscan, n=num_beams
-
-    Raises:
-ValueError: when scan is called before a map is set
-
-
-
- -

◆ set_map()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.laser_models.ScanSimulator2D.set_map ( self,
 map_path,
 map_ext 
)
-
-
Set the bitmap of the scan simulator by path
-
-    Args:
-map_path (str): path to the map yaml file
-map_ext (str): extension (image type) of the map image
-
-    Returns:
-flag (bool): if image reading and loading is successful
-
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.png b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.png deleted file mode 100644 index 68b449d0..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__coll__graph.map b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__coll__graph.map deleted file mode 100644 index 02458402..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__coll__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__coll__graph.md5 deleted file mode 100644 index f298ef63..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -54e4b1d5edcb8c3cb08332fff8851fbd \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__coll__graph.png b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__coll__graph.png deleted file mode 100644 index 5f79883e..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__inherit__graph.map b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__inherit__graph.map deleted file mode 100644 index 02458402..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__inherit__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__inherit__graph.md5 deleted file mode 100644 index f298ef63..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -54e4b1d5edcb8c3cb08332fff8851fbd \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__inherit__graph.png b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__inherit__graph.png deleted file mode 100644 index 5f79883e..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests-members.html b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests-members.html deleted file mode 100644 index fd974ba0..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.envs.laser_models.ScanTests Member List
-
-
- -

This is the complete list of members for f110_gym.envs.laser_models.ScanTests, including all inherited members.

- - - - - - - - - - - -
berlin_scan (defined in f110_gym.envs.laser_models.ScanTests)f110_gym.envs.laser_models.ScanTests
fov (defined in f110_gym.envs.laser_models.ScanTests)f110_gym.envs.laser_models.ScanTests
num_beams (defined in f110_gym.envs.laser_models.ScanTests)f110_gym.envs.laser_models.ScanTests
num_test (defined in f110_gym.envs.laser_models.ScanTests)f110_gym.envs.laser_models.ScanTests
setUp(self) (defined in f110_gym.envs.laser_models.ScanTests)f110_gym.envs.laser_models.ScanTests
skirk_scan (defined in f110_gym.envs.laser_models.ScanTests)f110_gym.envs.laser_models.ScanTests
test_fps(self) (defined in f110_gym.envs.laser_models.ScanTests)f110_gym.envs.laser_models.ScanTests
test_map_berlin(self) (defined in f110_gym.envs.laser_models.ScanTests)f110_gym.envs.laser_models.ScanTests
test_map_skirk(self) (defined in f110_gym.envs.laser_models.ScanTests)f110_gym.envs.laser_models.ScanTests
test_poses (defined in f110_gym.envs.laser_models.ScanTests)f110_gym.envs.laser_models.ScanTests
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.html b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.html deleted file mode 100644 index 4f8b8f39..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.envs.laser_models.ScanTests Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.envs.laser_models.ScanTests Class Reference
-
-
-
-Inheritance diagram for f110_gym.envs.laser_models.ScanTests:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.envs.laser_models.ScanTests:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - -

-Public Member Functions

-def setUp (self)
 
-def test_map_berlin (self)
 
-def test_map_skirk (self)
 
-def test_fps (self)
 
- - - - - - - - - - - - - -

-Public Attributes

num_beams
 
fov
 
num_test
 
test_poses
 
berlin_scan
 
skirk_scan
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.png b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.png deleted file mode 100644 index 0b125442..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__coll__graph.map b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__coll__graph.map deleted file mode 100644 index 30f367de..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__coll__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__coll__graph.md5 deleted file mode 100644 index e7dd44d2..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -8753cf30b5bdb970cca35870109666ee \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__coll__graph.png b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__coll__graph.png deleted file mode 100644 index 5749b79c..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__inherit__graph.map b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__inherit__graph.map deleted file mode 100644 index 30f367de..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__inherit__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__inherit__graph.md5 deleted file mode 100644 index e7dd44d2..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -8753cf30b5bdb970cca35870109666ee \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__inherit__graph.png b/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__inherit__graph.png deleted file mode 100644 index 5749b79c..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer-members.html b/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer-members.html deleted file mode 100644 index a94e7621..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer-members.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.envs.rendering.EnvRenderer Member List
-
-
- -

This is the complete list of members for f110_gym.envs.rendering.EnvRenderer, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - -
__init__(self, width, height, *args, **kwargs)f110_gym.envs.rendering.EnvRenderer
batch (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
bottom (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
cars (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
ego_idx (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
fps_display (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
left (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
map_points (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
on_close(self)f110_gym.envs.rendering.EnvRenderer
on_draw(self)f110_gym.envs.rendering.EnvRenderer
on_mouse_drag(self, x, y, dx, dy, buttons, modifiers)f110_gym.envs.rendering.EnvRenderer
on_mouse_scroll(self, x, y, dx, dy)f110_gym.envs.rendering.EnvRenderer
on_resize(self, width, height)f110_gym.envs.rendering.EnvRenderer
poses (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
right (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
score_label (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
top (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
update_map(self, map_path, map_ext)f110_gym.envs.rendering.EnvRenderer
update_obs(self, obs)f110_gym.envs.rendering.EnvRenderer
vertices (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
zoom_level (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
zoomed_height (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
zoomed_width (defined in f110_gym.envs.rendering.EnvRenderer)f110_gym.envs.rendering.EnvRenderer
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html b/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html deleted file mode 100644 index 258133a0..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html +++ /dev/null @@ -1,531 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.envs.rendering.EnvRenderer Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.envs.rendering.EnvRenderer Class Reference
-
-
-
-Inheritance diagram for f110_gym.envs.rendering.EnvRenderer:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.envs.rendering.EnvRenderer:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - - - - - - - - - -

-Public Member Functions

def __init__ (self, width, height, *args, **kwargs)
 
def update_map (self, map_path, map_ext)
 
def on_resize (self, width, height)
 
def on_mouse_drag (self, x, y, dx, dy, buttons, modifiers)
 
def on_mouse_scroll (self, x, y, dx, dy)
 
def on_close (self)
 
def on_draw (self)
 
def update_obs (self, obs)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

left
 
right
 
bottom
 
top
 
zoom_level
 
zoomed_width
 
zoomed_height
 
batch
 
map_points
 
poses
 
vertices
 
score_label
 
fps_display
 
ego_idx
 
cars
 
-

Detailed Description

-
A window class inherited from pyglet.window.Window, handles the camera/projection interaction, resizing window, and rendering the environment
-

Constructor & Destructor Documentation

- -

◆ __init__()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.rendering.EnvRenderer.__init__ ( self,
 width,
 height,
args,
** kwargs 
)
-
-
Class constructor
-
-Args:
-    width (int): width of the window
-    height (int): height of the window
-
-Returns:
-    None
-
-
-
-

Member Function Documentation

- -

◆ on_close()

- -
-
- - - - - - - - -
def f110_gym.envs.rendering.EnvRenderer.on_close ( self)
-
-
Callback function when the 'x' is clicked on the window, overrides inherited method. Also throws exception to end the python program when in a loop.
-
-Args:
-    None
-
-Returns:
-    None
-
-Raises:
-    Exception: with a message that indicates the rendering window was closed
-
-
-
- -

◆ on_draw()

- -
-
- - - - - - - - -
def f110_gym.envs.rendering.EnvRenderer.on_draw ( self)
-
-
Function when the pyglet is drawing. The function draws the batch created that includes the map points, the agent polygons, and the information text, and the fps display.
-
-Args:
-    None
-
-Returns:
-    None
-
-
-
- -

◆ on_mouse_drag()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.rendering.EnvRenderer.on_mouse_drag ( self,
 x,
 y,
 dx,
 dy,
 buttons,
 modifiers 
)
-
-
Callback function on mouse drag, overrides inherited method.
-
-Args:
-    x (int): Distance in pixels from the left edge of the window.
-    y (int): Distance in pixels from the bottom edge of the window.
-    dx (int): Relative X position from the previous mouse position.
-    dy (int): Relative Y position from the previous mouse position.
-    buttons (int): Bitwise combination of the mouse buttons currently pressed.
-    modifiers (int): Bitwise combination of any keyboard modifiers currently active.
-
-Returns:
-    None
-
-
-
- -

◆ on_mouse_scroll()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.rendering.EnvRenderer.on_mouse_scroll ( self,
 x,
 y,
 dx,
 dy 
)
-
-
Callback function on mouse scroll, overrides inherited method.
-
-Args:
-    x (int): Distance in pixels from the left edge of the window.
-    y (int): Distance in pixels from the bottom edge of the window.
-    scroll_x (float): Amount of movement on the horizontal axis.
-    scroll_y (float): Amount of movement on the vertical axis.
-
-Returns:
-    None
-
-
-
- -

◆ on_resize()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.rendering.EnvRenderer.on_resize ( self,
 width,
 height 
)
-
-
Callback function on window resize, overrides inherited method, and updates camera values on top of the inherited on_resize() method.
-
-Potential improvements on current behavior: zoom/pan resets on window resize.
-
-Args:
-    width (int): new width of window
-    height (int): new height of window
-
-Returns:
-    None
-
-
-
- -

◆ update_map()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.envs.rendering.EnvRenderer.update_map ( self,
 map_path,
 map_ext 
)
-
-
Update the map being drawn by the renderer. Converts image to a list of 3D points representing each obstacle pixel in the map.
-
-Args:
-    map_path (str): absolute path to the map without extensions
-    map_ext (str): extension for the map image file
-
-Returns:
-    None
-
-
-
- -

◆ update_obs()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.envs.rendering.EnvRenderer.update_obs ( self,
 obs 
)
-
-
Updates the renderer with the latest observation from the gym environment, including the agent poses, and the information text.
-
-Args:
-    obs (dict): observation dict from the gym env
-
-Returns:
-    None
-
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__coll__graph.map b/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__coll__graph.map deleted file mode 100644 index 3e47ff42..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__coll__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__coll__graph.md5 deleted file mode 100644 index a6ec4c61..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -d65f22e3d9fc873a24c94108e26579ac \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__coll__graph.png b/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__coll__graph.png deleted file mode 100644 index db29c63a..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__inherit__graph.map b/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__inherit__graph.map deleted file mode 100644 index 3e47ff42..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__inherit__graph.md5 b/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__inherit__graph.md5 deleted file mode 100644 index a6ec4c61..00000000 --- a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -d65f22e3d9fc873a24c94108e26579ac \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__inherit__graph.png b/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__inherit__graph.png deleted file mode 100644 index db29c63a..00000000 Binary files a/docs/html/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests-members.html b/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests-members.html deleted file mode 100644 index e764031c..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests-members.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.unittest.collision_checks.CollisionTests Member List
-
-
- -

This is the complete list of members for f110_gym.unittest.collision_checks.CollisionTests, including all inherited members.

- - - - - - - - - -
length (defined in f110_gym.unittest.collision_checks.CollisionTests)f110_gym.unittest.collision_checks.CollisionTests
setUp(self) (defined in f110_gym.unittest.collision_checks.CollisionTests)f110_gym.unittest.collision_checks.CollisionTests
test_fps(self) (defined in f110_gym.unittest.collision_checks.CollisionTests)f110_gym.unittest.collision_checks.CollisionTests
test_get_vert(self) (defined in f110_gym.unittest.collision_checks.CollisionTests)f110_gym.unittest.collision_checks.CollisionTests
test_get_vert_fps(self) (defined in f110_gym.unittest.collision_checks.CollisionTests)f110_gym.unittest.collision_checks.CollisionTests
test_random_collision(self) (defined in f110_gym.unittest.collision_checks.CollisionTests)f110_gym.unittest.collision_checks.CollisionTests
vertices1 (defined in f110_gym.unittest.collision_checks.CollisionTests)f110_gym.unittest.collision_checks.CollisionTests
width (defined in f110_gym.unittest.collision_checks.CollisionTests)f110_gym.unittest.collision_checks.CollisionTests
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.html b/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.html deleted file mode 100644 index 6e033d7e..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.unittest.collision_checks.CollisionTests Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.unittest.collision_checks.CollisionTests Class Reference
-
-
-
-Inheritance diagram for f110_gym.unittest.collision_checks.CollisionTests:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.unittest.collision_checks.CollisionTests:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - - - -

-Public Member Functions

-def setUp (self)
 
-def test_get_vert (self)
 
-def test_get_vert_fps (self)
 
-def test_random_collision (self)
 
-def test_fps (self)
 
- - - - - - - -

-Public Attributes

vertices1
 
length
 
width
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.png b/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.png deleted file mode 100644 index 7001cad6..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__coll__graph.map b/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__coll__graph.map deleted file mode 100644 index 0cd1eeb0..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__coll__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__coll__graph.md5 deleted file mode 100644 index 598630c7..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -9e664bc780db4cd0eb9d736d3f5eca76 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__coll__graph.png b/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__coll__graph.png deleted file mode 100644 index 5c8238a1..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__inherit__graph.map b/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__inherit__graph.map deleted file mode 100644 index 0cd1eeb0..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__inherit__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__inherit__graph.md5 deleted file mode 100644 index 598630c7..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -9e664bc780db4cd0eb9d736d3f5eca76 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__inherit__graph.png b/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__inherit__graph.png deleted file mode 100644 index 5c8238a1..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test-members.html b/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test-members.html deleted file mode 100644 index cb0f7d66..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test-members.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.unittest.dynamics_test.DynamicsTest Member List
-
-
- -

This is the complete list of members for f110_gym.unittest.dynamics_test.DynamicsTest, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - -
a_max (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
C_Sf (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
C_Sr (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
h (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
I (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
lf (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
lr (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
m (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
mu (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
s_max (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
s_min (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
setUp(self) (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
sv_max (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
sv_min (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
test_derivatives(self) (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
test_zeroinit_acc(self) (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
test_zeroinit_dec(self) (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
test_zeroinit_roll(self) (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
test_zeroinit_rollleft(self) (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
v_max (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
v_min (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
v_switch (defined in f110_gym.unittest.dynamics_test.DynamicsTest)f110_gym.unittest.dynamics_test.DynamicsTest
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.html b/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.html deleted file mode 100644 index e5445eaf..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.unittest.dynamics_test.DynamicsTest Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.unittest.dynamics_test.DynamicsTest Class Reference
-
-
-
-Inheritance diagram for f110_gym.unittest.dynamics_test.DynamicsTest:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.unittest.dynamics_test.DynamicsTest:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - - - - - -

-Public Member Functions

-def setUp (self)
 
-def test_derivatives (self)
 
-def test_zeroinit_roll (self)
 
-def test_zeroinit_dec (self)
 
-def test_zeroinit_acc (self)
 
-def test_zeroinit_rollleft (self)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

mu
 
C_Sf
 
C_Sr
 
lf
 
lr
 
h
 
m
 
I
 
s_min
 
s_max
 
sv_min
 
sv_max
 
v_min
 
v_max
 
v_switch
 
a_max
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.png b/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.png deleted file mode 100644 index 2d0a3155..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__coll__graph.map b/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__coll__graph.map deleted file mode 100644 index 386c51bc..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__coll__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__coll__graph.md5 deleted file mode 100644 index e87063ea..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -8425abfb79b383b7ff3bf50717bb48e4 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__coll__graph.png b/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__coll__graph.png deleted file mode 100644 index 9208fce2..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__inherit__graph.map b/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__inherit__graph.map deleted file mode 100644 index 386c51bc..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__inherit__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__inherit__graph.md5 deleted file mode 100644 index e87063ea..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -8425abfb79b383b7ff3bf50717bb48e4 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__inherit__graph.png b/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__inherit__graph.png deleted file mode 100644 index 9208fce2..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera-members.html b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera-members.html deleted file mode 100644 index df7de256..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.unittest.pyglet_test.Camera Member List
-
-
- -

This is the complete list of members for f110_gym.unittest.pyglet_test.Camera, including all inherited members.

- - - - - - - - - - - - - - - - -
__enter__(self) (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
__exit__(self, exception_type, exception_value, traceback) (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
__init__(self, pyglet.window.Window window, scroll_speed=1, min_zoom=1, max_zoom=4) (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
begin(self) (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
end(self) (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
max_zoom (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
min_zoom (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
move(self, axis_x, axis_y)f110_gym.unittest.pyglet_test.Camera
offset_x (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
offset_y (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
position(self)f110_gym.unittest.pyglet_test.Camera
position(self, value)f110_gym.unittest.pyglet_test.Camera
scroll_speed (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
zoom(self) (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
zoom(self, value)f110_gym.unittest.pyglet_test.Camera
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html deleted file mode 100644 index 6bf54496..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.unittest.pyglet_test.Camera Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.unittest.pyglet_test.Camera Class Reference
-
-
-
-Inheritance diagram for f110_gym.unittest.pyglet_test.Camera:
-
-
Inheritance graph
- - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-def __init__ (self, pyglet.window.Window window, scroll_speed=1, min_zoom=1, max_zoom=4)
 
-def zoom (self)
 
def zoom (self, value)
 
def position (self)
 
def position (self, value)
 
def move (self, axis_x, axis_y)
 
-def begin (self)
 
-def end (self)
 
-def __enter__ (self)
 
-def __exit__ (self, exception_type, exception_value, traceback)
 
- - - - - - - - - - - -

-Public Attributes

scroll_speed
 
max_zoom
 
min_zoom
 
offset_x
 
offset_y
 
-

Detailed Description

-
A simple 2D camera that contains the speed and offset.

Member Function Documentation

- -

◆ move()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.unittest.pyglet_test.Camera.move ( self,
 axis_x,
 axis_y 
)
-
-
Move axis direction with scroll_speed.
-    Example: Move left -> move(-1, 0)
-
-
- -

◆ position() [1/2]

- -
-
- - - - - - - - -
def f110_gym.unittest.pyglet_test.Camera.position ( self)
-
-
Query the current offset.
-
-
- -

◆ position() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.unittest.pyglet_test.Camera.position ( self,
 value 
)
-
-
Set the scroll offset directly.
-
-
- -

◆ zoom()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.unittest.pyglet_test.Camera.zoom ( self,
 value 
)
-
-
Here we set zoom, clamp value to minimum of min_zoom and max of max_zoom.
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera__inherit__graph.map b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera__inherit__graph.map deleted file mode 100644 index 45807678..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera__inherit__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera__inherit__graph.md5 deleted file mode 100644 index 69744d3f..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -ed93bf5dfa5d73ea78bbb103858facd1 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera__inherit__graph.png b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera__inherit__graph.png deleted file mode 100644 index e017fa64..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera-members.html b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera-members.html deleted file mode 100644 index fbd72124..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.unittest.pyglet_test.CenteredCamera Member List
-
-
- -

This is the complete list of members for f110_gym.unittest.pyglet_test.CenteredCamera, including all inherited members.

- - - - - - - - - - - - - - - - -
__enter__(self) (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
__exit__(self, exception_type, exception_value, traceback) (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
__init__(self, pyglet.window.Window window, scroll_speed=1, min_zoom=1, max_zoom=4) (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
begin(self) (defined in f110_gym.unittest.pyglet_test.CenteredCamera)f110_gym.unittest.pyglet_test.CenteredCamera
end(self) (defined in f110_gym.unittest.pyglet_test.CenteredCamera)f110_gym.unittest.pyglet_test.CenteredCamera
max_zoom (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
min_zoom (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
move(self, axis_x, axis_y)f110_gym.unittest.pyglet_test.Camera
offset_x (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
offset_y (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
position(self)f110_gym.unittest.pyglet_test.Camera
position(self, value)f110_gym.unittest.pyglet_test.Camera
scroll_speed (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
zoom(self) (defined in f110_gym.unittest.pyglet_test.Camera)f110_gym.unittest.pyglet_test.Camera
zoom(self, value)f110_gym.unittest.pyglet_test.Camera
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera.html b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera.html deleted file mode 100644 index 12ed05b2..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.unittest.pyglet_test.CenteredCamera Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
f110_gym.unittest.pyglet_test.CenteredCamera Class Reference
-
-
-
-Inheritance diagram for f110_gym.unittest.pyglet_test.CenteredCamera:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.unittest.pyglet_test.CenteredCamera:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-def begin (self)
 
-def end (self)
 
- Public Member Functions inherited from f110_gym.unittest.pyglet_test.Camera
-def __init__ (self, pyglet.window.Window window, scroll_speed=1, min_zoom=1, max_zoom=4)
 
-def zoom (self)
 
def zoom (self, value)
 
def position (self)
 
def position (self, value)
 
def move (self, axis_x, axis_y)
 
-def __enter__ (self)
 
-def __exit__ (self, exception_type, exception_value, traceback)
 
- - - - - - - - - - - - -

-Additional Inherited Members

- Public Attributes inherited from f110_gym.unittest.pyglet_test.Camera
scroll_speed
 
max_zoom
 
min_zoom
 
offset_x
 
offset_y
 
-

Detailed Description

-
A simple 2D camera class. 0, 0 will be the center of the screen, as opposed to the bottom left.

The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__coll__graph.map b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__coll__graph.map deleted file mode 100644 index f80afe53..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__coll__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__coll__graph.md5 deleted file mode 100644 index a1b471d6..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -9ead0e598ba3028279f78ce15cdd0b0f \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__coll__graph.png b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__coll__graph.png deleted file mode 100644 index 57e3e87f..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__inherit__graph.map b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__inherit__graph.map deleted file mode 100644 index f80afe53..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__inherit__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__inherit__graph.md5 deleted file mode 100644 index a1b471d6..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -9ead0e598ba3028279f78ce15cdd0b0f \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__inherit__graph.png b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__inherit__graph.png deleted file mode 100644 index 57e3e87f..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app-members.html b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app-members.html deleted file mode 100644 index 7dc378cb..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app-members.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.unittest.pyglet_test_camera.App Member List
-
-
- -

This is the complete list of members for f110_gym.unittest.pyglet_test_camera.App, including all inherited members.

- - - - - - - - - - - - - - - -
__init__(self, width, height, *args, **kwargs) (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
bottom (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
init_gl(self, width, height) (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
left (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
on_draw(self) (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
on_mouse_drag(self, x, y, dx, dy, buttons, modifiers) (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
on_mouse_scroll(self, x, y, dx, dy) (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
on_resize(self, width, height) (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
right (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
run(self) (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
top (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
zoom_level (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
zoomed_height (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
zoomed_width (defined in f110_gym.unittest.pyglet_test_camera.App)f110_gym.unittest.pyglet_test_camera.App
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app.html b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app.html deleted file mode 100644 index d816d48f..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.unittest.pyglet_test_camera.App Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.unittest.pyglet_test_camera.App Class Reference
-
-
-
-Inheritance diagram for f110_gym.unittest.pyglet_test_camera.App:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.unittest.pyglet_test_camera.App:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - - - - - - - -

-Public Member Functions

-def __init__ (self, width, height, *args, **kwargs)
 
-def init_gl (self, width, height)
 
-def on_resize (self, width, height)
 
-def on_mouse_drag (self, x, y, dx, dy, buttons, modifiers)
 
-def on_mouse_scroll (self, x, y, dx, dy)
 
-def on_draw (self)
 
-def run (self)
 
- - - - - - - - - - - - - - - -

-Public Attributes

left
 
right
 
bottom
 
top
 
zoom_level
 
zoomed_width
 
zoomed_height
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__coll__graph.map b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__coll__graph.map deleted file mode 100644 index 4c0dc645..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__coll__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__coll__graph.md5 deleted file mode 100644 index 40356a92..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -90b7d1a8632cd234acaf42a487be351d \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__coll__graph.png b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__coll__graph.png deleted file mode 100644 index 22f1d202..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__inherit__graph.map b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__inherit__graph.map deleted file mode 100644 index 4c0dc645..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__inherit__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__inherit__graph.md5 deleted file mode 100644 index 40356a92..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -90b7d1a8632cd234acaf42a487be351d \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__inherit__graph.png b/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__inherit__graph.png deleted file mode 100644 index 22f1d202..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d-members.html b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d-members.html deleted file mode 100644 index 5b78f6e2..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d-members.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.unittest.scan_sim.ScanSimulator2D Member List
-
-
- -

This is the complete list of members for f110_gym.unittest.scan_sim.ScanSimulator2D, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
__init__(self, num_beams, fov, std_dev=0.01, eps=0.0001, theta_dis=2000, max_range=30.0, seed=123) (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
angle_increment (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
cosines (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
dt (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
eps (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
fov (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
get_increment(self) (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
map_height (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
map_img (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
map_resolution (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
map_width (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
max_range (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
num_beams (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
orig_c (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
orig_s (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
orig_x (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
orig_y (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
origin (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
rng (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
scan(self, pose)f110_gym.unittest.scan_sim.ScanSimulator2D
set_map(self, map_path, map_ext)f110_gym.unittest.scan_sim.ScanSimulator2D
sines (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
std_dev (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
theta_dis (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
theta_index_increment (defined in f110_gym.unittest.scan_sim.ScanSimulator2D)f110_gym.unittest.scan_sim.ScanSimulator2D
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.html b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.html deleted file mode 100644 index 8387e723..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.unittest.scan_sim.ScanSimulator2D Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.unittest.scan_sim.ScanSimulator2D Class Reference
-
-
-
-Inheritance diagram for f110_gym.unittest.scan_sim.ScanSimulator2D:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.unittest.scan_sim.ScanSimulator2D:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - -

-Public Member Functions

-def __init__ (self, num_beams, fov, std_dev=0.01, eps=0.0001, theta_dis=2000, max_range=30.0, seed=123)
 
def set_map (self, map_path, map_ext)
 
def scan (self, pose)
 
-def get_increment (self)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

num_beams
 
fov
 
std_dev
 
eps
 
theta_dis
 
max_range
 
angle_increment
 
theta_index_increment
 
orig_c
 
orig_s
 
orig_x
 
orig_y
 
map_height
 
map_width
 
map_resolution
 
dt
 
rng
 
sines
 
cosines
 
map_img
 
origin
 
-

Detailed Description

-
2D LIDAR scan simulator class
-
-Init params:
-    num_beams (int): number of beams in the scan
-    fov (float): field of view of the laser scan
-    std_dev (float, default=0.01): standard deviation of the generated whitenoise in the scan
-    eps (float, default=0.0001): ray tracing iteration termination condition
-    theta_dis (int, default=2000): number of steps to discretize the angles between 0 and 2pi for look up
-    max_range (float, default=30.0): maximum range of the laser
-    seed (int, default=123): seed for random number generator for the whitenoise in scan
-

Member Function Documentation

- -

◆ scan()

- -
-
- - - - - - - - - - - - - - - - - - -
def f110_gym.unittest.scan_sim.ScanSimulator2D.scan ( self,
 pose 
)
-
-
Perform simulated 2D scan by pose on the given map
-
-    Args:
-pose (numpy.ndarray (3, )): pose of the scan frame (x, y, theta)
-
-    Returns:
-scan (numpy.ndarray (n, )): data array of the laserscan, n=num_beams
-
-    Raises:
-ValueError: when scan is called before a map is set
-
-
-
- -

◆ set_map()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
def f110_gym.unittest.scan_sim.ScanSimulator2D.set_map ( self,
 map_path,
 map_ext 
)
-
-
Set the bitmap of the scan simulator by path
-
-    Args:
-map_path (str): path to the map yaml file
-map_ext (str): extension (image type) of the map image
-
-    Returns:
-flag (bool): if image reading and loading is successful
-
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.png b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.png deleted file mode 100644 index b4db5af9..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__coll__graph.map b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__coll__graph.map deleted file mode 100644 index b6f340dd..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__coll__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__coll__graph.md5 deleted file mode 100644 index 2b665ac3..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -1aedc27dc91e846dfaf29e4713d487a3 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__coll__graph.png b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__coll__graph.png deleted file mode 100644 index 98d18f57..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__inherit__graph.map b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__inherit__graph.map deleted file mode 100644 index b6f340dd..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__inherit__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__inherit__graph.md5 deleted file mode 100644 index 2b665ac3..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -1aedc27dc91e846dfaf29e4713d487a3 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__inherit__graph.png b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__inherit__graph.png deleted file mode 100644 index 98d18f57..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d__inherit__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests-members.html b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests-members.html deleted file mode 100644 index a284a0f9..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -f1tenth_gym: Member List - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym.unittest.scan_sim.ScanTests Member List
-
-
- -

This is the complete list of members for f110_gym.unittest.scan_sim.ScanTests, including all inherited members.

- - - - - - - - - - - -
berlin_scan (defined in f110_gym.unittest.scan_sim.ScanTests)f110_gym.unittest.scan_sim.ScanTests
fov (defined in f110_gym.unittest.scan_sim.ScanTests)f110_gym.unittest.scan_sim.ScanTests
num_beams (defined in f110_gym.unittest.scan_sim.ScanTests)f110_gym.unittest.scan_sim.ScanTests
num_test (defined in f110_gym.unittest.scan_sim.ScanTests)f110_gym.unittest.scan_sim.ScanTests
setUp(self) (defined in f110_gym.unittest.scan_sim.ScanTests)f110_gym.unittest.scan_sim.ScanTests
skirk_scan (defined in f110_gym.unittest.scan_sim.ScanTests)f110_gym.unittest.scan_sim.ScanTests
test_fps(self) (defined in f110_gym.unittest.scan_sim.ScanTests)f110_gym.unittest.scan_sim.ScanTests
test_map_berlin(self) (defined in f110_gym.unittest.scan_sim.ScanTests)f110_gym.unittest.scan_sim.ScanTests
test_map_skirk(self) (defined in f110_gym.unittest.scan_sim.ScanTests)f110_gym.unittest.scan_sim.ScanTests
test_poses (defined in f110_gym.unittest.scan_sim.ScanTests)f110_gym.unittest.scan_sim.ScanTests
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.html b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.html deleted file mode 100644 index 94cd03aa..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.unittest.scan_sim.ScanTests Class Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Public Attributes | -List of all members
-
-
f110_gym.unittest.scan_sim.ScanTests Class Reference
-
-
-
-Inheritance diagram for f110_gym.unittest.scan_sim.ScanTests:
-
-
Inheritance graph
- - - - -
[legend]
-
-Collaboration diagram for f110_gym.unittest.scan_sim.ScanTests:
-
-
Collaboration graph
- - - - -
[legend]
- - - - - - - - - - -

-Public Member Functions

-def setUp (self)
 
-def test_map_berlin (self)
 
-def test_map_skirk (self)
 
-def test_fps (self)
 
- - - - - - - - - - - - - -

-Public Attributes

num_beams
 
fov
 
num_test
 
test_poses
 
berlin_scan
 
skirk_scan
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.png b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.png deleted file mode 100644 index bf6cb5df..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__coll__graph.map b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__coll__graph.map deleted file mode 100644 index 4f12f844..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__coll__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__coll__graph.md5 deleted file mode 100644 index 63ba82b0..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -2d3489b7b66bfb350e0b457a0fdb3f98 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__coll__graph.png b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__coll__graph.png deleted file mode 100644 index 6e5bf48a..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__coll__graph.png and /dev/null differ diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__inherit__graph.map b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__inherit__graph.map deleted file mode 100644 index 4f12f844..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__inherit__graph.md5 b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__inherit__graph.md5 deleted file mode 100644 index 63ba82b0..00000000 --- a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -2d3489b7b66bfb350e0b457a0fdb3f98 \ No newline at end of file diff --git a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__inherit__graph.png b/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__inherit__graph.png deleted file mode 100644 index 6e5bf48a..00000000 Binary files a/docs/html/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests__inherit__graph.png and /dev/null differ diff --git a/docs/html/closed.png b/docs/html/closed.png deleted file mode 100644 index 98cc2c90..00000000 Binary files a/docs/html/closed.png and /dev/null differ diff --git a/docs/html/dir_0d9aa0052a6017cb7aea189bf393af42.html b/docs/html/dir_0d9aa0052a6017cb7aea189bf393af42.html deleted file mode 100644 index f1108884..00000000 --- a/docs/html/dir_0d9aa0052a6017cb7aea189bf393af42.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - -f1tenth_gym: /home/billyzheng/f1tenth_gym/gym/f110_gym Directory Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
f110_gym Directory Reference
-
-
- - -

-Directories

-
- - - - diff --git a/docs/html/dir_70fc25f479e8e19f7e6bd12b95eca2dc.html b/docs/html/dir_70fc25f479e8e19f7e6bd12b95eca2dc.html deleted file mode 100644 index 5b78f7e3..00000000 --- a/docs/html/dir_70fc25f479e8e19f7e6bd12b95eca2dc.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - -f1tenth_gym: /home/billyzheng/f1tenth_gym/gym/f110_gym/unittest Directory Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
unittest Directory Reference
-
-
-
- - - - diff --git a/docs/html/dir_87aab0849a7ff80b67f27d7f0ecafd88.html b/docs/html/dir_87aab0849a7ff80b67f27d7f0ecafd88.html deleted file mode 100644 index 47812a90..00000000 --- a/docs/html/dir_87aab0849a7ff80b67f27d7f0ecafd88.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - -f1tenth_gym: /home/billyzheng/f1tenth_gym/gym/f110_gym/envs Directory Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
envs Directory Reference
-
-
-
- - - - diff --git a/docs/html/dir_cc06cd2fc16f827f09405fcedd02c7bb.html b/docs/html/dir_cc06cd2fc16f827f09405fcedd02c7bb.html deleted file mode 100644 index 533a31b8..00000000 --- a/docs/html/dir_cc06cd2fc16f827f09405fcedd02c7bb.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - -f1tenth_gym: /home/billyzheng/f1tenth_gym/gym Directory Reference - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
gym Directory Reference
-
-
- - -

-Directories

-
- - - - diff --git a/docs/html/doc.png b/docs/html/doc.png deleted file mode 100644 index 17edabff..00000000 Binary files a/docs/html/doc.png and /dev/null differ diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css deleted file mode 100644 index 73ecbb2c..00000000 --- a/docs/html/doxygen.css +++ /dev/null @@ -1,1771 +0,0 @@ -/* The standard CSS for doxygen 1.8.17 */ - -body, table, div, p, dl { - font: 400 14px/22px Roboto,sans-serif; -} - -p.reference, p.definition { - font: 400 14px/22px Roboto,sans-serif; -} - -/* @group Heading Levels */ - -h1.groupheader { - font-size: 150%; -} - -.title { - font: 400 14px/28px Roboto,sans-serif; - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h2.groupheader { - border-bottom: 1px solid #879ECB; - color: #354C7B; - font-size: 150%; - font-weight: normal; - margin-top: 1.75em; - padding-top: 8px; - padding-bottom: 4px; - width: 100%; -} - -h3.groupheader { - font-size: 100%; -} - -h1, h2, h3, h4, h5, h6 { - -webkit-transition: text-shadow 0.5s linear; - -moz-transition: text-shadow 0.5s linear; - -ms-transition: text-shadow 0.5s linear; - -o-transition: text-shadow 0.5s linear; - transition: text-shadow 0.5s linear; - margin-right: 15px; -} - -h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px cyan; -} - -dt { - font-weight: bold; -} - -ul.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; - column-count: 3; -} - -p.startli, p.startdd { - margin-top: 2px; -} - -th p.starttd, p.intertd, p.endtd { - font-size: 100%; - font-weight: 700; -} - -p.starttd { - margin-top: 0px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -p.interli { -} - -p.interdd { -} - -p.intertd { -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; -} - -div.qindex, div.navpath { - width: 100%; - line-height: 140%; -} - -div.navtab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D578C; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #4665A2; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #FFFFFF; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #FFFFFF; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code, a.code:visited, a.line, a.line:visited { - color: #4665A2; -} - -a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -ul { - overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ -} - -#side-nav ul { - overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ -} - -#main-nav ul { - overflow: visible; /* reset ul rule for the navigation bar drop down lists */ -} - -.fragment { - text-align: left; - direction: ltr; - overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ - overflow-y: hidden; -} - -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; - font-family: monospace, fixed; - font-size: 105%; -} - -div.fragment { - padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ - margin: 4px 8px 4px 2px; - background-color: #FBFCFD; - border: 1px solid #C4CFE5; -} - -div.line { - font-family: monospace, fixed; - font-size: 13px; - min-height: 13px; - line-height: 1.0; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - text-indent: -53px; - padding-left: 53px; - padding-bottom: 0px; - margin: 0px; - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -div.line:after { - content:"\000A"; - white-space: pre; -} - -div.line.glow { - background-color: cyan; - box-shadow: 0 0 10px cyan; -} - - -span.lineno { - padding-right: 4px; - text-align: right; - border-right: 2px solid #0F0; - background-color: #E8E8E8; - white-space: pre; -} -span.lineno a { - background-color: #D8D8D8; -} - -span.lineno a:hover { - background-color: #C8C8C8; -} - -.lineno { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -div.ah, span.ah { - background-color: black; - font-weight: bold; - color: #FFFFFF; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - box-shadow: 2px 2px 3px #999; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); -} - -div.classindex ul { - list-style: none; - padding-left: 0; -} - -div.classindex span.ai { - display: inline-block; -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - background-color: white; - color: black; - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 12px; - margin-right: 8px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; - white-space: nowrap; - vertical-align: top; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl, img.inline { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -blockquote { - background-color: #F7F8FB; - border-left: 2px solid #9CAFD4; - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; -} - -blockquote.DocNodeRTL { - border-left: 0; - border-right: 2px solid #9CAFD4; - margin: 0 4px 0 24px; - padding: 0 16px 0 12px; -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3B4D7; -} - -th.dirtab { - background: #EBEFF6; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4A6AAA; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.memberdecls td, .fieldtable tr { - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -.memberdecls td.glow, .fieldtable tr.glow { - background-color: cyan; - box-shadow: 0 0 15px cyan; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memSeparator { - border-bottom: 1px solid #DEE4F0; - line-height: 1px; - margin: 0px; - padding: 0px; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight, .memTemplItemRight { - width: 100%; -} - -.memTemplParams { - color: #4665A2; - white-space: nowrap; - font-size: 80%; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtitle { - padding: 8px; - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - border-top-right-radius: 4px; - border-top-left-radius: 4px; - margin-bottom: -1px; - background-image: url('nav_f.png'); - background-repeat: repeat-x; - background-color: #E2E8F2; - line-height: 1.25; - font-weight: 300; - float:left; -} - -.permalink -{ - font-size: 65%; - display: inline-block; - vertical-align: middle; -} - -.memtemplate { - font-size: 80%; - color: #4665A2; - font-weight: normal; - margin-left: 9px; -} - -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; - -webkit-transition: box-shadow 0.5s linear; - -moz-transition: box-shadow 0.5s linear; - -ms-transition: box-shadow 0.5s linear; - -o-transition: box-shadow 0.5s linear; - transition: box-shadow 0.5s linear; - display: table !important; - width: 100%; -} - -.memitem.glow { - box-shadow: 0 0 15px cyan; -} - -.memname { - font-weight: 400; - margin-left: 6px; -} - -.memname td { - vertical-align: bottom; -} - -.memproto, dl.reflist dt { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - background-color: #DFE5F1; - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 4px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 4px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 4px; - -} - -.overload { - font-family: "courier new",courier,monospace; - font-size: 65%; -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 10px 2px 10px; - background-color: #FBFCFD; - border-top-width: 0; - background-image:url('nav_g.png'); - background-repeat:repeat-x; - background-color: #FFFFFF; - /* opera specific markup */ - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-bottomright: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} -.paramname code { - line-height: 14px; -} - -.params, .retval, .exception, .tparams { - margin-left: 0px; - padding-left: 0px; -} - -.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype, .tparams .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir, .tparams .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; -} - -table.mlabels { - border-spacing: 0px; -} - -td.mlabels-left { - width: 100%; - padding: 0px; -} - -td.mlabels-right { - vertical-align: bottom; - padding: 0px; - white-space: nowrap; -} - -span.mlabels { - margin-left: 8px; -} - -span.mlabel { - background-color: #728DC1; - border-top:1px solid #5373B4; - border-left:1px solid #5373B4; - border-right:1px solid #C4CFE5; - border-bottom:1px solid #C4CFE5; - text-shadow: none; - color: white; - margin-right: 4px; - padding: 2px 3px; - border-radius: 3px; - font-size: 7pt; - white-space: nowrap; - vertical-align: middle; -} - - - -/* @end */ - -/* these are for tree view inside a (index) page */ - -div.directory { - margin: 10px 0px; - border-top: 1px solid #9CAFD4; - border-bottom: 1px solid #9CAFD4; - width: 100%; -} - -.directory table { - border-collapse:collapse; -} - -.directory td { - margin: 0px; - padding: 0px; - vertical-align: top; -} - -.directory td.entry { - white-space: nowrap; - padding-right: 6px; - padding-top: 3px; -} - -.directory td.entry a { - outline:none; -} - -.directory td.entry a img { - border: none; -} - -.directory td.desc { - width: 100%; - padding-left: 6px; - padding-right: 6px; - padding-top: 3px; - border-left: 1px solid rgba(0,0,0,0.05); -} - -.directory tr.even { - padding-left: 6px; - background-color: #F7F8FB; -} - -.directory img { - vertical-align: -30%; -} - -.directory .levels { - white-space: nowrap; - width: 100%; - text-align: right; - font-size: 9pt; -} - -.directory .levels span { - cursor: pointer; - padding-left: 2px; - padding-right: 2px; - color: #3D578C; -} - -.arrow { - color: #9CAFD4; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; - font-size: 80%; - display: inline-block; - width: 16px; - height: 22px; -} - -.icon { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #728DC1; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; -} - -.icona { - width: 24px; - height: 22px; - display: inline-block; -} - -.iconfopen { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('folderopen.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.iconfclosed { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('folderclosed.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.icondoc { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('doc.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -table.directory { - font: 400 14px Roboto,sans-serif; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -address { - font-style: normal; - color: #2A3D61; -} - -table.doxtable caption { - caption-side: top; -} - -table.doxtable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -table.fieldtable { - /*width: 100%;*/ - margin-bottom: 10px; - border: 1px solid #A8B8D9; - border-spacing: 0px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; - vertical-align: top; -} - -.fieldtable td.fieldname { - padding-top: 3px; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid #A8B8D9; - /*width: 100%;*/ -} - -.fieldtable td.fielddoc p:first-child { - margin-top: 0px; -} - -.fieldtable td.fielddoc p:last-child { - margin-bottom: 2px; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - font-size: 90%; - color: #253555; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - font-weight: 400; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #A8B8D9; -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - background-position: 0 -5px; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#364D7C; -} - -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; - color: #283A5D; - font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; -} - -.navpath li.navelem a:hover -{ - color:#6884BD; -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#364D7C; - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -table.classindex -{ - margin: 10px; - white-space: nowrap; - margin-left: 3%; - margin-right: 3%; - width: 94%; - border: 0; - border-spacing: 0; - padding: 0; -} - -div.ingroups -{ - font-size: 8pt; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - margin: 0px; - border-bottom: 1px solid #C4CFE5; -} - -div.headertitle -{ - padding: 5px 5px 5px 10px; -} - -.PageDocRTL-title div.headertitle { - text-align: right; - direction: rtl; -} - -dl { - padding: 0 0 0 0; -} - -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ -dl.section { - margin-left: 0px; - padding-left: 0px; -} - -dl.section.DocNodeRTL { - margin-right: 0px; - padding-right: 0px; -} - -dl.note { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #D0C000; -} - -dl.note.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #D0C000; -} - -dl.warning, dl.attention { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #FF0000; -} - -dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00D000; -} - -dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #00D000; -} - -dl.deprecated { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #505050; -} - -dl.deprecated.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #505050; -} - -dl.todo { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00C0E0; -} - -dl.todo.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #00C0E0; -} - -dl.test { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #3030E0; -} - -dl.test.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #3030E0; -} - -dl.bug { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #C08050; -} - -dl.bug.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #C08050; -} - -dl.section dd { - margin-bottom: 6px; -} - - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectalign -{ - vertical-align: middle; -} - -#projectname -{ - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font: 50% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid #5373B4; -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.plantumlgraph -{ - text-align: center; -} - -.diagraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -div.zoom -{ - border: 1px solid #90A5CE; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:#334975; - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; -} - -dl.citelist dd { - margin:2px 0; - padding:5px 0; -} - -div.toc { - padding: 14px 25px; - background-color: #F4F6FA; - border: 1px solid #D8DFEE; - border-radius: 7px 7px 7px 7px; - float: right; - height: auto; - margin: 0 8px 10px 10px; - width: 200px; -} - -.PageDocRTL-title div.toc { - float: left !important; - text-align: right; -} - -div.toc li { - background: url("bdwn.png") no-repeat scroll 0 5px transparent; - font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; - margin-top: 5px; - padding-left: 10px; - padding-top: 2px; -} - -.PageDocRTL-title div.toc li { - background-position-x: right !important; - padding-left: 0 !important; - padding-right: 10px; -} - -div.toc h3 { - font: bold 12px/1.2 Arial,FreeSans,sans-serif; - color: #4665A2; - border-bottom: 0 none; - margin: 0; -} - -div.toc ul { - list-style: none outside none; - border: medium none; - padding: 0px; -} - -div.toc li.level1 { - margin-left: 0px; -} - -div.toc li.level2 { - margin-left: 15px; -} - -div.toc li.level3 { - margin-left: 30px; -} - -div.toc li.level4 { - margin-left: 45px; -} - -.PageDocRTL-title div.toc li.level1 { - margin-left: 0 !important; - margin-right: 0; -} - -.PageDocRTL-title div.toc li.level2 { - margin-left: 0 !important; - margin-right: 15px; -} - -.PageDocRTL-title div.toc li.level3 { - margin-left: 0 !important; - margin-right: 30px; -} - -.PageDocRTL-title div.toc li.level4 { - margin-left: 0 !important; - margin-right: 45px; -} - -.inherit_header { - font-weight: bold; - color: gray; - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.inherit_header td { - padding: 6px 0px 2px 5px; -} - -.inherit { - display: none; -} - -tr.heading h2 { - margin-top: 12px; - margin-bottom: 4px; -} - -/* tooltip related style info */ - -.ttc { - position: absolute; - display: none; -} - -#powerTip { - cursor: default; - white-space: nowrap; - background-color: white; - border: 1px solid gray; - border-radius: 4px 4px 4px 4px; - box-shadow: 1px 1px 7px gray; - display: none; - font-size: smaller; - max-width: 80%; - opacity: 0.9; - padding: 1ex 1em 1em; - position: absolute; - z-index: 2147483647; -} - -#powerTip div.ttdoc { - color: grey; - font-style: italic; -} - -#powerTip div.ttname a { - font-weight: bold; -} - -#powerTip div.ttname { - font-weight: bold; -} - -#powerTip div.ttdeci { - color: #006318; -} - -#powerTip div { - margin: 0px; - padding: 0px; - font: 12px/16px Roboto,sans-serif; -} - -#powerTip:before, #powerTip:after { - content: ""; - position: absolute; - margin: 0px; -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.s:after, #powerTip.s:before, -#powerTip.w:after, #powerTip.w:before, -#powerTip.e:after, #powerTip.e:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.nw:after, #powerTip.nw:before, -#powerTip.sw:after, #powerTip.sw:before { - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; -} - -#powerTip.n:after, #powerTip.s:after, -#powerTip.w:after, #powerTip.e:after, -#powerTip.nw:after, #powerTip.ne:after, -#powerTip.sw:after, #powerTip.se:after { - border-color: rgba(255, 255, 255, 0); -} - -#powerTip.n:before, #powerTip.s:before, -#powerTip.w:before, #powerTip.e:before, -#powerTip.nw:before, #powerTip.ne:before, -#powerTip.sw:before, #powerTip.se:before { - border-color: rgba(128, 128, 128, 0); -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.nw:after, #powerTip.nw:before { - top: 100%; -} - -#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: #FFFFFF; - border-width: 10px; - margin: 0px -10px; -} -#powerTip.n:before { - border-top-color: #808080; - border-width: 11px; - margin: 0px -11px; -} -#powerTip.n:after, #powerTip.n:before { - left: 50%; -} - -#powerTip.nw:after, #powerTip.nw:before { - right: 14px; -} - -#powerTip.ne:after, #powerTip.ne:before { - left: 14px; -} - -#powerTip.s:after, #powerTip.s:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.sw:after, #powerTip.sw:before { - bottom: 100%; -} - -#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: #FFFFFF; - border-width: 10px; - margin: 0px -10px; -} - -#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: #808080; - border-width: 11px; - margin: 0px -11px; -} - -#powerTip.s:after, #powerTip.s:before { - left: 50%; -} - -#powerTip.sw:after, #powerTip.sw:before { - right: 14px; -} - -#powerTip.se:after, #powerTip.se:before { - left: 14px; -} - -#powerTip.e:after, #powerTip.e:before { - left: 100%; -} -#powerTip.e:after { - border-left-color: #FFFFFF; - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.e:before { - border-left-color: #808080; - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -#powerTip.w:after, #powerTip.w:before { - right: 100%; -} -#powerTip.w:after { - border-right-color: #FFFFFF; - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.w:before { - border-right-color: #808080; - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } -} - -/* @group Markdown */ - -/* -table.markdownTable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.markdownTable td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.markdownTableHead tr { -} - -table.markdownTableBodyLeft td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -th.markdownTableHeadLeft { - text-align: left -} - -th.markdownTableHeadRight { - text-align: right -} - -th.markdownTableHeadCenter { - text-align: center -} -*/ - -table.markdownTable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.markdownTable td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.markdownTable tr { -} - -th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -th.markdownTableHeadLeft, td.markdownTableBodyLeft { - text-align: left -} - -th.markdownTableHeadRight, td.markdownTableBodyRight { - text-align: right -} - -th.markdownTableHeadCenter, td.markdownTableBodyCenter { - text-align: center -} - -.DocNodeRTL { - text-align: right; - direction: rtl; -} - -.DocNodeLTR { - text-align: left; - direction: ltr; -} - -table.DocNodeRTL { - width: auto; - margin-right: 0; - margin-left: auto; -} - -table.DocNodeLTR { - width: auto; - margin-right: auto; - margin-left: 0; -} - -tt, code, kbd, samp -{ - display: inline-block; - direction:ltr; -} -/* @end */ - -u { - text-decoration: underline; -} - diff --git a/docs/html/doxygen.png b/docs/html/doxygen.png deleted file mode 100644 index 3ff17d80..00000000 Binary files a/docs/html/doxygen.png and /dev/null differ diff --git a/docs/html/doxygen.svg b/docs/html/doxygen.svg deleted file mode 100644 index d42dad52..00000000 --- a/docs/html/doxygen.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/html/dynsections.js b/docs/html/dynsections.js deleted file mode 100644 index ea0a7b39..00000000 --- a/docs/html/dynsections.js +++ /dev/null @@ -1,120 +0,0 @@ -/* - @licstart The following is the entire license notice for the - JavaScript code in this file. - - Copyright (C) 1997-2017 by Dimitri van Heesch - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - @licend The above is the entire license notice - for the JavaScript code in this file - */ -function toggleVisibility(linkObj) -{ - var base = $(linkObj).attr('id'); - var summary = $('#'+base+'-summary'); - var content = $('#'+base+'-content'); - var trigger = $('#'+base+'-trigger'); - var src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; -} - -function updateStripes() -{ - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); -} - -function toggleLevel(level) -{ - $('table.directory tr').each(function() { - var l = this.id.split('_').length-1; - var i = $('#img'+this.id.substring(3)); - var a = $('#arr'+this.id.substring(3)); - if (l - - - - - - -f1tenth_gym: Class Members - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- _ -

- - -

- c -

- - -

- i -

- - -

- m -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- u -

- - -

- z -

-
- - - - diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html deleted file mode 100644 index eb5d2d9a..00000000 --- a/docs/html/functions_func.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - -f1tenth_gym: Class Members - Functions - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- _ -

- - -

- c -

- - -

- i -

- - -

- m -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- u -

- - -

- z -

-
- - - - diff --git a/docs/html/graph_legend.html b/docs/html/graph_legend.html deleted file mode 100644 index 1739d8de..00000000 --- a/docs/html/graph_legend.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - -f1tenth_gym: Graph Legend - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Graph Legend
-
-
-

This page explains how to interpret the graphs that are generated by doxygen.

-

Consider the following example:

/*! Invisible class because of truncation */
-
class Invisible { };
-
-
/*! Truncated class, inheritance relation is hidden */
-
class Truncated : public Invisible { };
-
-
/* Class not documented with doxygen comments */
-
class Undocumented { };
-
-
/*! Class that is inherited using public inheritance */
-
class PublicBase : public Truncated { };
-
-
/*! A template class */
-
template<class T> class Templ { };
-
-
/*! Class that is inherited using protected inheritance */
-
class ProtectedBase { };
-
-
/*! Class that is inherited using private inheritance */
-
class PrivateBase { };
-
-
/*! Class that is used by the Inherited class */
-
class Used { };
-
-
/*! Super class that inherits a number of other classes */
-
class Inherited : public PublicBase,
-
protected ProtectedBase,
-
private PrivateBase,
-
public Undocumented,
-
public Templ<int>
-
{
-
private:
-
Used *m_usedClass;
-
};
-

This will result in the following graph:

-

The boxes in the above graph have the following meaning:

- -

The arrows have the following meaning:

- -
- - - - diff --git a/docs/html/graph_legend.md5 b/docs/html/graph_legend.md5 deleted file mode 100644 index 8fcdccd1..00000000 --- a/docs/html/graph_legend.md5 +++ /dev/null @@ -1 +0,0 @@ -f51bf6e9a10430aafef59831b08dcbfe \ No newline at end of file diff --git a/docs/html/graph_legend.png b/docs/html/graph_legend.png deleted file mode 100644 index 83dfada4..00000000 Binary files a/docs/html/graph_legend.png and /dev/null differ diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html deleted file mode 100644 index 75e50b8f..00000000 --- a/docs/html/hierarchy.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -f1tenth_gym: Class Hierarchy - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Class Hierarchy
-
-
-
-

Go to the graphical class hierarchy

-This inheritance list is sorted roughly, but not completely, alphabetically:
-
- - - - diff --git a/docs/html/index.html b/docs/html/index.html deleted file mode 100644 index da8c9db4..00000000 --- a/docs/html/index.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - -f1tenth_gym: Main Page - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
f1tenth_gym Documentation
-
-
-
- - - - diff --git a/docs/html/inherit_graph_0.map b/docs/html/inherit_graph_0.map deleted file mode 100644 index d18ec23c..00000000 --- a/docs/html/inherit_graph_0.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/docs/html/inherit_graph_0.md5 b/docs/html/inherit_graph_0.md5 deleted file mode 100644 index 55ffe5b2..00000000 --- a/docs/html/inherit_graph_0.md5 +++ /dev/null @@ -1 +0,0 @@ -c5ed2a78cb1e20e10b742d2d19ae8328 \ No newline at end of file diff --git a/docs/html/inherit_graph_0.png b/docs/html/inherit_graph_0.png deleted file mode 100644 index 5033463c..00000000 Binary files a/docs/html/inherit_graph_0.png and /dev/null differ diff --git a/docs/html/inherit_graph_1.map b/docs/html/inherit_graph_1.map deleted file mode 100644 index ce9b7e66..00000000 --- a/docs/html/inherit_graph_1.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/html/inherit_graph_1.md5 b/docs/html/inherit_graph_1.md5 deleted file mode 100644 index 9277b81c..00000000 --- a/docs/html/inherit_graph_1.md5 +++ /dev/null @@ -1 +0,0 @@ -2a0d4625dd628049409f128a5d96ce94 \ No newline at end of file diff --git a/docs/html/inherit_graph_1.png b/docs/html/inherit_graph_1.png deleted file mode 100644 index 790359d1..00000000 Binary files a/docs/html/inherit_graph_1.png and /dev/null differ diff --git a/docs/html/inherit_graph_2.map b/docs/html/inherit_graph_2.map deleted file mode 100644 index 88ce249e..00000000 --- a/docs/html/inherit_graph_2.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/html/inherit_graph_2.md5 b/docs/html/inherit_graph_2.md5 deleted file mode 100644 index 6595c274..00000000 --- a/docs/html/inherit_graph_2.md5 +++ /dev/null @@ -1 +0,0 @@ -ad449ec91de3b6807e51e53a7d28d6c0 \ No newline at end of file diff --git a/docs/html/inherit_graph_2.png b/docs/html/inherit_graph_2.png deleted file mode 100644 index b81231d5..00000000 Binary files a/docs/html/inherit_graph_2.png and /dev/null differ diff --git a/docs/html/inherit_graph_3.map b/docs/html/inherit_graph_3.map deleted file mode 100644 index 3253cfc8..00000000 --- a/docs/html/inherit_graph_3.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/html/inherit_graph_3.md5 b/docs/html/inherit_graph_3.md5 deleted file mode 100644 index 1dc4bb42..00000000 --- a/docs/html/inherit_graph_3.md5 +++ /dev/null @@ -1 +0,0 @@ -1a342c4817cadb5534300a15348f1250 \ No newline at end of file diff --git a/docs/html/inherit_graph_3.png b/docs/html/inherit_graph_3.png deleted file mode 100644 index 72ec4ee2..00000000 Binary files a/docs/html/inherit_graph_3.png and /dev/null differ diff --git a/docs/html/inherit_graph_4.map b/docs/html/inherit_graph_4.map deleted file mode 100644 index ae0bb59a..00000000 --- a/docs/html/inherit_graph_4.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/html/inherit_graph_4.md5 b/docs/html/inherit_graph_4.md5 deleted file mode 100644 index 07472f41..00000000 --- a/docs/html/inherit_graph_4.md5 +++ /dev/null @@ -1 +0,0 @@ -6244cb62ab91f1a2b535cb7e4adac66a \ No newline at end of file diff --git a/docs/html/inherit_graph_4.png b/docs/html/inherit_graph_4.png deleted file mode 100644 index f00ebd5d..00000000 Binary files a/docs/html/inherit_graph_4.png and /dev/null differ diff --git a/docs/html/inherits.html b/docs/html/inherits.html deleted file mode 100644 index c678c204..00000000 --- a/docs/html/inherits.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -f1tenth_gym: Class Hierarchy - - - - - - - - - -
-
- - - - - - -
-
f1tenth_gym -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Class Hierarchy
-
-
- - - - - - -
- - - - - - - -
- - - - - - - - - -
- - - - - - -
- - - - - -
- - - - -
-
- - - - diff --git a/docs/html/jquery.js b/docs/html/jquery.js deleted file mode 100644 index 103c32d7..00000000 --- a/docs/html/jquery.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element -},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** - * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler - * Licensed under MIT - * @author Ariel Flesler - * @version 2.1.2 - */ -;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 - * http://www.smartmenus.org/ - * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/docs/html/menu.js b/docs/html/menu.js deleted file mode 100644 index 433c15b8..00000000 --- a/docs/html/menu.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - @licstart The following is the entire license notice for the - JavaScript code in this file. - - Copyright (C) 1997-2017 by Dimitri van Heesch - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - @licend The above is the entire license notice - for the JavaScript code in this file - */ -function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { - function makeTree(data,relPath) { - var result=''; - if ('children' in data) { - result+=''; - } - return result; - } - - $('#main-nav').append(makeTree(menudata,relPath)); - $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); - if (searchEnabled) { - if (serverSide) { - $('#main-menu').append('
  • '); - } else { - $('#main-menu').append('
  • '); - } - } - $('#main-menu').smartmenus(); -} -/* @license-end */ diff --git a/docs/html/menudata.js b/docs/html/menudata.js deleted file mode 100644 index 62b8be52..00000000 --- a/docs/html/menudata.js +++ /dev/null @@ -1,51 +0,0 @@ -/* -@licstart The following is the entire license notice for the -JavaScript code in this file. - -Copyright (C) 1997-2019 by Dimitri van Heesch - -This program is free software; you can redistribute it and/or modify -it under the terms of version 2 of the GNU General Public License as published by -the Free Software Foundation - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -@licend The above is the entire license notice -for the JavaScript code in this file -*/ -var menudata={children:[ -{text:"Main Page",url:"index.html"}, -{text:"Classes",url:"annotated.html",children:[ -{text:"Class List",url:"annotated.html"}, -{text:"Class Index",url:"classes.html"}, -{text:"Class Hierarchy",url:"inherits.html"}, -{text:"Class Members",url:"functions.html",children:[ -{text:"All",url:"functions.html",children:[ -{text:"_",url:"functions.html#index__5F"}, -{text:"c",url:"functions.html#index_c"}, -{text:"i",url:"functions.html#index_i"}, -{text:"m",url:"functions.html#index_m"}, -{text:"o",url:"functions.html#index_o"}, -{text:"p",url:"functions.html#index_p"}, -{text:"r",url:"functions.html#index_r"}, -{text:"s",url:"functions.html#index_s"}, -{text:"u",url:"functions.html#index_u"}, -{text:"z",url:"functions.html#index_z"}]}, -{text:"Functions",url:"functions_func.html",children:[ -{text:"_",url:"functions_func.html#index__5F"}, -{text:"c",url:"functions_func.html#index_c"}, -{text:"i",url:"functions_func.html#index_i"}, -{text:"m",url:"functions_func.html#index_m"}, -{text:"o",url:"functions_func.html#index_o"}, -{text:"p",url:"functions_func.html#index_p"}, -{text:"r",url:"functions_func.html#index_r"}, -{text:"s",url:"functions_func.html#index_s"}, -{text:"u",url:"functions_func.html#index_u"}, -{text:"z",url:"functions_func.html#index_z"}]}]}]}]} diff --git a/docs/html/namespacef110__gym_1_1unittest_1_1random__trackgen.html b/docs/html/namespacef110__gym_1_1unittest_1_1random__trackgen.html deleted file mode 100644 index 3a82534b..00000000 --- a/docs/html/namespacef110__gym_1_1unittest_1_1random__trackgen.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -f1tenth_gym: f110_gym.unittest.random_trackgen Namespace Reference - - - - - - - - - -
    -
    - - - - - - -
    -
    f1tenth_gym -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    f110_gym.unittest.random_trackgen Namespace Reference
    -
    -
    - - - - - - -

    -Functions

    -def create_track ()
     
    -def convert_track (track, track_int, track_ext, iter)
     
    - - - - - - - - - - - -

    -Variables

    -int NUM_MAPS = 10
     
    -float WIDTH = 5.0
     
    track
     
    track_int
     
    track_ext
     
    -

    Detailed Description

    -
     Generates random tracks.
    -    Adapted from https://gym.openai.com/envs/CarRacing-v0
    - - - - diff --git a/docs/html/namespaces.html b/docs/html/namespaces.html deleted file mode 100644 index d0d7fa4b..00000000 --- a/docs/html/namespaces.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -f1tenth_gym: Namespace List - - - - - - - - - -
    -
    - - - - - - -
    -
    f1tenth_gym -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    - -
    - -
    -
    -
    Namespace List
    -
    -
    -
    Here is a list of all documented namespaces with brief descriptions:
    -
    [detail level 1234]
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     Nf110_gym
     Nenvs
     Nbase_classes
     CRaceCar
     CSimulator
     Ncollision_models
     CCollisionTests
     Ndynamic_models
     CDynamicsTest
     Nf110_env
     CF110Env
     Nf110_env_backup
     CF110Env
     Nlaser_models
     CScanSimulator2D
     CScanTests
     Nunittest
     Ncollision_checks
     CCollisionTests
     Ndynamics_test
     CDynamicsTest
     Nlegacy_scan_gen
     Npyglet_test
     Nrandom_trackgen
     Nscan_sim
     CScanSimulator2D
     CScanTests
    -
    -
    - - - - diff --git a/docs/html/nav_f.png b/docs/html/nav_f.png deleted file mode 100644 index 72a58a52..00000000 Binary files a/docs/html/nav_f.png and /dev/null differ diff --git a/docs/html/nav_g.png b/docs/html/nav_g.png deleted file mode 100644 index 2093a237..00000000 Binary files a/docs/html/nav_g.png and /dev/null differ diff --git a/docs/html/nav_h.png b/docs/html/nav_h.png deleted file mode 100644 index 33389b10..00000000 Binary files a/docs/html/nav_h.png and /dev/null differ diff --git a/docs/html/open.png b/docs/html/open.png deleted file mode 100644 index 30f75c7e..00000000 Binary files a/docs/html/open.png and /dev/null differ diff --git a/docs/html/search/all_0.html b/docs/html/search/all_0.html deleted file mode 100644 index 26dd244f..00000000 --- a/docs/html/search/all_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js deleted file mode 100644 index 2145ce5b..00000000 --- a/docs/html/search/all_0.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['_5f_5fdel_5f_5f_0',['__del__',['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#ae193b905b3d1c213ec4324283ebdf201',1,'f110_gym.envs.f110_env.F110Env.__del__()'],['../classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.html#ab53974d19ae639eaa8d922db303d21c4',1,'f110_gym.envs.f110_env_backup.F110Env.__del__()']]], - ['_5f_5finit_5f_5f_1',['__init__',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#af342754a877c42b3828a03b6425801d4',1,'f110_gym.envs.base_classes.RaceCar.__init__()'],['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#ab865873c6f0afa3741add4f39e5fd872',1,'f110_gym.envs.base_classes.Simulator.__init__()'],['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a1b24abdbb4d13744255ebfdb3d509354',1,'f110_gym.envs.rendering.EnvRenderer.__init__()']]] -]; diff --git a/docs/html/search/all_1.html b/docs/html/search/all_1.html deleted file mode 100644 index 8eb215b9..00000000 --- a/docs/html/search/all_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js deleted file mode 100644 index db0bbaa3..00000000 --- a/docs/html/search/all_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['app_2',['App',['../classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app.html',1,'f110_gym::unittest::pyglet_test_camera']]] -]; diff --git a/docs/html/search/all_2.html b/docs/html/search/all_2.html deleted file mode 100644 index b26d9165..00000000 --- a/docs/html/search/all_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_2.js b/docs/html/search/all_2.js deleted file mode 100644 index f16a7e36..00000000 --- a/docs/html/search/all_2.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['camera_3',['Camera',['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html',1,'f110_gym::unittest::pyglet_test']]], - ['centeredcamera_4',['CenteredCamera',['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera.html',1,'f110_gym::unittest::pyglet_test']]], - ['check_5fcollision_5',['check_collision',['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#a7f32c68e14bf47447ce9599c8db21236',1,'f110_gym::envs::base_classes::Simulator']]], - ['check_5fttc_6',['check_ttc',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a4577a30fd8879de7df1d0ace7702f450',1,'f110_gym::envs::base_classes::RaceCar']]], - ['collisiontests_7',['CollisionTests',['../classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.html',1,'f110_gym.unittest.collision_checks.CollisionTests'],['../classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.html',1,'f110_gym.envs.collision_models.CollisionTests']]] -]; diff --git a/docs/html/search/all_3.html b/docs/html/search/all_3.html deleted file mode 100644 index b61b96f8..00000000 --- a/docs/html/search/all_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_3.js b/docs/html/search/all_3.js deleted file mode 100644 index 94f62670..00000000 --- a/docs/html/search/all_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['dynamicstest_8',['DynamicsTest',['../classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.html',1,'f110_gym.envs.dynamic_models.DynamicsTest'],['../classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.html',1,'f110_gym.unittest.dynamics_test.DynamicsTest']]] -]; diff --git a/docs/html/search/all_4.html b/docs/html/search/all_4.html deleted file mode 100644 index 06de1550..00000000 --- a/docs/html/search/all_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_4.js b/docs/html/search/all_4.js deleted file mode 100644 index 1e21c324..00000000 --- a/docs/html/search/all_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['envrenderer_9',['EnvRenderer',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html',1,'f110_gym::envs::rendering']]] -]; diff --git a/docs/html/search/all_5.html b/docs/html/search/all_5.html deleted file mode 100644 index 2544c4e5..00000000 --- a/docs/html/search/all_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js deleted file mode 100644 index 5d363f3c..00000000 --- a/docs/html/search/all_5.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['f110env_10',['F110Env',['../classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.html',1,'f110_gym.envs.f110_env_backup.F110Env'],['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html',1,'f110_gym.envs.f110_env.F110Env']]] -]; diff --git a/docs/html/search/all_6.html b/docs/html/search/all_6.html deleted file mode 100644 index 43f14eab..00000000 --- a/docs/html/search/all_6.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_6.js b/docs/html/search/all_6.js deleted file mode 100644 index 56905cc6..00000000 --- a/docs/html/search/all_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['init_5fmap_11',['init_map',['../classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.html#acb0331bb92b190cdd592060385726160',1,'f110_gym::envs::f110_env_backup::F110Env']]] -]; diff --git a/docs/html/search/all_7.html b/docs/html/search/all_7.html deleted file mode 100644 index af52f82a..00000000 --- a/docs/html/search/all_7.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js deleted file mode 100644 index 30aae7fd..00000000 --- a/docs/html/search/all_7.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['move_12',['move',['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html#aab35e83f0748c949b8e3a8414097d193',1,'f110_gym::unittest::pyglet_test::Camera']]] -]; diff --git a/docs/html/search/all_8.html b/docs/html/search/all_8.html deleted file mode 100644 index cf2b5df9..00000000 --- a/docs/html/search/all_8.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js deleted file mode 100644 index 56fbeb09..00000000 --- a/docs/html/search/all_8.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['on_5fclose_13',['on_close',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a05cb0faf5893e3cbed58cf20d0997bf7',1,'f110_gym::envs::rendering::EnvRenderer']]], - ['on_5fdraw_14',['on_draw',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a0cbcdabef2cdda765d6721ca796ecfd0',1,'f110_gym::envs::rendering::EnvRenderer']]], - ['on_5fmouse_5fdrag_15',['on_mouse_drag',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a557710400bb370a7509dbc17658eadd8',1,'f110_gym::envs::rendering::EnvRenderer']]], - ['on_5fmouse_5fscroll_16',['on_mouse_scroll',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a10f7c38d921015b5574ba0c858a245bb',1,'f110_gym::envs::rendering::EnvRenderer']]], - ['on_5fresize_17',['on_resize',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#ac8bbef5b8910515dd18c8a6624730898',1,'f110_gym::envs::rendering::EnvRenderer']]] -]; diff --git a/docs/html/search/all_9.html b/docs/html/search/all_9.html deleted file mode 100644 index 690785a5..00000000 --- a/docs/html/search/all_9.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js deleted file mode 100644 index 1e4b0dcd..00000000 --- a/docs/html/search/all_9.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['position_18',['position',['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html#a3d2948dc5b1a9d2a6c597a2850ac989b',1,'f110_gym.unittest.pyglet_test.Camera.position(self)'],['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html#ac8e5a2d90df8cd68463746be6e65bee8',1,'f110_gym.unittest.pyglet_test.Camera.position(self, value)']]] -]; diff --git a/docs/html/search/all_a.html b/docs/html/search/all_a.html deleted file mode 100644 index f2f3d3a3..00000000 --- a/docs/html/search/all_a.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_a.js b/docs/html/search/all_a.js deleted file mode 100644 index beaa22a9..00000000 --- a/docs/html/search/all_a.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['racecar_19',['RaceCar',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html',1,'f110_gym::envs::base_classes']]], - ['ray_5fcast_5fagents_20',['ray_cast_agents',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a7d15e74a1b82646675d60ce02cdce6b5',1,'f110_gym::envs::base_classes::RaceCar']]], - ['render_21',['render',['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#ab8e76450e63ef88c1ac9721f717fa375',1,'f110_gym::envs::f110_env::F110Env']]], - ['reset_22',['reset',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a0fa587dc3c1a12c9217f0bd093c1bc08',1,'f110_gym.envs.base_classes.RaceCar.reset()'],['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#ab63c655ff0cd1bb2accce7be9fff69e8',1,'f110_gym.envs.base_classes.Simulator.reset()'],['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#ab213d62cea216bbd82d0f6d7061452fb',1,'f110_gym.envs.f110_env.F110Env.reset()']]] -]; diff --git a/docs/html/search/all_b.html b/docs/html/search/all_b.html deleted file mode 100644 index 14f34036..00000000 --- a/docs/html/search/all_b.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js deleted file mode 100644 index 38deb7ca..00000000 --- a/docs/html/search/all_b.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['scan_23',['scan',['../classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.html#a12c4b2f39bda5dd3a1ea14e70e4370cc',1,'f110_gym.envs.laser_models.ScanSimulator2D.scan()'],['../classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.html#a038a0fc7e42df7827c175fdb3755f2c4',1,'f110_gym.unittest.scan_sim.ScanSimulator2D.scan()']]], - ['scansimulator2d_24',['ScanSimulator2D',['../classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.html',1,'f110_gym.unittest.scan_sim.ScanSimulator2D'],['../classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.html',1,'f110_gym.envs.laser_models.ScanSimulator2D']]], - ['scantests_25',['ScanTests',['../classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.html',1,'f110_gym.unittest.scan_sim.ScanTests'],['../classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.html',1,'f110_gym.envs.laser_models.ScanTests']]], - ['set_5fmap_26',['set_map',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a2a60c9ee34f2f09fb0a7e5cc7b287897',1,'f110_gym.envs.base_classes.RaceCar.set_map()'],['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#a0a566351f20a16b7545fcd20ca9adb57',1,'f110_gym.envs.base_classes.Simulator.set_map()'],['../classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.html#a989dd691fd4c08d0f18d6c241862d03c',1,'f110_gym.envs.laser_models.ScanSimulator2D.set_map()'],['../classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.html#a00925f5100ae8b2e556154e8935ea86e',1,'f110_gym.unittest.scan_sim.ScanSimulator2D.set_map()']]], - ['simulator_27',['Simulator',['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html',1,'f110_gym::envs::base_classes']]], - ['step_28',['step',['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#af1fb175457362d7419301180b1b3b4c6',1,'f110_gym.envs.base_classes.Simulator.step()'],['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#a0df471828ba39c5228bf5c814a5d0e6e',1,'f110_gym.envs.f110_env.F110Env.step()']]] -]; diff --git a/docs/html/search/all_c.html b/docs/html/search/all_c.html deleted file mode 100644 index da60ab8d..00000000 --- a/docs/html/search/all_c.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_c.js b/docs/html/search/all_c.js deleted file mode 100644 index 93a2641c..00000000 --- a/docs/html/search/all_c.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['update_5fmap_29',['update_map',['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#afc210c3941c1548692c75c961ad443df',1,'f110_gym.envs.f110_env.F110Env.update_map()'],['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#ae9c12c08c2f799504b6390b2d0ffda3f',1,'f110_gym.envs.rendering.EnvRenderer.update_map()']]], - ['update_5fobs_30',['update_obs',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a1b9284f2e59c9000f10bd18e1ec6a9b3',1,'f110_gym::envs::rendering::EnvRenderer']]], - ['update_5fopp_5fposes_31',['update_opp_poses',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a4800c5ac90ba93b79a0338e5e34ead43',1,'f110_gym::envs::base_classes::RaceCar']]], - ['update_5fparams_32',['update_params',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a6ab5b5dd420b182b5156ee9566c03411',1,'f110_gym.envs.base_classes.RaceCar.update_params()'],['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#a974c58957a6b14582149d704ef28a68c',1,'f110_gym.envs.base_classes.Simulator.update_params()'],['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#a79d419bbf2ff0e377d808e4a8f41cc81',1,'f110_gym.envs.f110_env.F110Env.update_params()']]], - ['update_5fpose_33',['update_pose',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#ae12c14c1353e6aab2f72036593d85518',1,'f110_gym::envs::base_classes::RaceCar']]], - ['update_5fscan_34',['update_scan',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a356ec05a0a0c056f4d43f5fb0451c83d',1,'f110_gym::envs::base_classes::RaceCar']]] -]; diff --git a/docs/html/search/all_d.html b/docs/html/search/all_d.html deleted file mode 100644 index bc376fec..00000000 --- a/docs/html/search/all_d.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js deleted file mode 100644 index b24cd13a..00000000 --- a/docs/html/search/all_d.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['zoom_35',['zoom',['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html#a6f0bedfc6f5801b398d5ce537d70c059',1,'f110_gym::unittest::pyglet_test::Camera']]] -]; diff --git a/docs/html/search/classes_0.html b/docs/html/search/classes_0.html deleted file mode 100644 index f7e4c14e..00000000 --- a/docs/html/search/classes_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js deleted file mode 100644 index 54f8aad4..00000000 --- a/docs/html/search/classes_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['app_36',['App',['../classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app.html',1,'f110_gym::unittest::pyglet_test_camera']]] -]; diff --git a/docs/html/search/classes_1.html b/docs/html/search/classes_1.html deleted file mode 100644 index c7ff4b31..00000000 --- a/docs/html/search/classes_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_1.js b/docs/html/search/classes_1.js deleted file mode 100644 index e75aa0d6..00000000 --- a/docs/html/search/classes_1.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['camera_37',['Camera',['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html',1,'f110_gym::unittest::pyglet_test']]], - ['centeredcamera_38',['CenteredCamera',['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera.html',1,'f110_gym::unittest::pyglet_test']]], - ['collisiontests_39',['CollisionTests',['../classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.html',1,'f110_gym.unittest.collision_checks.CollisionTests'],['../classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.html',1,'f110_gym.envs.collision_models.CollisionTests']]] -]; diff --git a/docs/html/search/classes_2.html b/docs/html/search/classes_2.html deleted file mode 100644 index 0d1e8a0c..00000000 --- a/docs/html/search/classes_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_2.js b/docs/html/search/classes_2.js deleted file mode 100644 index 765eedae..00000000 --- a/docs/html/search/classes_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['dynamicstest_40',['DynamicsTest',['../classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.html',1,'f110_gym.envs.dynamic_models.DynamicsTest'],['../classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.html',1,'f110_gym.unittest.dynamics_test.DynamicsTest']]] -]; diff --git a/docs/html/search/classes_3.html b/docs/html/search/classes_3.html deleted file mode 100644 index 21025456..00000000 --- a/docs/html/search/classes_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_3.js b/docs/html/search/classes_3.js deleted file mode 100644 index 574d7115..00000000 --- a/docs/html/search/classes_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['envrenderer_41',['EnvRenderer',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html',1,'f110_gym::envs::rendering']]] -]; diff --git a/docs/html/search/classes_4.html b/docs/html/search/classes_4.html deleted file mode 100644 index 095ab595..00000000 --- a/docs/html/search/classes_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_4.js b/docs/html/search/classes_4.js deleted file mode 100644 index 92c7e9e3..00000000 --- a/docs/html/search/classes_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['f110env_42',['F110Env',['../classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.html',1,'f110_gym.envs.f110_env_backup.F110Env'],['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html',1,'f110_gym.envs.f110_env.F110Env']]] -]; diff --git a/docs/html/search/classes_5.html b/docs/html/search/classes_5.html deleted file mode 100644 index fc9cdc99..00000000 --- a/docs/html/search/classes_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_5.js b/docs/html/search/classes_5.js deleted file mode 100644 index 9fb423bd..00000000 --- a/docs/html/search/classes_5.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['racecar_43',['RaceCar',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html',1,'f110_gym::envs::base_classes']]] -]; diff --git a/docs/html/search/classes_6.html b/docs/html/search/classes_6.html deleted file mode 100644 index 1ecfdddf..00000000 --- a/docs/html/search/classes_6.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/classes_6.js b/docs/html/search/classes_6.js deleted file mode 100644 index ed07bda0..00000000 --- a/docs/html/search/classes_6.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['scansimulator2d_44',['ScanSimulator2D',['../classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.html',1,'f110_gym.unittest.scan_sim.ScanSimulator2D'],['../classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.html',1,'f110_gym.envs.laser_models.ScanSimulator2D']]], - ['scantests_45',['ScanTests',['../classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.html',1,'f110_gym.unittest.scan_sim.ScanTests'],['../classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.html',1,'f110_gym.envs.laser_models.ScanTests']]], - ['simulator_46',['Simulator',['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html',1,'f110_gym::envs::base_classes']]] -]; diff --git a/docs/html/search/close.png b/docs/html/search/close.png deleted file mode 100644 index 9342d3df..00000000 Binary files a/docs/html/search/close.png and /dev/null differ diff --git a/docs/html/search/close.svg b/docs/html/search/close.svg deleted file mode 100644 index a933eea1..00000000 --- a/docs/html/search/close.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - diff --git a/docs/html/search/functions_0.html b/docs/html/search/functions_0.html deleted file mode 100644 index e17c7111..00000000 --- a/docs/html/search/functions_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js deleted file mode 100644 index 99093c72..00000000 --- a/docs/html/search/functions_0.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['_5f_5fdel_5f_5f_47',['__del__',['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#ae193b905b3d1c213ec4324283ebdf201',1,'f110_gym.envs.f110_env.F110Env.__del__()'],['../classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.html#ab53974d19ae639eaa8d922db303d21c4',1,'f110_gym.envs.f110_env_backup.F110Env.__del__()']]], - ['_5f_5finit_5f_5f_48',['__init__',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#af342754a877c42b3828a03b6425801d4',1,'f110_gym.envs.base_classes.RaceCar.__init__()'],['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#ab865873c6f0afa3741add4f39e5fd872',1,'f110_gym.envs.base_classes.Simulator.__init__()'],['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a1b24abdbb4d13744255ebfdb3d509354',1,'f110_gym.envs.rendering.EnvRenderer.__init__()']]] -]; diff --git a/docs/html/search/functions_1.html b/docs/html/search/functions_1.html deleted file mode 100644 index 0ddac0a4..00000000 --- a/docs/html/search/functions_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_1.js b/docs/html/search/functions_1.js deleted file mode 100644 index c0ed981d..00000000 --- a/docs/html/search/functions_1.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['check_5fcollision_49',['check_collision',['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#a7f32c68e14bf47447ce9599c8db21236',1,'f110_gym::envs::base_classes::Simulator']]], - ['check_5fttc_50',['check_ttc',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a4577a30fd8879de7df1d0ace7702f450',1,'f110_gym::envs::base_classes::RaceCar']]] -]; diff --git a/docs/html/search/functions_2.html b/docs/html/search/functions_2.html deleted file mode 100644 index 2737c5ac..00000000 --- a/docs/html/search/functions_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js deleted file mode 100644 index 52489d0f..00000000 --- a/docs/html/search/functions_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['init_5fmap_51',['init_map',['../classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.html#acb0331bb92b190cdd592060385726160',1,'f110_gym::envs::f110_env_backup::F110Env']]] -]; diff --git a/docs/html/search/functions_3.html b/docs/html/search/functions_3.html deleted file mode 100644 index 6da86e7d..00000000 --- a/docs/html/search/functions_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_3.js b/docs/html/search/functions_3.js deleted file mode 100644 index 12ed65b0..00000000 --- a/docs/html/search/functions_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['move_52',['move',['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html#aab35e83f0748c949b8e3a8414097d193',1,'f110_gym::unittest::pyglet_test::Camera']]] -]; diff --git a/docs/html/search/functions_4.html b/docs/html/search/functions_4.html deleted file mode 100644 index 911304e6..00000000 --- a/docs/html/search/functions_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_4.js b/docs/html/search/functions_4.js deleted file mode 100644 index 0089afdd..00000000 --- a/docs/html/search/functions_4.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['on_5fclose_53',['on_close',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a05cb0faf5893e3cbed58cf20d0997bf7',1,'f110_gym::envs::rendering::EnvRenderer']]], - ['on_5fdraw_54',['on_draw',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a0cbcdabef2cdda765d6721ca796ecfd0',1,'f110_gym::envs::rendering::EnvRenderer']]], - ['on_5fmouse_5fdrag_55',['on_mouse_drag',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a557710400bb370a7509dbc17658eadd8',1,'f110_gym::envs::rendering::EnvRenderer']]], - ['on_5fmouse_5fscroll_56',['on_mouse_scroll',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a10f7c38d921015b5574ba0c858a245bb',1,'f110_gym::envs::rendering::EnvRenderer']]], - ['on_5fresize_57',['on_resize',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#ac8bbef5b8910515dd18c8a6624730898',1,'f110_gym::envs::rendering::EnvRenderer']]] -]; diff --git a/docs/html/search/functions_5.html b/docs/html/search/functions_5.html deleted file mode 100644 index 61b920db..00000000 --- a/docs/html/search/functions_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_5.js b/docs/html/search/functions_5.js deleted file mode 100644 index 9f69ae38..00000000 --- a/docs/html/search/functions_5.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['position_58',['position',['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html#a3d2948dc5b1a9d2a6c597a2850ac989b',1,'f110_gym.unittest.pyglet_test.Camera.position(self)'],['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html#ac8e5a2d90df8cd68463746be6e65bee8',1,'f110_gym.unittest.pyglet_test.Camera.position(self, value)']]] -]; diff --git a/docs/html/search/functions_6.html b/docs/html/search/functions_6.html deleted file mode 100644 index dc70a4a0..00000000 --- a/docs/html/search/functions_6.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_6.js b/docs/html/search/functions_6.js deleted file mode 100644 index bbe7324a..00000000 --- a/docs/html/search/functions_6.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['ray_5fcast_5fagents_59',['ray_cast_agents',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a7d15e74a1b82646675d60ce02cdce6b5',1,'f110_gym::envs::base_classes::RaceCar']]], - ['render_60',['render',['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#ab8e76450e63ef88c1ac9721f717fa375',1,'f110_gym::envs::f110_env::F110Env']]], - ['reset_61',['reset',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a0fa587dc3c1a12c9217f0bd093c1bc08',1,'f110_gym.envs.base_classes.RaceCar.reset()'],['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#ab63c655ff0cd1bb2accce7be9fff69e8',1,'f110_gym.envs.base_classes.Simulator.reset()'],['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#ab213d62cea216bbd82d0f6d7061452fb',1,'f110_gym.envs.f110_env.F110Env.reset()']]] -]; diff --git a/docs/html/search/functions_7.html b/docs/html/search/functions_7.html deleted file mode 100644 index 7de31067..00000000 --- a/docs/html/search/functions_7.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_7.js b/docs/html/search/functions_7.js deleted file mode 100644 index f889b796..00000000 --- a/docs/html/search/functions_7.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['scan_62',['scan',['../classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.html#a12c4b2f39bda5dd3a1ea14e70e4370cc',1,'f110_gym.envs.laser_models.ScanSimulator2D.scan()'],['../classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.html#a038a0fc7e42df7827c175fdb3755f2c4',1,'f110_gym.unittest.scan_sim.ScanSimulator2D.scan()']]], - ['set_5fmap_63',['set_map',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a2a60c9ee34f2f09fb0a7e5cc7b287897',1,'f110_gym.envs.base_classes.RaceCar.set_map()'],['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#a0a566351f20a16b7545fcd20ca9adb57',1,'f110_gym.envs.base_classes.Simulator.set_map()'],['../classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.html#a989dd691fd4c08d0f18d6c241862d03c',1,'f110_gym.envs.laser_models.ScanSimulator2D.set_map()'],['../classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.html#a00925f5100ae8b2e556154e8935ea86e',1,'f110_gym.unittest.scan_sim.ScanSimulator2D.set_map()']]], - ['step_64',['step',['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#af1fb175457362d7419301180b1b3b4c6',1,'f110_gym.envs.base_classes.Simulator.step()'],['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#a0df471828ba39c5228bf5c814a5d0e6e',1,'f110_gym.envs.f110_env.F110Env.step()']]] -]; diff --git a/docs/html/search/functions_8.html b/docs/html/search/functions_8.html deleted file mode 100644 index 7422be24..00000000 --- a/docs/html/search/functions_8.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_8.js b/docs/html/search/functions_8.js deleted file mode 100644 index 43c88610..00000000 --- a/docs/html/search/functions_8.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['update_5fmap_65',['update_map',['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#afc210c3941c1548692c75c961ad443df',1,'f110_gym.envs.f110_env.F110Env.update_map()'],['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#ae9c12c08c2f799504b6390b2d0ffda3f',1,'f110_gym.envs.rendering.EnvRenderer.update_map()']]], - ['update_5fobs_66',['update_obs',['../classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.html#a1b9284f2e59c9000f10bd18e1ec6a9b3',1,'f110_gym::envs::rendering::EnvRenderer']]], - ['update_5fopp_5fposes_67',['update_opp_poses',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a4800c5ac90ba93b79a0338e5e34ead43',1,'f110_gym::envs::base_classes::RaceCar']]], - ['update_5fparams_68',['update_params',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a6ab5b5dd420b182b5156ee9566c03411',1,'f110_gym.envs.base_classes.RaceCar.update_params()'],['../classf110__gym_1_1envs_1_1base__classes_1_1_simulator.html#a974c58957a6b14582149d704ef28a68c',1,'f110_gym.envs.base_classes.Simulator.update_params()'],['../classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.html#a79d419bbf2ff0e377d808e4a8f41cc81',1,'f110_gym.envs.f110_env.F110Env.update_params()']]], - ['update_5fpose_69',['update_pose',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#ae12c14c1353e6aab2f72036593d85518',1,'f110_gym::envs::base_classes::RaceCar']]], - ['update_5fscan_70',['update_scan',['../classf110__gym_1_1envs_1_1base__classes_1_1_race_car.html#a356ec05a0a0c056f4d43f5fb0451c83d',1,'f110_gym::envs::base_classes::RaceCar']]] -]; diff --git a/docs/html/search/functions_9.html b/docs/html/search/functions_9.html deleted file mode 100644 index befd4faa..00000000 --- a/docs/html/search/functions_9.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/functions_9.js b/docs/html/search/functions_9.js deleted file mode 100644 index 9f6d2fb7..00000000 --- a/docs/html/search/functions_9.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['zoom_71',['zoom',['../classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.html#a6f0bedfc6f5801b398d5ce537d70c059',1,'f110_gym::unittest::pyglet_test::Camera']]] -]; diff --git a/docs/html/search/mag_sel.png b/docs/html/search/mag_sel.png deleted file mode 100644 index 39c0ed52..00000000 Binary files a/docs/html/search/mag_sel.png and /dev/null differ diff --git a/docs/html/search/mag_sel.svg b/docs/html/search/mag_sel.svg deleted file mode 100644 index 03626f64..00000000 --- a/docs/html/search/mag_sel.svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/docs/html/search/namespaces_0.html b/docs/html/search/namespaces_0.html deleted file mode 100644 index 21db2c3a..00000000 --- a/docs/html/search/namespaces_0.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/html/search/namespaces_0.js b/docs/html/search/namespaces_0.js deleted file mode 100644 index 0f83a327..00000000 --- a/docs/html/search/namespaces_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['random_5ftrackgen_30',['random_trackgen',['../namespacef110__gym_1_1unittest_1_1random__trackgen.html',1,'f110_gym::unittest']]] -]; diff --git a/docs/html/search/nomatches.html b/docs/html/search/nomatches.html deleted file mode 100644 index 43773208..00000000 --- a/docs/html/search/nomatches.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - -
    -
    No Matches
    -
    - - diff --git a/docs/html/search/search.css b/docs/html/search/search.css deleted file mode 100644 index 3cf9df94..00000000 --- a/docs/html/search/search.css +++ /dev/null @@ -1,271 +0,0 @@ -/*---------------- Search Box */ - -#FSearchBox { - float: left; -} - -#MSearchBox { - white-space : nowrap; - float: none; - margin-top: 8px; - right: 0px; - width: 170px; - height: 24px; - z-index: 102; -} - -#MSearchBox .left -{ - display:block; - position:absolute; - left:10px; - width:20px; - height:19px; - background:url('search_l.png') no-repeat; - background-position:right; -} - -#MSearchSelect { - display:block; - position:absolute; - width:20px; - height:19px; -} - -.left #MSearchSelect { - left:4px; -} - -.right #MSearchSelect { - right:5px; -} - -#MSearchField { - display:block; - position:absolute; - height:19px; - background:url('search_m.png') repeat-x; - border:none; - width:115px; - margin-left:20px; - padding-left:4px; - color: #909090; - outline: none; - font: 9pt Arial, Verdana, sans-serif; - -webkit-border-radius: 0px; -} - -#FSearchBox #MSearchField { - margin-left:15px; -} - -#MSearchBox .right { - display:block; - position:absolute; - right:10px; - top:8px; - width:20px; - height:19px; - background:url('search_r.png') no-repeat; - background-position:left; -} - -#MSearchClose { - display: none; - position: absolute; - top: 4px; - background : none; - border: none; - margin: 0px 4px 0px 0px; - padding: 0px 0px; - outline: none; -} - -.left #MSearchClose { - left: 6px; -} - -.right #MSearchClose { - right: 2px; -} - -.MSearchBoxActive #MSearchField { - color: #000000; -} - -/*---------------- Search filter selection */ - -#MSearchSelectWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #90A5CE; - background-color: #F9FAFC; - z-index: 10001; - padding-top: 4px; - padding-bottom: 4px; - -moz-border-radius: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -.SelectItem { - font: 8pt Arial, Verdana, sans-serif; - padding-left: 2px; - padding-right: 12px; - border: 0px; -} - -span.SelectionMark { - margin-right: 4px; - font-family: monospace; - outline-style: none; - text-decoration: none; -} - -a.SelectItem { - display: block; - outline-style: none; - color: #000000; - text-decoration: none; - padding-left: 6px; - padding-right: 12px; -} - -a.SelectItem:focus, -a.SelectItem:active { - color: #000000; - outline-style: none; - text-decoration: none; -} - -a.SelectItem:hover { - color: #FFFFFF; - background-color: #3D578C; - outline-style: none; - text-decoration: none; - cursor: pointer; - display: block; -} - -/*---------------- Search results window */ - -iframe#MSearchResults { - width: 60ex; - height: 15em; -} - -#MSearchResultsWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #000; - background-color: #EEF1F7; - z-index:10000; -} - -/* ----------------------------------- */ - - -#SRIndex { - clear:both; - padding-bottom: 15px; -} - -.SREntry { - font-size: 10pt; - padding-left: 1ex; -} - -.SRPage .SREntry { - font-size: 8pt; - padding: 1px 5px; -} - -body.SRPage { - margin: 5px 2px; -} - -.SRChildren { - padding-left: 3ex; padding-bottom: .5em -} - -.SRPage .SRChildren { - display: none; -} - -.SRSymbol { - font-weight: bold; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRScope { - display: block; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRSymbol:focus, a.SRSymbol:active, -a.SRScope:focus, a.SRScope:active { - text-decoration: underline; -} - -span.SRScope { - padding-left: 4px; -} - -.SRPage .SRStatus { - padding: 2px 5px; - font-size: 8pt; - font-style: italic; -} - -.SRResult { - display: none; -} - -DIV.searchresults { - margin-left: 10px; - margin-right: 10px; -} - -/*---------------- External search page results */ - -.searchresult { - background-color: #F0F3F8; -} - -.pages b { - color: white; - padding: 5px 5px 3px 5px; - background-image: url("../tab_a.png"); - background-repeat: repeat-x; - text-shadow: 0 1px 1px #000000; -} - -.pages { - line-height: 17px; - margin-left: 4px; - text-decoration: none; -} - -.hl { - font-weight: bold; -} - -#searchresults { - margin-bottom: 20px; -} - -.searchpages { - margin-top: 10px; -} - diff --git a/docs/html/search/search.js b/docs/html/search/search.js deleted file mode 100644 index a554ab9c..00000000 --- a/docs/html/search/search.js +++ /dev/null @@ -1,814 +0,0 @@ -/* - @licstart The following is the entire license notice for the - JavaScript code in this file. - - Copyright (C) 1997-2017 by Dimitri van Heesch - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - @licend The above is the entire license notice - for the JavaScript code in this file - */ -function convertToId(search) -{ - var result = ''; - for (i=0;i do a search - { - this.Search(); - } - } - - this.OnSearchSelectKey = function(evt) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==40 && this.searchIndex0) // Up - { - this.searchIndex--; - this.OnSelectItem(this.searchIndex); - } - else if (e.keyCode==13 || e.keyCode==27) - { - this.OnSelectItem(this.searchIndex); - this.CloseSelectionWindow(); - this.DOMSearchField().focus(); - } - return false; - } - - // --------- Actions - - // Closes the results window. - this.CloseResultsWindow = function() - { - this.DOMPopupSearchResultsWindow().style.display = 'none'; - this.DOMSearchClose().style.display = 'none'; - this.Activate(false); - } - - this.CloseSelectionWindow = function() - { - this.DOMSearchSelectWindow().style.display = 'none'; - } - - // Performs a search. - this.Search = function() - { - this.keyTimeout = 0; - - // strip leading whitespace - var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); - - var code = searchValue.toLowerCase().charCodeAt(0); - var idxChar = searchValue.substr(0, 1).toLowerCase(); - if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair - { - idxChar = searchValue.substr(0, 2); - } - - var resultsPage; - var resultsPageWithSearch; - var hasResultsPage; - - var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); - if (idx!=-1) - { - var hexCode=idx.toString(16); - resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; - resultsPageWithSearch = resultsPage+'?'+escape(searchValue); - hasResultsPage = true; - } - else // nothing available for this search term - { - resultsPage = this.resultsPath + '/nomatches.html'; - resultsPageWithSearch = resultsPage; - hasResultsPage = false; - } - - window.frames.MSearchResults.location = resultsPageWithSearch; - var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); - - if (domPopupSearchResultsWindow.style.display!='block') - { - var domSearchBox = this.DOMSearchBox(); - this.DOMSearchClose().style.display = 'inline'; - if (this.insideFrame) - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - domPopupSearchResultsWindow.style.position = 'relative'; - domPopupSearchResultsWindow.style.display = 'block'; - var width = document.body.clientWidth - 8; // the -8 is for IE :-( - domPopupSearchResultsWindow.style.width = width + 'px'; - domPopupSearchResults.style.width = width + 'px'; - } - else - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; - var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; - domPopupSearchResultsWindow.style.display = 'block'; - left -= domPopupSearchResults.offsetWidth; - domPopupSearchResultsWindow.style.top = top + 'px'; - domPopupSearchResultsWindow.style.left = left + 'px'; - } - } - - this.lastSearchValue = searchValue; - this.lastResultsPage = resultsPage; - } - - // -------- Activation Functions - - // Activates or deactivates the search panel, resetting things to - // their default values if necessary. - this.Activate = function(isActive) - { - if (isActive || // open it - this.DOMPopupSearchResultsWindow().style.display == 'block' - ) - { - this.DOMSearchBox().className = 'MSearchBoxActive'; - - var searchField = this.DOMSearchField(); - - if (searchField.value == this.searchLabel) // clear "Search" term upon entry - { - searchField.value = ''; - this.searchActive = true; - } - } - else if (!isActive) // directly remove the panel - { - this.DOMSearchBox().className = 'MSearchBoxInactive'; - this.DOMSearchField().value = this.searchLabel; - this.searchActive = false; - this.lastSearchValue = '' - this.lastResultsPage = ''; - } - } -} - -// ----------------------------------------------------------------------- - -// The class that handles everything on the search results page. -function SearchResults(name) -{ - // The number of matches from the last run of . - this.lastMatchCount = 0; - this.lastKey = 0; - this.repeatOn = false; - - // Toggles the visibility of the passed element ID. - this.FindChildElement = function(id) - { - var parentElement = document.getElementById(id); - var element = parentElement.firstChild; - - while (element && element!=parentElement) - { - if (element.nodeName == 'DIV' && element.className == 'SRChildren') - { - return element; - } - - if (element.nodeName == 'DIV' && element.hasChildNodes()) - { - element = element.firstChild; - } - else if (element.nextSibling) - { - element = element.nextSibling; - } - else - { - do - { - element = element.parentNode; - } - while (element && element!=parentElement && !element.nextSibling); - - if (element && element!=parentElement) - { - element = element.nextSibling; - } - } - } - } - - this.Toggle = function(id) - { - var element = this.FindChildElement(id); - if (element) - { - if (element.style.display == 'block') - { - element.style.display = 'none'; - } - else - { - element.style.display = 'block'; - } - } - } - - // Searches for the passed string. If there is no parameter, - // it takes it from the URL query. - // - // Always returns true, since other documents may try to call it - // and that may or may not be possible. - this.Search = function(search) - { - if (!search) // get search word from URL - { - search = window.location.search; - search = search.substring(1); // Remove the leading '?' - search = unescape(search); - } - - search = search.replace(/^ +/, ""); // strip leading spaces - search = search.replace(/ +$/, ""); // strip trailing spaces - search = search.toLowerCase(); - search = convertToId(search); - - var resultRows = document.getElementsByTagName("div"); - var matches = 0; - - var i = 0; - while (i < resultRows.length) - { - var row = resultRows.item(i); - if (row.className == "SRResult") - { - var rowMatchName = row.id.toLowerCase(); - rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' - - if (search.length<=rowMatchName.length && - rowMatchName.substr(0, search.length)==search) - { - row.style.display = 'block'; - matches++; - } - else - { - row.style.display = 'none'; - } - } - i++; - } - document.getElementById("Searching").style.display='none'; - if (matches == 0) // no results - { - document.getElementById("NoMatches").style.display='block'; - } - else // at least one result - { - document.getElementById("NoMatches").style.display='none'; - } - this.lastMatchCount = matches; - return true; - } - - // return the first item with index index or higher that is visible - this.NavNext = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index++; - } - return focusItem; - } - - this.NavPrev = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index--; - } - return focusItem; - } - - this.ProcessKeys = function(e) - { - if (e.type == "keydown") - { - this.repeatOn = false; - this.lastKey = e.keyCode; - } - else if (e.type == "keypress") - { - if (!this.repeatOn) - { - if (this.lastKey) this.repeatOn = true; - return false; // ignore first keypress after keydown - } - } - else if (e.type == "keyup") - { - this.lastKey = 0; - this.repeatOn = false; - } - return this.lastKey!=0; - } - - this.Nav = function(evt,itemIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - var newIndex = itemIndex-1; - var focusItem = this.NavPrev(newIndex); - if (focusItem) - { - var child = this.FindChildElement(focusItem.parentNode.parentNode.id); - if (child && child.style.display == 'block') // children visible - { - var n=0; - var tmpElem; - while (1) // search for last child - { - tmpElem = document.getElementById('Item'+newIndex+'_c'+n); - if (tmpElem) - { - focusItem = tmpElem; - } - else // found it! - { - break; - } - n++; - } - } - } - if (focusItem) - { - focusItem.focus(); - } - else // return focus to search field - { - parent.document.getElementById("MSearchField").focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = itemIndex+1; - var focusItem; - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem && elem.style.display == 'block') // children visible - { - focusItem = document.getElementById('Item'+itemIndex+'_c0'); - } - if (!focusItem) focusItem = this.NavNext(newIndex); - if (focusItem) focusItem.focus(); - } - else if (this.lastKey==39) // Right - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'block'; - } - else if (this.lastKey==37) // Left - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'none'; - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } - - this.NavChild = function(evt,itemIndex,childIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - if (childIndex>0) - { - var newIndex = childIndex-1; - document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); - } - else // already at first child, jump to parent - { - document.getElementById('Item'+itemIndex).focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = childIndex+1; - var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); - if (!elem) // last child, jump to parent next parent - { - elem = this.NavNext(itemIndex+1); - } - if (elem) - { - elem.focus(); - } - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } -} - -function setKeyActions(elem,action) -{ - elem.setAttribute('onkeydown',action); - elem.setAttribute('onkeypress',action); - elem.setAttribute('onkeyup',action); -} - -function setClassAttr(elem,attr) -{ - elem.setAttribute('class',attr); - elem.setAttribute('className',attr); -} - -function createResults() -{ - var results = document.getElementById("SRResults"); - for (var e=0; eli>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0px/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0px 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0px 1px 1px rgba(255,255,255,0.9);color:#283A5D;outline:none}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a.current{color:#D23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media (min-width: 768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283A5D transparent transparent transparent;background:transparent;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0px 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;border-radius:0 !important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a:hover span.sub-arrow{border-color:#fff transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;border-radius:5px !important;box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0 !important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent #fff}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #D23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#D23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 2f830f97..00000000 --- a/docs/index.rst +++ /dev/null @@ -1,94 +0,0 @@ -.. image:: assets/f1_stickers_01.png - :width: 60 - :align: left - -F1TENTH Gym Documentation -================================================ - -Overview ---------- -The F1TENTH Gym environment is created for research that needs a asynchronous, realistic vehicle simulation with multiple vehicle instances in the same environment, with applications in reinforcement learning. - -The environment is designed with determinism in mind. All agents' physics simulation are stepped simultaneously, and all randomness are seeded and experiments can be reproduced. The explicit stepping also enables the physics engine to take advantage of faster than real-time execution (up to 30x realtime) and enable massively parallel applications. - -Github repo: https://github.com/f1tenth/f1tenth_gym - -Note that the GitHub will have more up to date documentation than this page. If you see a mistake, please contribute a fix! - -Example Usecases ------------------- - -1. The gym environment is used as the backend for the F1TENTH virtual racing online competition at IROS 2020: - -.. raw:: html - - - - -2. The gym environment is used as the simulation engine for the FormulaZero project: https://github.com/travelbureau/f0_icml_code - -.. raw:: html - - - -3. The gym environment is used as the simulation engine for the TunerCar project: http://www.lewissoft.com/pdf/ICRA2020/1667.pdf - -.. raw:: html - - - -Citing --------- -If you find this Gym environment useful, please consider citing: - -.. code:: - - @inproceedings{o2020textscf1tenth, - title={textscF1TENTH: An Open-source Evaluation Environment for Continuous Control and Reinforcement Learning}, - author={O’Kelly, Matthew and Zheng, Hongrui and Karthik, Dhruv and Mangharam, Rahul}, - booktitle={NeurIPS 2019 Competition and Demonstration Track}, - pages={77--89}, - year={2020}, - organization={PMLR} - } - -Physical Platform -------------------- - -To build a physical 1/10th scale vehicle, following the guide here: https://f1tenth.org/build.html - -.. image:: assets/f110cover.png - :width: 400 - :align: center - -.. toctree:: - :caption: INSTALLATION - :maxdepth: 2 - - installation - - -.. toctree:: - :caption: USAGE - :maxdepth: 2 - - basic_usage - customized_usage - -.. toctree:: - :caption: REPRODUCIBILITY - :maxdepth: 2 - - reproduce - -.. toctree:: - :caption: API REFERENCE - :maxdepth: 2 - - api/base_classes - api/dynamic_models - api/laser_models - api/collision_models - api/env - api/obv - api/rendering diff --git a/docs/installation.rst b/docs/installation.rst deleted file mode 100644 index 19a30729..00000000 --- a/docs/installation.rst +++ /dev/null @@ -1,42 +0,0 @@ -.. raw:: html - - - -Installation -================= -``f1tenth_gym`` is a pure Python library. We provide two ways to set up the environment. - -.. image:: assets/docker_logo.png - -Using docker ----------------- - -A Dockerfile is provided. A container can be created by running the following commands. Note that ``sudo`` might be needed depending on how you've set up your Docker engine. - -.. code:: bash - - $ git clone https://github.com/f1tenth/f1tenth_gym.git - $ cd f1tenth_gym - $ git checkout exp_py - $ docker build -t f1tenth_gym -f Dockerfile . - $ docker run -it --name=f1tenth_gym_container --rm f1tenth_gym - -.. image:: assets/pip_logo.svg - -Using pip ---------------- - -The environment is a Python package, and only depends on ``numpy``, ``scipy``, ``numba``, ``Pillow``, ``gym``, ``pyyaml``, and ``pyglet``. You can install the package via pip: - -.. code:: bash - - $ pip3 install git+https://github.com/f1tenth/f1tenth_gym.git diff --git a/docs/reproduce.rst b/docs/reproduce.rst deleted file mode 100644 index 2d70229e..00000000 --- a/docs/reproduce.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. _reproduce: - -Reproducing experiments when using the environment -==================================================== - -COMING SOON... \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 188f51e6..6e74afc2 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,5 @@ -breathe \ No newline at end of file +sphinx==7.2.6 +numpydoc==1.6.0 +pydata-sphinx-theme==0.15.2 +sphinx-design==0.5.0 +sphinx-copybutton==0.5.2 \ No newline at end of file diff --git a/docs/src/_static/switcher.json b/docs/src/_static/switcher.json new file mode 100644 index 00000000..2ef6c237 --- /dev/null +++ b/docs/src/_static/switcher.json @@ -0,0 +1,18 @@ +[ + { + "version": "latest", + "url": "https://f1tenth-gym.readthedocs.io/en/latest/" + }, + { + "version": "stable", + "url": "https://f1tenth-gym.readthedocs.io/en/stable/" + }, + { + "version": "v1.0.0", + "url": "https://f1tenth-gym.readthedocs.io/en/v1.0.0/" + }, + { + "version": "dev_docs", + "url": "https://f1tenth-gym.readthedocs.io/en/dev_docs/" + } +] \ No newline at end of file diff --git a/docs/src/_templates/autosummary/attributes.rst b/docs/src/_templates/autosummary/attributes.rst new file mode 100644 index 00000000..f00f0a66 --- /dev/null +++ b/docs/src/_templates/autosummary/attributes.rst @@ -0,0 +1,13 @@ +:orphan: + +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +attribute + +.. auto{{ objtype }}:: {{ fullname | replace("f110_gym.envs.", "f110_gym.envs::") }} + +{# In the fullname (e.g. `numpy.ma.MaskedArray.methodname`), the module name +is ambiguous. Using a `::` separator (e.g. `numpy::ma.MaskedArray.methodname`) +specifies `numpy` as the module name. #} \ No newline at end of file diff --git a/docs/src/_templates/autosummary/base.rst b/docs/src/_templates/autosummary/base.rst new file mode 100644 index 00000000..655bddc5 --- /dev/null +++ b/docs/src/_templates/autosummary/base.rst @@ -0,0 +1,17 @@ +{% if objtype == 'property' %} +:orphan: +{% endif %} + +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +{% if objtype == 'property' %} +property +{% endif %} + +.. auto{{ objtype }}:: {{ fullname | replace("f110_gym.envs.", "f110_gym.envs::") }} + +{# In the fullname (e.g. `numpy.ma.MaskedArray.methodname`), the module name +is ambiguous. Using a `::` separator (e.g. `numpy::ma.MaskedArray.methodname`) +specifies `numpy` as the module name. #} \ No newline at end of file diff --git a/docs/src/_templates/autosummary/class.rst b/docs/src/_templates/autosummary/class.rst new file mode 100644 index 00000000..7786c11e --- /dev/null +++ b/docs/src/_templates/autosummary/class.rst @@ -0,0 +1,17 @@ +{% extends "!autosummary/class.rst" %} + +{% block methods %} {% if methods %} + + .. autosummary:: + :toctree: generated/ + {% for item in methods %} + {% if item != '__init__'%} + ~{{ name }}.{{ item }} + {% endif %} + {%- endfor %} + +{% endif %} {% endblock %} + +{% block attributes %} {% if attributes %} + +{% endif %} {% endblock %} \ No newline at end of file diff --git a/docs/src/_templates/autosummary/member.rst b/docs/src/_templates/autosummary/member.rst new file mode 100644 index 00000000..9d82946f --- /dev/null +++ b/docs/src/_templates/autosummary/member.rst @@ -0,0 +1,13 @@ +:orphan: + +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +member + +.. auto{{ objtype }}:: {{ fullname | replace("f110_gym.envs.", "f110_gym.envs::") }} + +{# In the fullname (e.g. `numpy.ma.MaskedArray.methodname`), the module name +is ambiguous. Using a `::` separator (e.g. `numpy::ma.MaskedArray.methodname`) +specifies `numpy` as the module name. #} \ No newline at end of file diff --git a/docs/src/_templates/autosummary/method.rst b/docs/src/_templates/autosummary/method.rst new file mode 100644 index 00000000..2909b838 --- /dev/null +++ b/docs/src/_templates/autosummary/method.rst @@ -0,0 +1,13 @@ +:orphan: + +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +method + +.. auto{{ objtype }}:: {{ fullname | replace("f110_gym.envs.", "f110_gym.envs::") }} + +{# In the fullname (e.g. `numpy.ma.MaskedArray.methodname`), the module name +is ambiguous. Using a `::` separator (e.g. `numpy::ma.MaskedArray.methodname`) +specifies `numpy` as the module name. #} \ No newline at end of file diff --git a/docs/src/_templates/autosummary/minimal_module.rst b/docs/src/_templates/autosummary/minimal_module.rst new file mode 100644 index 00000000..671187ce --- /dev/null +++ b/docs/src/_templates/autosummary/minimal_module.rst @@ -0,0 +1,6 @@ +{{ fullname | escape | underline}} + +.. automodule:: {{ fullname }} + + {% block docstring %} + {% endblock %} \ No newline at end of file diff --git a/docs/src/_templates/autosummary/module.rst b/docs/src/_templates/autosummary/module.rst new file mode 100644 index 00000000..ecfcbf41 --- /dev/null +++ b/docs/src/_templates/autosummary/module.rst @@ -0,0 +1,40 @@ +{% extends "!autosummary/module.rst" %} + +{# This file is almost the same as the default, but adds :toctree: to the autosummary directives. + The original can be found at `sphinx/ext/autosummary/templates/autosummary/module.rst`. #} + +{% block attributes %} +{% if attributes %} + .. rubric:: Module Attributes + + .. autosummary:: + :toctree: + {% for item in attributes %} + {{ item }} + {%- endfor %} +{% endif %} +{% endblock %} + +{% block functions %} +{% if functions %} + .. rubric:: Functions + + .. autosummary:: + :toctree: + {% for item in functions %} + {{ item }} + {%- endfor %} +{% endif %} +{% endblock %} + +{% block classes %} +{% if classes %} + .. rubric:: Classes + + .. autosummary:: + :toctree: + {% for item in classes %} + {{ item }} + {%- endfor %} +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/docs/src/api/action.rst b/docs/src/api/action.rst new file mode 100644 index 00000000..4f6238d1 --- /dev/null +++ b/docs/src/api/action.rst @@ -0,0 +1,21 @@ +Control Actions +================ + +Enums specifying different control input action types. + +.. currentmodule:: f110_gym.envs.action + +.. autosummary:: + :toctree: _generated/ + + LongitudinalActionEnum + LongitudinalAction + AcclAction + SpeedAction + SteerActionEnum + SteerAction + SteeringAngleAction + SteeringSpeedAction + CarAction + from_single_to_multi_action_space + \ No newline at end of file diff --git a/docs/api/base_classes.rst b/docs/src/api/base_classes.rst similarity index 73% rename from docs/api/base_classes.rst rename to docs/src/api/base_classes.rst index d3a555bc..ba20d060 100644 --- a/docs/api/base_classes.rst +++ b/docs/src/api/base_classes.rst @@ -7,5 +7,11 @@ The ``RaceCar`` class handles the simulation of the dynamics model and the gener The ``Simulator`` class handles the interaction between agents including collision checking. -.. doxygenfile:: base_classes.py - :project: f1tenth_gym \ No newline at end of file +.. currentmodule:: f110_gym.envs.base_classes + +.. autosummary:: + :toctree: _generated/ + + RaceCar + Simulator + \ No newline at end of file diff --git a/docs/api/collision_models.rst b/docs/src/api/collision_models.rst similarity index 56% rename from docs/api/collision_models.rst rename to docs/src/api/collision_models.rst index d7875976..7d2d67b5 100644 --- a/docs/api/collision_models.rst +++ b/docs/src/api/collision_models.rst @@ -3,5 +3,17 @@ Collision Models This file contains all the numba just-in-time compiled functions for collision checking between agents. The GJK algorithm (more detail here: https://cse442-17f.github.io/Gilbert-Johnson-Keerthi-Distance-Algorithm/) is used to check for overlap in polygons. -.. doxygenfile:: collision_models.py - :project: f1tenth_gym \ No newline at end of file +.. currentmodule:: f110_gym.envs.collision_models + +.. autosummary:: + :toctree: _generated/ + + perpendicular + tripleProduct + avgPoint + indexOfFurthestPoint + support + collision + collision_multiple + get_trmtx + get_vertices \ No newline at end of file diff --git a/docs/src/api/dynamic_models.rst b/docs/src/api/dynamic_models.rst new file mode 100644 index 00000000..2930bcc6 --- /dev/null +++ b/docs/src/api/dynamic_models.rst @@ -0,0 +1,18 @@ +Dynamic Models +======================================== + +This file contains all numba just-in-time compiled function for the dynamic models. + +.. currentmodule:: f110_gym.envs.dynamic_models + +.. autosummary:: + :toctree: _generated/ + + DynamicModel + upper_accel_limit + accl_constraints + steering_constraint + vehicle_dynamics_ks + vehicle_dynamics_st + pid_steer + pid_accl \ No newline at end of file diff --git a/docs/src/api/env.rst b/docs/src/api/env.rst new file mode 100644 index 00000000..0bdd6c8e --- /dev/null +++ b/docs/src/api/env.rst @@ -0,0 +1,11 @@ +Gym Environment +======================================== + +This is the top level file that conforms to the Gymnasium convention. + +.. currentmodule:: f110_gym.envs + +.. autosummary:: + :toctree: _generated/ + + F110Env \ No newline at end of file diff --git a/docs/src/api/index.rst b/docs/src/api/index.rst new file mode 100644 index 00000000..b284e7ba --- /dev/null +++ b/docs/src/api/index.rst @@ -0,0 +1,19 @@ +API Overview +============== + +.. toctree:: + :caption: API + :maxdepth: 2 + + env + base_classes + action + dynamic_models + integrators + laser_models + collision_models + obv + rendering + track + reset + utils \ No newline at end of file diff --git a/docs/src/api/integrators.rst b/docs/src/api/integrators.rst new file mode 100644 index 00000000..018e8987 --- /dev/null +++ b/docs/src/api/integrators.rst @@ -0,0 +1,15 @@ +Integrators +============= + +Different integrators used to integrate ODEs of the dynamics. + +.. currentmodule:: f110_gym.envs.integrator + +.. autosummary:: + :toctree: _generated/ + + IntegratorType + Integrator + RK4Integrator + EulerIntegrator + \ No newline at end of file diff --git a/docs/api/laser_models.rst b/docs/src/api/laser_models.rst similarity index 63% rename from docs/api/laser_models.rst rename to docs/src/api/laser_models.rst index 93e14b6c..4dcab568 100644 --- a/docs/api/laser_models.rst +++ b/docs/src/api/laser_models.rst @@ -3,5 +3,21 @@ Laser Scan Simulator Models This file contains all numba just-in-time compiled function for the 2D laser scan models. The core of the laser scan simulation is the Euclidean distance transform of the map image provided. See more details about the algorithm here: https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.distance_transform_edt.html#scipy.ndimage.distance_transform_edt. Then, ray tracing is used to create the beams of the 2D lasers scan. -.. doxygenfile:: laser_models.py - :project: f1tenth_gym \ No newline at end of file +.. currentmodule:: f110_gym.envs.laser_models + +.. autosummary:: + :toctree: _generated/ + + ScanSimulator2D + get_dt + xy_2_rc + distance_transform + trace_ray + get_scan + check_ttc_jit + cross + are_collinear + get_range + get_blocked_view_indices + ray_cast + \ No newline at end of file diff --git a/docs/src/api/obv.rst b/docs/src/api/obv.rst new file mode 100644 index 00000000..982a44a8 --- /dev/null +++ b/docs/src/api/obv.rst @@ -0,0 +1,14 @@ +Observations +============= + +Observation types and factory for gymnasium env. + +.. currentmodule:: f110_gym.envs.observation + +.. autosummary:: + :toctree: _generated/ + + Observation + OriginalObservation + FeaturesObservation + observation_factory \ No newline at end of file diff --git a/docs/src/api/rendering.rst b/docs/src/api/rendering.rst new file mode 100644 index 00000000..3e75f04c --- /dev/null +++ b/docs/src/api/rendering.rst @@ -0,0 +1,16 @@ +Rendering Engine +======================================== + +This is the rendering engine using pygame to visualize the running environment. + +.. currentmodule:: f110_gym.envs.rendering + +.. autosummary:: + :toctree: _generated/ + + objects.TextObject + objects.Map + objects.Car + renderer.RenderSpec + renderer.EnvRenderer + rendering_pygame.PygameEnvRenderer diff --git a/docs/src/api/reset.rst b/docs/src/api/reset.rst new file mode 100644 index 00000000..99a314d3 --- /dev/null +++ b/docs/src/api/reset.rst @@ -0,0 +1,15 @@ +Reset Function +======================================== + +This is utilities for specifying different types of reset functions. + +.. currentmodule:: f110_gym.envs.reset + +.. autosummary:: + :toctree: _generated/ + + reset_fn.ResetFn + masked_reset.MaskedResetFn + masked_reset.GridResetFn + masked_reset.AllTrackResetFn + utils.sample_around_waypoint \ No newline at end of file diff --git a/docs/src/api/track.rst b/docs/src/api/track.rst new file mode 100644 index 00000000..087e5206 --- /dev/null +++ b/docs/src/api/track.rst @@ -0,0 +1,16 @@ +Race Tracks +======================================== + +This is the utilities for specifying a track. + +.. currentmodule:: f110_gym.envs.track + +.. autosummary:: + :toctree: _generated/ + + cubic_spline.CubicSpline1D + cubic_spline.CubicSpline2D + raceline.Raceline + track.TrackSpec + track.Track + utils.find_track_dir diff --git a/docs/src/api/utils.rst b/docs/src/api/utils.rst new file mode 100644 index 00000000..602a5f17 --- /dev/null +++ b/docs/src/api/utils.rst @@ -0,0 +1,11 @@ +Utils +============= + +Misc. utils. + +.. currentmodule:: f110_gym.envs.utils + +.. autosummary:: + :toctree: _generated/ + + deep_update \ No newline at end of file diff --git a/docs/assets/docker_logo.png b/docs/src/assets/docker_logo.png similarity index 100% rename from docs/assets/docker_logo.png rename to docs/src/assets/docker_logo.png diff --git a/docs/assets/f110cover.png b/docs/src/assets/f110cover.png similarity index 100% rename from docs/assets/f110cover.png rename to docs/src/assets/f110cover.png diff --git a/docs/assets/f1_stickers_01.png b/docs/src/assets/f1_stickers_01.png similarity index 100% rename from docs/assets/f1_stickers_01.png rename to docs/src/assets/f1_stickers_01.png diff --git a/docs/assets/f1_stickers_02.png b/docs/src/assets/f1_stickers_02.png similarity index 100% rename from docs/assets/f1_stickers_02.png rename to docs/src/assets/f1_stickers_02.png diff --git a/docs/assets/f1tenth_gym.svg b/docs/src/assets/f1tenth_gym.svg similarity index 100% rename from docs/assets/f1tenth_gym.svg rename to docs/src/assets/f1tenth_gym.svg diff --git a/docs/assets/f1tenth_gym_color.svg b/docs/src/assets/f1tenth_gym_color.svg similarity index 100% rename from docs/assets/f1tenth_gym_color.svg rename to docs/src/assets/f1tenth_gym_color.svg diff --git a/docs/assets/gym.svg b/docs/src/assets/gym.svg similarity index 100% rename from docs/assets/gym.svg rename to docs/src/assets/gym.svg diff --git a/docs/assets/pip_logo.svg b/docs/src/assets/pip_logo.svg similarity index 100% rename from docs/assets/pip_logo.svg rename to docs/src/assets/pip_logo.svg diff --git a/docs/src/assets/random_trackgen.png b/docs/src/assets/random_trackgen.png new file mode 100644 index 00000000..0a89d70d Binary files /dev/null and b/docs/src/assets/random_trackgen.png differ diff --git a/docs/src/conf.py b/docs/src/conf.py new file mode 100644 index 00000000..77d484e4 --- /dev/null +++ b/docs/src/conf.py @@ -0,0 +1,70 @@ +# flake8: noqa +import os +import sys + +sys.path.insert(0, os.path.abspath("../../")) + +# -- Project information ----------------------------------------------------- + +project = "f1tenth_gym" +copyright = "2023, Hongrui Zheng, Matthew O'Kelly, Aman Sinha, Joseph Auckley, Luigi Berducci, Renukanandan Tumu, Ahmad Amine" +author = "Hongrui Zheng, Matthew O'Kelly, Aman Sinha, Joseph Auckley, Luigi Berducci, Renukanandan Tumu, Ahmad Amine" + +# The full version, including alpha/beta/rc tags +release = "1.0.0" +version = "1.0.0" + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "sphinx.ext.autodoc", + "numpydoc", + "sphinx_copybutton", + "sphinx_design", + "sphinx.ext.doctest", + "sphinx.ext.autosummary", + "sphinx.ext.coverage", + "sphinx.ext.viewcode", +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] + +master_doc = "index" + +# -- coverate test configuration ----------------------------------------------- +coverage_show_missing_items = True + +# -- numpydoc ----------------------------------------------------------------- +numpydoc_show_class_members = False + +# -- Theme ------------------------------------------------------------------- +html_theme = "pydata_sphinx_theme" +html_favicon = "assets/f1_stickers_02.png" +html_theme_options = { + "logo": { + "image_light": "assets/f1tenth_gym_color.svg", + "image_dark": "assets/f1tenth_gym.svg", + }, + "github_url": "https://github.com/f1tenth/f1tenth_gym", + "collapse_navigation": True, + "header_links_before_dropdown": 6, + # Add light/dark mode and documentation version switcher: + "navbar_end": ["theme-switcher", "navbar-icon-links"], +} +# html_sidebars = { +# "**": ["search-field.html", "sidebar-nav-bs.html", "sidebar-ethical-ads.html"] +# } +html_last_updated_fmt = "%b %d, %Y" +html_show_sourcelink = True + +copybutton_prompt_text = ">>> " \ No newline at end of file diff --git a/docs/src/index.rst b/docs/src/index.rst new file mode 100644 index 00000000..2175f8db --- /dev/null +++ b/docs/src/index.rst @@ -0,0 +1,121 @@ +F1TENTH Gym Documentation +================================================ + +Overview +--------- +The F1TENTH Gym environment is created for research that needs a asynchronous, realistic vehicle simulation with multiple vehicle instances in the same environment, with applications in reinforcement learning. + +The environment is designed with determinism in mind. All agents' physics simulation are stepped simultaneously, and all randomness are seeded and experiments can be reproduced. The explicit stepping also enables the physics engine to take advantage of faster than real-time execution (up to 30x realtime) and enable massively parallel applications. + +Github repo: https://github.com/f1tenth/f1tenth_gym + +Note that the GitHub will have more up to date documentation than this page. If you see a mistake, please contribute a fix! + + +.. grid:: 2 + :gutter: 4 + + .. grid-item-card:: + + Physical Platform + ^^^^^^^^^^^^^^^^^ + + To build a physical 1/10th scale vehicle, follow the official build guide. + + .. image:: assets/f110cover.png + :width: 100 + :align: center + + +++ + + .. button-link:: https://f1tenth.org/build.html + :expand: + :color: secondary + :click-parent: + + Build Guide + + + .. grid-item-card:: + + Installation + ^^^^^^^^^^^^ + + Installation guide + + .. image:: assets/pip_logo.svg + :width: 100 + :align: center + + +++ + + .. button-ref:: install/installation + :expand: + :color: secondary + :click-parent: + + Installation + + .. grid-item-card:: + + Quick Start + ^^^^^^^^^^^ + + Example usage + + .. image:: assets/gym.svg + :width: 100 + :align: center + + +++ + + .. button-ref:: usage/index + :expand: + :color: secondary + :click-parent: + + Quick Start + + .. grid-item-card:: + + API + ^^^ + + API + + .. image:: assets/gym.svg + :width: 100 + :align: center + + +++ + + .. button-ref:: api/index + :expand: + :color: secondary + :click-parent: + + API + +Citing +-------- +If you find this Gym environment useful, please consider citing: + +.. code:: + + @inproceedings{o2020f1tenth, + title={textscF1TENTH: An Open-source Evaluation Environment for Continuous Control and Reinforcement Learning}, + author={O’Kelly, Matthew and Zheng, Hongrui and Karthik, Dhruv and Mangharam, Rahul}, + booktitle={NeurIPS 2019 Competition and Demonstration Track}, + pages={77--89}, + year={2020}, + organization={PMLR} + } + +.. toctree:: + :hidden: + :maxdepth: 3 + :titlesonly: + + install/installation + usage/index + api/index \ No newline at end of file diff --git a/docs/src/install/installation.rst b/docs/src/install/installation.rst new file mode 100644 index 00000000..ae453a54 --- /dev/null +++ b/docs/src/install/installation.rst @@ -0,0 +1,38 @@ +Installation +================= +``f1tenth_gym`` is a pure Python library and can be installed with ``pip``. + + +PyPI +------ + +Coming Soon... + + +Install for Developement +---------------------------- + +We suggest using a ``virtualenv``. Note that ``python3.9+`` is required. You can install the package via pip: + +.. code:: bash + + pip install -e git+https://github.com/f1tenth/f1tenth_gym.git@v1.0.0#egg=f1tenth_gym + + +Building Documentation +------------------------ + +The documentations can be build locally. Install the extra dependencies via pip: + +.. code:: bash + + cd f1tenth_gym/docs + pip install -r requirements.txt + +Then you can build the documentations in the ``docs/`` directory via: + +.. code:: bash + + make html + +The static HTML pages can be found at ``docs/_build/html/index.html`` afterwards. \ No newline at end of file diff --git a/docs/src/usage/actions.rst b/docs/src/usage/actions.rst new file mode 100644 index 00000000..b43eb27d --- /dev/null +++ b/docs/src/usage/actions.rst @@ -0,0 +1,49 @@ +.. _actions: + +Actions +===================== + +Several **types of actions** for longitudinal and lateral control are available in every track. + +Lateral actions: + +- `steering_angle`: the action sets the target steering angle of the vehicle in `rad`, which is then converted to steering speed. + +- `steering_speed`: the action directly sets the steering speed of the vehicle in `rad/s`. + +Longitudinal actions: + +- `speed`: the action sets the target speed of the vehicle in `m/s`, which is then converted to acceleration. + +- `accl`: the action directly sets the vehicle acceleration in `m/s^2`. + +**Note:** All the agents will have the same observation type. + +Actions Configuration +--------------------- +The environment comes with a *default* action type, which can be changed using the environment configuration. + +Actions can be configured at the environment creation: + +.. code:: python + + import gymnasium as gym + + env = gym.make( + "f110_gym:f110-v0", + config={ + "control_input": ["accl", "steering_speed"] + }) + obs, infos = env.reset() + +or after the environment creation: + +.. code:: python + + import gymnasium as gym + + env = gym.make("f110_gym:f110-v0") + env.configure({ + "control_input": ["speed", "steering_angle"] + }) + obs, infos = env.reset() \ No newline at end of file diff --git a/docs/src/usage/basic_usage.rst b/docs/src/usage/basic_usage.rst new file mode 100644 index 00000000..448bf8ec --- /dev/null +++ b/docs/src/usage/basic_usage.rst @@ -0,0 +1,70 @@ +.. _basic_usage: + +Basic example +===================== + +The environment can work out of the box without too much customization. + +A gym env could be instantiated without any extra arguments using the ``gym.make()`` function. +By default, it spawns two agents in the Spielberg racetrack. + +The simulation can be reset by calling the ``reset()`` method +and step forward in time by calling the ``step()`` method with a joint action for all agents. + +A working example can be found in ``examples/waypoint_follow.py``. + + +Usage +----- + +.. code:: python + + import gymnasium as gym + + env = gym.make("f110_gym:f110-v0", render_mode="human") + obs, infos = env.reset() + + while not done: + # sample random action + actions = env.action_space.sample() + # step simulation + obs, step_reward, done, info = racecar_env.step(actions) + env.render() + +Default configuration +--------------------- + +.. code:: python + + { + "seed": 12345, + "map": "Spielberg", + "params": { + "mu": 1.0489, + "C_Sf": 4.718, + "C_Sr": 5.4562, + "lf": 0.15875, + "lr": 0.17145, + "h": 0.074, + "m": 3.74, + "I": 0.04712, + "s_min": -0.4189, + "s_max": 0.4189, + "sv_min": -3.2, + "sv_max": 3.2, + "v_switch": 7.319, + "a_max": 9.51, + "v_min": -5.0, + "v_max": 20.0, + "width": 0.31, + "length": 0.58, + }, + "num_agents": 2, + "timestep": 0.01, + "ego_idx": 0, + "integrator": "rk4", + "model": "st", + "control_input": ["speed", "steering_angle"], + "observation_config": {"type": None}, + "reset_config": {"type": None}, + } diff --git a/docs/src/usage/customized_usage.rst b/docs/src/usage/customized_usage.rst new file mode 100644 index 00000000..4b4e2432 --- /dev/null +++ b/docs/src/usage/customized_usage.rst @@ -0,0 +1,40 @@ +.. _custom_usage: + +Customized Usage Example +========================== + +For a basic usage example, see :ref:`basic_usage`. + +The environment also provides options for customization. + +Random Track Generator +----------------------- + +The script `examples/random_trackgen.py` allows to generate random tracks. + +To use it, the following dependencies are required: + +:: + + pip install cv2 + pip install numpy + pip install shapely + pip install matplotlib + + +The script can be run by specifying `seed`, number of maps to generate `n_maps` and the output directory `output_dir`. + +For example, to generate 3 random maps and store them in the directory `custom_maps`: + +:: + + python examples/random_trackgen.py --seed 42 --n-maps 3 --outdir custom_maps + + +.. image:: /assets/random_trackgen.png + :width: 800 + :align: center + +Custom Map +------------ +Work in progress on how to add a custom map. \ No newline at end of file diff --git a/docs/src/usage/dynamics.rst b/docs/src/usage/dynamics.rst new file mode 100644 index 00000000..2ab1fdb4 --- /dev/null +++ b/docs/src/usage/dynamics.rst @@ -0,0 +1,52 @@ +.. _dynamics: + +Vehicle Dynamics +===================== + +The vehicle dynamics are modeled using a single-track model, as in [AlKM17]_. + +We support two vehicle dynamics models: + +- Kinematic Single-Track Model (`ks`): Simpler model that considers only the kinematics of the vehicle, i.e., the position, orientation, and velocity, ignoring the forces that act on the vehicle. + +- Single-Track Model (`st`): More complex model that considers the forces that act on the vehicle, such as the tire forces. + +Despite the fact that the single-track model is a simplified model, it is able to capture the +tire slip effects on the slip angle, which is important for accurate simulation at the physical +limits of the vehicle. + + +Dynamics Configuration +---------------------- +The environment comes with a *default* dynamics model, which can be changed using the environment configuration. + +The dynamics model can be configured at the environment creation: + +.. code:: python + + import gymnasium as gym + + env = gym.make( + "f110_gym:f110-v0", + config={ + "model": "ks" + }) + obs, infos = env.reset() + +or after the environment creation: + +.. code:: python + + import gymnasium as gym + + env = gym.make("f110_gym:f110-v0") + env.configure({ + "model": "ks", + }) + obs, infos = env.reset() + + + +.. rubric:: References + +.. [AlKM17] Althoff, M.; Koschi, M.; Manzinger, S..: CommonRoad: Composable benchmarks for motion planning on roads. In: 2017 IEEE Intelligent Vehicles Symposium (IV). IEEE, 2017. \ No newline at end of file diff --git a/docs/src/usage/index.rst b/docs/src/usage/index.rst new file mode 100644 index 00000000..745ecc40 --- /dev/null +++ b/docs/src/usage/index.rst @@ -0,0 +1,45 @@ +Getting Started +=============== + +Making an environment +--------------------- + +This is a quick example of how to make a simple environment: + +.. code:: python + + import gymnasium as gym + + env = gym.make("f110_gym:f110-v0", render_mode="human") + obs, infos = env.reset() + + while not done: + # sample random action + actions = env.action_space.sample() + # step simulation + obs, step_reward, done, info = racecar_env.step(actions) + env.render() + +Configuration +------------- + +Here is the list of configurable options for the environment: +- Track +- Observations +- Actions +- Rewards +- Dynamics +- Rendering +- Extra tools + +.. toctree:: + :caption: Getting started + :maxdepth: 1 + + basic_usage + observations + actions + rewards + dynamics + customized_usage + rendering \ No newline at end of file diff --git a/docs/src/usage/observations.rst b/docs/src/usage/observations.rst new file mode 100644 index 00000000..960022f4 --- /dev/null +++ b/docs/src/usage/observations.rst @@ -0,0 +1,48 @@ +.. _observations: + +Observations +===================== + +For the environment, several **types of observations** can be used. + +- `original` : Original observation from the old simulator. This is default for compatibility. +- `kinematic_state` : Kinematic state observation, which includes `pose_x, pose_y, delta, linear_vel_x, pose_theta`. +- `dynamic_state` : Dynamic state observation, which includes `pose_x, pose_y, delta, linear_vel_x, pose_theta, ang_vel_z, beta`. +- `features` : Customisable observation, which includes all the features defined in the `features` argument. + +**Note:** All the agents will have the same observation type. + +Observations Configuration +-------------------------- +Each environment comes with a *default* observation, +which can be changed or customised using environment configurations. + +Observations can be configured at the environment creation: + +.. code:: python + + import gymnasium as gym + + env = gym.make( + "f110_gym:f110-v0", + config={ + "observation_config": { + "type": "features", + "features": ["linear_vel_x", "scan"] + }, + }) + obs, infos = env.reset() + +or after the environment creation: + +.. code:: python + + import gymnasium as gym + + env = gym.make("f110_gym:f110-v0") + env.configure({ + "observation_config": { + "type": "features", + "features": ["linear_vel_x", "scan"]} + }) + obs, infos = env.reset() \ No newline at end of file diff --git a/docs/src/usage/rendering.rst b/docs/src/usage/rendering.rst new file mode 100644 index 00000000..f8c2f1af --- /dev/null +++ b/docs/src/usage/rendering.rst @@ -0,0 +1,68 @@ +.. _rendering: + +Rendering +===================== + +The environment rendering is done with `pygame`. + +As by default in gymnasium environments, +there are multiple rendering modes available: + +- `human`: for real-time rendering with `pygame`; + +- `rgb_array`: for collecting the current frame as a numpy array; + +- `rgb_array_list`: for collecting multiple frames into a list. This is useful to generate smooth videos when using frame-skipping. + +Additionally, for fast rendering and debugging, we add: + +- `human-fast`: faster-than-real-time rendering. Up to 10x faster based on the host machine. + +Rendering Configuration +------------------------ + +The user can customize the rendering mode with the `rendering_mode` parameter in the environment configuration. + +.. code:: python + + import gymnasium as gym + + env = gym.make( + "f110_gym:f110-v0", + render_mode="human-fast", + ) + obs, infos = env.reset() + done = False + + while not done: + action = env.action_space.sample() + obs, reward, done, infos = env.step(action) + env.render() + + +.. note:: + When rendering in `human` mode, + the user can interact to change the agent to focus on by pressing the left/right/middle mouse button, + as described by the instructions diplayed in the top of the window. + +Parameter Configuration +----------------------- + +The user can customize the rendering parameters in the `f1tenth_gym.rendering/rendering.yaml` file: + +- `window_size`: width and height of the window in pixels + +- `focus_on`: agent id to focus on (e.g., `agent_0`) or `null` for map view + +- `zoom_in_factor`: zoom in factor. 1.0 is no zoom, >1.0 is zoom in, <1.0 is zoom out + +- `show_wheels`: it toggles the visualization of the vehicle wheels + +- `car_tickness`: thickness of the car border + +- `show_info`: it toggles the visualization of the instruction text + +- `vehicle_palette`: cyclic list of colors for the vehicles (e.g., first agent takes the first color, second agent takes the second color, etc. and then it starts again from the first color) + + + diff --git a/docs/src/usage/rewards.rst b/docs/src/usage/rewards.rst new file mode 100644 index 00000000..72822275 --- /dev/null +++ b/docs/src/usage/rewards.rst @@ -0,0 +1,83 @@ +.. _rewards: + +Rewards +===================== + +We define a simple reward to encourage the agent to stay alive, giving a reward of `timestep` at each timestep. + +.. note:: + The choice of an appropriate reward is a challenging problem, beyond the scope of this project. + To avoid over-specifying every aspect of the expected racing behaviour in the reward + (*e.g., safe distance, speed, minimising jerk*), + we preferred to specify the simplest reward function possible. + This allows the user to experiment with different reward functions based on their specific requirements. + + +Custom Reward Function +------------------------------ + +For custom reward functions, we invite the user to use +`gymnasium.wrappers `_. + +For example, the following code snippet shows how to implement a custom reward function that +linearly combines a speed reward and a crash penalty: + +.. code:: python + + class RacingRewardWrapper(Wrapper): + + def __init__( + self, + env: gymnasium.Env, + agent_id: str, + reward_speed_weight: float, + reward_crash_weight: float, + ): + super().__init__(env) + self.agent_id = agent_id + self.reward_speed_weight = reward_speed_weight + self.reward_crash_weight = reward_crash_weight + + # sanity checks on the observation space + if agent_id not in env.observation_space.spaces: + raise ValueError(f"Agent {agent_id} not found in observation space") + for feature in ["linear_vel_x", "collision"]: + if feature not in env.observation_space.spaces[agent_id].spaces: + raise ValueError(f"{feature} not found in observation space") + + def step(self, action): + obs, _, terminated, truncated, info = self.env.step(action) + speed = obs[self.agent_id]["linear_vel_x"] + crash = obs[self.agent_id]["collision"] + reward = self.reward_speed_weight * speed + self.reward_crash_weight * crash + return obs, reward, terminated, truncated, info + + +The above wrapper can be used on the original environment as follows: + +.. code:: python + + env = gymnasium.make( + "f110_gym:f110-v0", + config={ + "num_agents": 1, + "observation_config": { + "type": "features", + "features": ["scan", "linear_vel_x", "collision"], + }, + }, + render_mode="human", + ) + env = RacingRewardWrapper( + env, agent_id="agent_0", reward_speed_weight=1.0, reward_crash_weight=-1.0 + ) + + obs, info = env.reset() + done = False + + while not done: + action = env.action_space.sample() + obs, reward, done, truncated, info = env.step(action) + print("step reward: ", reward) + env.render() + diff --git a/docs/xml/____init_____8py.xml b/docs/xml/____init_____8py.xml deleted file mode 100644 index 3aa36e49..00000000 --- a/docs/xml/____init_____8py.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - __init__.py - f110_gym - - - - - -fromgym.envs.registrationimportregister -register( -id='f110-v0', -entry_point='f110_gym.envs:F110Env', -) - - - - diff --git a/docs/xml/base__classes_8py.xml b/docs/xml/base__classes_8py.xml deleted file mode 100644 index 87973cdf..00000000 --- a/docs/xml/base__classes_8py.xml +++ /dev/null @@ -1,510 +0,0 @@ - - - - base_classes.py - f110_gym::envs::base_classes::RaceCar - f110_gym::envs::base_classes::Simulator - f110_gym::envs::base_classes - - - - - -#MITLicense - -#Copyright(c)2020JosephAuckley,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy -#ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal -#intheSoftwarewithoutrestriction,includingwithoutlimitationtherights -#touse,copy,modify,merge,publish,distribute,sublicense,and/orsell -#copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis -#furnishedtodoso,subjecttothefollowingconditions: - -#Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall -#copiesorsubstantialportionsoftheSoftware. - -#THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR -#IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY, -#FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE -#AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER -#LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM, -#OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE -#SOFTWARE. - - - -""" -Prototypeofbaseclasses -ReplacementoftheoldRaceCar,SimulatorclassesinC++ -Author:HongruiZheng -""" - -importnumpyasnp -fromnumbaimportnjit - -fromf110_gym.envs.dynamic_modelsimportvehicle_dynamics_st,pid -fromf110_gym.envs.laser_modelsimportScanSimulator2D,check_ttc_jit,ray_cast -fromf110_gym.envs.collision_modelsimportget_vertices,collision_multiple - -classRaceCar(object): -""" -Baselevelracecarclass,handlesthephysicsandlaserscanofasinglevehicle - -DataMembers: -params(dict):vehicleparametersdictionary -is_ego(bool):egoidentifier -time_step(float):physicstimestep -num_beams(int):numberofbeamsinlaser -fov(float):fieldofviewoflaser -state(np.ndarray(7,)):statevector[x,y,theta,vel,steer_angle,ang_vel,slip_angle] -odom(np.ndarray(13,)):odometryvector[x,y,z,qx,qy,qz,qw,linear_x,linear_y,linear_z,angular_x,angular_y,angular_z] -accel(float):currentaccelerationinput -steer_angle_vel(float):currentsteeringvelocityinput -in_collision(bool):collisionindicator - -""" - -def__init__(self,params,is_ego=False,time_step=0.01,num_beams=1080,fov=4.7): -""" -Initfunction - -Args: -params(dict):vehicleparameterdictionary,includes{'mu','C_Sf','C_Sr','lf','lr','h','m','I','s_min','s_max','sv_min','sv_max','v_switch','a_max':9.51,'v_min','v_max','length','width'} -is_ego(bool,default=False):egoidentifier -time_step(float,default=0.01):physicssimtimestep -num_beams(int,default=1080):numberofbeamsinthelaserscan -fov(float,default=4.7):fieldofviewofthelaser - -Returns: -None -""" - -#initialization -self.params=params -self.is_ego=False -self.time_step=time_step -self.num_beams=1080 -self.fov=4.7 - -#stateis[x,y,steer_angle,vel,yaw_angle,yaw_rate,slip_angle] -self.state=np.zeros((7,)) - -#poseofopponentsintheworld -self.opp_poses=None - -#controlinputs -self.accel=0.0 -self.steer_angle_vel=0.0 - -#steeringdelaybuffer -self.steer_buffer=np.empty((0,)) -self.steer_buffer_size=2 - -#collisionidentifier -self.in_collision=False - -#collisionthresholdforiTTCtoenvironment -self.ttc_thresh=0.005 - -#initializescansim -self.scan_simulator=ScanSimulator2D(num_beams,fov) -scan_ang_incr=self.scan_simulator.get_increment() - -#currentscan -self.current_scan=np.zeros((num_beams,)) - -#anglesofeachscanbeam,distancefromlidartoedgeofcarateachbeam,andprecomputedcosinesofeachangle -self.cosines=np.zeros((num_beams,)) -self.scan_angles=np.zeros((num_beams,)) -self.side_distances=np.zeros((num_beams,)) - -dist_sides=params['width']/2. -dist_fr=(params['lf']+params['lr'])/2. - -foriinrange(num_beams): -angle=-fov/2.+i*scan_ang_incr -self.scan_angles[i]=angle -self.cosines[i]=np.cos(angle) - -ifangle>0: -ifangle<np.pi/2: -#between0andpi/2 -to_side=dist_sides/np.sin(angle) -to_fr=dist_fr/np.cos(angle) -self.side_distances[i]=min(to_side,to_fr) -else: -#betweenpi/2andpi -to_side=dist_sides/np.cos(angle-np.pi/2.) -to_fr=dist_fr/np.sin(angle-np.pi/2.) -self.side_distances[i]=min(to_side,to_fr) -else: -ifangle>-np.pi/2: -#between0and-pi/2 -to_side=dist_sides/np.sin(-angle) -to_fr=dist_fr/np.cos(-angle) -self.side_distances[i]=min(to_side,to_fr) -else: -#between-pi/2and-pi -to_side=dist_sides/np.cos(-angle-np.pi/2) -to_fr=dist_fr/np.sin(-angle-np.pi/2) -self.side_distances[i]=min(to_side,to_fr) - -defupdate_params(self,params): -""" -Updatesthephysicalparametersofthevehicle -Notethatdoesnotneedtobecalledatinitializationofclassanymore - -Args: -params(dict):newparametersforthevehicle - -Returns: -None -""" -self.params=params - -defset_map(self,map_path,map_ext): -""" -Setsthemapforscansimulator - -Args: -map_path(str):absolutepathtothemapyamlfile -map_ext(str):extensionofthemapimagefile -""" -self.scan_simulator.set_map(map_path,map_ext) - -defreset(self,pose): -""" -Resetsthevehicletoapose - -Args: -pose(np.ndarray(3,)):posetoresetthevehicleto - -Returns: -None -""" -#clearcontrolinputs -self.accel=0.0 -self.steer_angle_vel=0.0 -#clearcollisionindicator -self.in_collision=False -#clearstate -self.state=np.zeros((7,)) -self.state[0:2]=pose[0:2] -self.state[4]=pose[2] - -defray_cast_agents(self,scan): -""" -Raycastontootheragentsintheenv,modifyoriginalscan - -Args: -scan(np.ndarray,(n,)):originalscanrangearray - -Returns: -new_scan(np.ndarray,(n,)):modifiedscan -""" - -#startingfromoriginalscan -new_scan=scan - -#loopoverallopponentvehicleposes -foropp_poseinself.opp_poses: -#getverticesofcurrentoppoenent -opp_vertices=get_vertices(opp_pose,self.params['length'],self.params['width']) -new_scan=ray_cast(np.append(self.state[0:2],self.state[4]),new_scan,self.scan_angles,opp_vertices) - -returnnew_scan - -defcheck_ttc(self): -""" -CheckiTTCagainsttheenvironment,setsvehiclestatesaccordinglyifcollisionoccurs. -NotethatthisdoesNOTcheckcollisionwithotheragents. - -stateis[x,y,steer_angle,vel,yaw_angle,yaw_rate,slip_angle] - -Args: -None - -Returns: -None -""" - -in_collision=check_ttc_jit(self.current_scan,self.state[3],self.scan_angles,self.cosines,self.side_distances,self.ttc_thresh) - -#ifincollisionstopvehicle -ifin_collision: -self.state[3:]=0. -self.accel=0.0 -self.steer_angle_vel=0.0 - -#updatestate -self.in_collision=in_collision - -returnin_collision - -defupdate_pose(self,raw_steer,vel): -""" -Stepsthevehicle'sphysicalsimulation - -Args: -steer(float):desiredsteeringangle -vel(float):desiredlongitudinalvelocity - -Returns: -None -""" - -#stateis[x,y,steer_angle,vel,yaw_angle,yaw_rate,slip_angle] - -#steeringdelay -steer=0. -ifself.steer_buffer.shape[0]<self.steer_buffer_size: -steer=0. -self.steer_buffer=np.append(raw_steer,self.steer_buffer) -else: -steer=self.steer_buffer[-1] -self.steer_buffer=self.steer_buffer[:-1] -self.steer_buffer=np.append(raw_steer,self.steer_buffer) - - -#steeringanglevelocityinputtosteeringvelocityaccelerationinput -accl,sv=pid(vel,steer,self.state[3],self.state[2],self.params['sv_max'],self.params['a_max'],self.params['v_max'],self.params['v_min']) - -#updatephysics,getRHSofdiff'eq -f=vehicle_dynamics_st( -self.state, -np.array([sv,accl]), -self.params['mu'], -self.params['C_Sf'], -self.params['C_Sr'], -self.params['lf'], -self.params['lr'], -self.params['h'], -self.params['m'], -self.params['I'], -self.params['s_min'], -self.params['s_max'], -self.params['sv_min'], -self.params['sv_max'], -self.params['v_switch'], -self.params['a_max'], -self.params['v_min'], -self.params['v_max']) - -#updatestate -self.state=self.state+f*self.time_step - -#updatescan -self.current_scan=self.scan_simulator.scan(np.append(self.state[0:2],self.state[4])) - -defupdate_opp_poses(self,opp_poses): -""" -Updatesthevehicle'sinformationonothervehicles - -Args: -opp_poses(np.ndarray(num_other_agents,3)):updatedposesofotheragents - -Returns: -None -""" -self.opp_poses=opp_poses - - -defupdate_scan(self): -""" -Stepsthevehicle'slaserscansimulation -Separatedfromupdate_posebecauseneedstoupdatescanbasedonNEWposesofagentsintheenvironment - -Args: -None - -Returns: -None -""" - -#checkttc -self.check_ttc() - -#raycastotheragentstomodifyscan -self.current_scan=self.ray_cast_agents(self.current_scan) - - - -classSimulator(object): -""" -Simulatorclass,handlestheinteractionandupdateofallvehiclesintheenvironment - -DataMembers: -num_agents(int):numberofagentsintheenvironment -time_step(float):physicstimestep -agent_poses(np.ndarray(num_agents,3)):allposesofallagents -agents(list[RaceCar]):containerforRaceCarobjects -collisions(np.ndarray(num_agents,)):arrayofcollisionindicatorforeachagent -collision_idx(np.ndarray(num_agents,)):whichagentiseachagentincollisionwith - -""" - -def__init__(self,params,num_agents,time_step=0.01,ego_idx=0): -""" -Initfunction - -Args: -params(dict):vehicleparameterdictionary,includes{'mu','C_Sf','C_Sr','lf','lr','h','m','I','s_min','s_max','sv_min','sv_max','v_switch','a_max','v_min','v_max','length','width'} -num_agents(int):numberofagentsintheenvironment -time_step(float,default=0.01):physicstimestep -ego_idx(int,default=0):egovehicle'sindexinlistofagents - -Returns: -None -""" -self.num_agents=num_agents -self.time_step=time_step -self.ego_idx=ego_idx -self.params=params -self.agent_poses=np.empty((self.num_agents,3)) -self.agents=[] -self.collisions=np.zeros((self.num_agents,)) -self.collision_idx=-1*np.ones((self.num_agents,)) - -#initializingagents -foriinrange(self.num_agents): -ifi==ego_idx: -ego_car=RaceCar(params,is_ego=True) -self.agents.append(ego_car) -else: -agent=RaceCar(params) -self.agents.append(agent) - -defset_map(self,map_path,map_ext): -""" -Setsthemapoftheenvironmentandsetsthemapforscansimulatorofeachagent - -Args: -map_path(str):pathtothemapyamlfile -map_ext(str):extensionforthemapimagefile - -Returns: -None -""" -foragentinself.agents: -agent.set_map(map_path,map_ext) - - -defupdate_params(self,params,agent_idx=-1): -""" -Updatestheparamsofagents,ifanindexofanagentisgiven,updateonlythatagent'sparams - -Args: -params(dict):dictionaryofparams,seedetailsindocstringof__init__ -agent_idx(int,default=-1):indexforagentthatneedsparamupdate,ifnegative,updateallagents - -Returns: -None -""" -ifagent_idx<0: -#updateparamsforall -foragentinself.agents: -agent.update_params(params) -elifagent_idx>=0andagent_idx<self.num_agents: -#onlyupdateoneagent'sparams -self.agents[agent_idx].update_params(params) -else: -#indexoutofbounds,throwerror -raiseIndexError('Indexgivenisoutofboundsforlistofagents.') - -defcheck_collision(self): -""" -ChecksforcollisionbetweenagentsusingGJKandagents'bodyvertices - -Args: -None - -Returns: -None -""" -#getverticesofallagents -all_vertices=np.empty((self.num_agents,4,2)) -foriinrange(self.num_agents): -all_vertices[i,:,:]=get_vertices(np.append(self.agents[i].state[0:2],self.agents[i].state[4]),self.params['length'],self.params['width']) -self.collisions,self.collision_idx=collision_multiple(all_vertices) - - -defstep(self,control_inputs): -""" -Stepsthesimulationenvironment - -Args: -control_inputs(np.ndarray(num_agents,2)):controlinputsofallagents,firstcolumnisdesiredsteeringangle,secondcolumnisdesiredvelocity - -Returns: -observations(dict):dictionaryforobservations:posesofagents,currentlaserscanofeachagent,collisionindicators,etc. -""" - -#loopingoveragents -fori,agentinenumerate(self.agents): -#updateeachagent'spose -agent.update_pose(control_inputs[i,0],control_inputs[i,1]) - -#updatesim'sinformationofagentposes -self.agent_poses[i,:]=np.append(agent.state[0:2],agent.state[4]) - -#checkcollisionsbetweenallagents -self.check_collision() - - -fori,agentinenumerate(self.agents): -#updateagent'sinformationonotheragents -opp_poses=np.concatenate((self.agent_poses[0:i,:],self.agent_poses[i+1:,:]),axis=0) -agent.update_opp_poses(opp_poses) - -#updateeachagent'scurrentscanbasedonotheragents -agent.update_scan() - -#updateagentcollisionwithenvironment -ifagent.in_collision: -self.collisions[i]=1. - -#fillinobservations -#stateis[x,y,steer_angle,vel,yaw_angle,yaw_rate,slip_angle] -#collision_anglesisremovedfromobservations -observations={'ego_idx':self.ego_idx, -'scans':[], -'poses_x':[], -'poses_y':[], -'poses_theta':[], -'linear_vels_x':[], -'linear_vels_y':[], -'ang_vels_z':[], -'collisions':self.collisions} -foragentinself.agents: -observations['scans'].append(agent.current_scan) -observations['poses_x'].append(agent.state[0]) -observations['poses_y'].append(agent.state[1]) -observations['poses_theta'].append(agent.state[4]) -observations['linear_vels_x'].append(agent.state[3]) -observations['linear_vels_y'].append(0.) -observations['ang_vels_z'].append(agent.state[5]) - -returnobservations - -defreset(self,poses): -""" -Resetsthesimulationenvironmentbygivenposes - -Arges: -poses(np.ndarray(num_agents,3)):posestoresetagentsto - -Returns: -None -""" - -ifposes.shape[0]!=self.num_agents: -raiseValueError('Numberofposesforresetdoesnotmatchnumberofagents.') - -#loopoverposestoreset -foriinrange(self.num_agents): -self.agents[i].reset(poses[i,:]) - - - - diff --git a/docs/xml/classf110__gym_1_1envs_1_1base__classes_1_1_race_car.xml b/docs/xml/classf110__gym_1_1envs_1_1base__classes_1_1_race_car.xml deleted file mode 100644 index 905e3309..00000000 --- a/docs/xml/classf110__gym_1_1envs_1_1base__classes_1_1_race_car.xml +++ /dev/null @@ -1,603 +0,0 @@ - - - - f110_gym::envs::base_classes::RaceCar - object - - - - f110_gym.envs.base_classes.RaceCar::params - - params - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::is_ego - - is_ego - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::time_step - - time_step - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::num_beams - - num_beams - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::fov - - fov - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::state - - state - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::opp_poses - - opp_poses - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::accel - - accel - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::steer_angle_vel - - steer_angle_vel - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::steer_buffer - - steer_buffer - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::steer_buffer_size - - steer_buffer_size - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::in_collision - - in_collision - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::ttc_thresh - - ttc_thresh - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::scan_simulator - - scan_simulator - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::current_scan - - current_scan - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::cosines - - cosines - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::scan_angles - - scan_angles - - - - - - - - - - - f110_gym.envs.base_classes.RaceCar::side_distances - - side_distances - - - - - - - - - - - - def - def f110_gym.envs.base_classes.RaceCar.__init__ - (self, params, is_ego=False, time_step=0.01, num_beams=1080, fov=4.7) - __init__ - - self - self - - - params - params - - - is_ego - is_ego - False - - - time_step - time_step - 0.01 - - - num_beams - num_beams - 1080 - - - fov - fov - 4.7 - - - - -Init function - -Args: - params (dict): vehicle parameter dictionary, includes {'mu', 'C_Sf', 'C_Sr', 'lf', 'lr', 'h', 'm', 'I', 's_min', 's_max', 'sv_min', 'sv_max', 'v_switch', 'a_max': 9.51, 'v_min', 'v_max', 'length', 'width'} - is_ego (bool, default=False): ego identifier - time_step (float, default=0.01): physics sim time step - num_beams (int, default=1080): number of beams in the laser scan - fov (float, default=4.7): field of view of the laser - -Returns: - None - - - - - - - - def - def f110_gym.envs.base_classes.RaceCar.update_params - (self, params) - update_params - - self - self - - - params - params - - - - -Updates the physical parameters of the vehicle -Note that does not need to be called at initialization of class anymore - -Args: - params (dict): new parameters for the vehicle - -Returns: - None - - - - - - - - def - def f110_gym.envs.base_classes.RaceCar.set_map - (self, map_path, map_ext) - set_map - - self - self - - - map_path - map_path - - - map_ext - map_ext - - - - -Sets the map for scan simulator - -Args: - map_path (str): absolute path to the map yaml file - map_ext (str): extension of the map image file - - - - - - - - def - def f110_gym.envs.base_classes.RaceCar.reset - (self, pose) - reset - - self - self - - - pose - pose - - - - -Resets the vehicle to a pose - -Args: - pose (np.ndarray (3, )): pose to reset the vehicle to - -Returns: - None - - - - - - - - def - def f110_gym.envs.base_classes.RaceCar.ray_cast_agents - (self, scan) - ray_cast_agents - - self - self - - - scan - scan - - - - -Ray cast onto other agents in the env, modify original scan - -Args: - scan (np.ndarray, (n, )): original scan range array - -Returns: - new_scan (np.ndarray, (n, )): modified scan - - - - - - - - def - def f110_gym.envs.base_classes.RaceCar.check_ttc - (self) - check_ttc - - self - self - - - - -Check iTTC against the environment, sets vehicle states accordingly if collision occurs. -Note that this does NOT check collision with other agents. - -state is [x, y, steer_angle, vel, yaw_angle, yaw_rate, slip_angle] - -Args: - None - -Returns: - None - - - - - - - - def - def f110_gym.envs.base_classes.RaceCar.update_pose - (self, raw_steer, vel) - update_pose - - self - self - - - raw_steer - raw_steer - - - vel - vel - - - - -Steps the vehicle's physical simulation - -Args: - steer (float): desired steering angle - vel (float): desired longitudinal velocity - -Returns: - None - - - - - - - - def - def f110_gym.envs.base_classes.RaceCar.update_opp_poses - (self, opp_poses) - update_opp_poses - - self - self - - - opp_poses - opp_poses - - - - -Updates the vehicle's information on other vehicles - -Args: - opp_poses (np.ndarray(num_other_agents, 3)): updated poses of other agents - -Returns: - None - - - - - - - - def - def f110_gym.envs.base_classes.RaceCar.update_scan - (self) - update_scan - - self - self - - - - -Steps the vehicle's laser scan simulation -Separated from update_pose because needs to update scan based on NEW poses of agents in the environment - -Args: - None - -Returns: - None - - - - - - - - - - -Base level race car class, handles the physics and laser scan of a single vehicle - -Data Members: - params (dict): vehicle parameters dictionary - is_ego (bool): ego identifier - time_step (float): physics timestep - num_beams (int): number of beams in laser - fov (float): field of view of laser - state (np.ndarray (7, )): state vector [x, y, theta, vel, steer_angle, ang_vel, slip_angle] - odom (np.ndarray(13, )): odometry vector [x, y, z, qx, qy, qz, qw, linear_x, linear_y, linear_z, angular_x, angular_y, angular_z] - accel (float): current acceleration input - steer_angle_vel (float): current steering velocity input - in_collision (bool): collision indicator - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::envs::base_classes::RaceCar__init__ - f110_gym::envs::base_classes::RaceCaraccel - f110_gym::envs::base_classes::RaceCarcheck_ttc - f110_gym::envs::base_classes::RaceCarcosines - f110_gym::envs::base_classes::RaceCarcurrent_scan - f110_gym::envs::base_classes::RaceCarfov - f110_gym::envs::base_classes::RaceCarin_collision - f110_gym::envs::base_classes::RaceCaris_ego - f110_gym::envs::base_classes::RaceCarnum_beams - f110_gym::envs::base_classes::RaceCaropp_poses - f110_gym::envs::base_classes::RaceCarparams - f110_gym::envs::base_classes::RaceCarray_cast_agents - f110_gym::envs::base_classes::RaceCarreset - f110_gym::envs::base_classes::RaceCarscan_angles - f110_gym::envs::base_classes::RaceCarscan_simulator - f110_gym::envs::base_classes::RaceCarset_map - f110_gym::envs::base_classes::RaceCarside_distances - f110_gym::envs::base_classes::RaceCarstate - f110_gym::envs::base_classes::RaceCarsteer_angle_vel - f110_gym::envs::base_classes::RaceCarsteer_buffer - f110_gym::envs::base_classes::RaceCarsteer_buffer_size - f110_gym::envs::base_classes::RaceCartime_step - f110_gym::envs::base_classes::RaceCarttc_thresh - f110_gym::envs::base_classes::RaceCarupdate_opp_poses - f110_gym::envs::base_classes::RaceCarupdate_params - f110_gym::envs::base_classes::RaceCarupdate_pose - f110_gym::envs::base_classes::RaceCarupdate_scan - - - diff --git a/docs/xml/classf110__gym_1_1envs_1_1base__classes_1_1_simulator.xml b/docs/xml/classf110__gym_1_1envs_1_1base__classes_1_1_simulator.xml deleted file mode 100644 index 89325519..00000000 --- a/docs/xml/classf110__gym_1_1envs_1_1base__classes_1_1_simulator.xml +++ /dev/null @@ -1,365 +0,0 @@ - - - - f110_gym::envs::base_classes::Simulator - object - - - - f110_gym.envs.base_classes.Simulator::num_agents - - num_agents - - - - - - - - - - - f110_gym.envs.base_classes.Simulator::time_step - - time_step - - - - - - - - - - - f110_gym.envs.base_classes.Simulator::ego_idx - - ego_idx - - - - - - - - - - - f110_gym.envs.base_classes.Simulator::params - - params - - - - - - - - - - - f110_gym.envs.base_classes.Simulator::agent_poses - - agent_poses - - - - - - - - - - - f110_gym.envs.base_classes.Simulator::agents - - agents - - - - - - - - - - - f110_gym.envs.base_classes.Simulator::collisions - - collisions - - - - - - - - - - - f110_gym.envs.base_classes.Simulator::collision_idx - - collision_idx - - - - - - - - - - - - def - def f110_gym.envs.base_classes.Simulator.__init__ - (self, params, num_agents, time_step=0.01, ego_idx=0) - __init__ - - self - self - - - params - params - - - num_agents - num_agents - - - time_step - time_step - 0.01 - - - ego_idx - ego_idx - 0 - - - - -Init function - -Args: - params (dict): vehicle parameter dictionary, includes {'mu', 'C_Sf', 'C_Sr', 'lf', 'lr', 'h', 'm', 'I', 's_min', 's_max', 'sv_min', 'sv_max', 'v_switch', 'a_max', 'v_min', 'v_max', 'length', 'width'} - num_agents (int): number of agents in the environment - time_step (float, default=0.01): physics time step - ego_idx (int, default=0): ego vehicle's index in list of agents - -Returns: - None - - - - - - - - def - def f110_gym.envs.base_classes.Simulator.set_map - (self, map_path, map_ext) - set_map - - self - self - - - map_path - map_path - - - map_ext - map_ext - - - - -Sets the map of the environment and sets the map for scan simulator of each agent - -Args: - map_path (str): path to the map yaml file - map_ext (str): extension for the map image file - -Returns: - None - - - - - - - - def - def f110_gym.envs.base_classes.Simulator.update_params - (self, params, agent_idx=-1) - update_params - - self - self - - - params - params - - - agent_idx - agent_idx - -1 - - - - -Updates the params of agents, if an index of an agent is given, update only that agent's params - -Args: - params (dict): dictionary of params, see details in docstring of __init__ - agent_idx (int, default=-1): index for agent that needs param update, if negative, update all agents - -Returns: - None - - - - - - - - def - def f110_gym.envs.base_classes.Simulator.check_collision - (self) - check_collision - - self - self - - - - -Checks for collision between agents using GJK and agents' body vertices - -Args: - None - -Returns: - None - - - - - - - - def - def f110_gym.envs.base_classes.Simulator.step - (self, control_inputs) - step - - self - self - - - control_inputs - control_inputs - - - - -Steps the simulation environment - -Args: - control_inputs (np.ndarray (num_agents, 2)): control inputs of all agents, first column is desired steering angle, second column is desired velocity - -Returns: - observations (dict): dictionary for observations: poses of agents, current laser scan of each agent, collision indicators, etc. - - - - - - - - def - def f110_gym.envs.base_classes.Simulator.reset - (self, poses) - reset - - self - self - - - poses - poses - - - - -Resets the simulation environment by given poses - -Arges: - poses (np.ndarray (num_agents, 3)): poses to reset agents to - -Returns: - None - - - - - - - - - - -Simulator class, handles the interaction and update of all vehicles in the environment - -Data Members: - num_agents (int): number of agents in the environment - time_step (float): physics time step - agent_poses (np.ndarray(num_agents, 3)): all poses of all agents - agents (list[RaceCar]): container for RaceCar objects - collisions (np.ndarray(num_agents, )): array of collision indicator for each agent - collision_idx (np.ndarray(num_agents, )): which agent is each agent in collision with - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::envs::base_classes::Simulator__init__ - f110_gym::envs::base_classes::Simulatoragent_poses - f110_gym::envs::base_classes::Simulatoragents - f110_gym::envs::base_classes::Simulatorcheck_collision - f110_gym::envs::base_classes::Simulatorcollision_idx - f110_gym::envs::base_classes::Simulatorcollisions - f110_gym::envs::base_classes::Simulatorego_idx - f110_gym::envs::base_classes::Simulatornum_agents - f110_gym::envs::base_classes::Simulatorparams - f110_gym::envs::base_classes::Simulatorreset - f110_gym::envs::base_classes::Simulatorset_map - f110_gym::envs::base_classes::Simulatorstep - f110_gym::envs::base_classes::Simulatortime_step - f110_gym::envs::base_classes::Simulatorupdate_params - - - diff --git a/docs/xml/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.xml b/docs/xml/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.xml deleted file mode 100644 index e34072f7..00000000 --- a/docs/xml/classf110__gym_1_1envs_1_1collision__models_1_1_collision_tests.xml +++ /dev/null @@ -1,190 +0,0 @@ - - - - f110_gym::envs::collision_models::CollisionTests - TestCase - - - - f110_gym.envs.collision_models.CollisionTests::vertices1 - - vertices1 - - - - - - - - - - - f110_gym.envs.collision_models.CollisionTests::length - - length - - - - - - - - - - - f110_gym.envs.collision_models.CollisionTests::width - - width - - - - - - - - - - - - def - def f110_gym.envs.collision_models.CollisionTests.setUp - (self) - setUp - - self - self - - - - - - - - - - - def - def f110_gym.envs.collision_models.CollisionTests.test_get_vert - (self) - test_get_vert - - self - self - - - - - - - - - - - def - def f110_gym.envs.collision_models.CollisionTests.test_get_vert_fps - (self) - test_get_vert_fps - - self - self - - - - - - - - - - - def - def f110_gym.envs.collision_models.CollisionTests.test_random_collision - (self) - test_random_collision - - self - self - - - - - - - - - - - def - def f110_gym.envs.collision_models.CollisionTests.test_multiple_collisions - (self) - test_multiple_collisions - - self - self - - - - - - - - - - - def - def f110_gym.envs.collision_models.CollisionTests.test_fps - (self) - test_fps - - self - self - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::envs::collision_models::CollisionTestslength - f110_gym::envs::collision_models::CollisionTestssetUp - f110_gym::envs::collision_models::CollisionTeststest_fps - f110_gym::envs::collision_models::CollisionTeststest_get_vert - f110_gym::envs::collision_models::CollisionTeststest_get_vert_fps - f110_gym::envs::collision_models::CollisionTeststest_multiple_collisions - f110_gym::envs::collision_models::CollisionTeststest_random_collision - f110_gym::envs::collision_models::CollisionTestsvertices1 - f110_gym::envs::collision_models::CollisionTestswidth - - - diff --git a/docs/xml/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.xml b/docs/xml/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.xml deleted file mode 100644 index 5487daf6..00000000 --- a/docs/xml/classf110__gym_1_1envs_1_1dynamic__models_1_1_dynamics_test.xml +++ /dev/null @@ -1,372 +0,0 @@ - - - - f110_gym::envs::dynamic_models::DynamicsTest - TestCase - - - - f110_gym.envs.dynamic_models.DynamicsTest::mu - - mu - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::C_Sf - - C_Sf - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::C_Sr - - C_Sr - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::lf - - lf - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::lr - - lr - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::h - - h - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::m - - m - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::I - - I - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::s_min - - s_min - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::s_max - - s_max - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::sv_min - - sv_min - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::sv_max - - sv_max - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::v_min - - v_min - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::v_max - - v_max - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::v_switch - - v_switch - - - - - - - - - - - f110_gym.envs.dynamic_models.DynamicsTest::a_max - - a_max - - - - - - - - - - - - def - def f110_gym.envs.dynamic_models.DynamicsTest.setUp - (self) - setUp - - self - self - - - - - - - - - - - def - def f110_gym.envs.dynamic_models.DynamicsTest.test_derivatives - (self) - test_derivatives - - self - self - - - - - - - - - - - def - def f110_gym.envs.dynamic_models.DynamicsTest.test_zeroinit_roll - (self) - test_zeroinit_roll - - self - self - - - - - - - - - - - def - def f110_gym.envs.dynamic_models.DynamicsTest.test_zeroinit_dec - (self) - test_zeroinit_dec - - self - self - - - - - - - - - - - def - def f110_gym.envs.dynamic_models.DynamicsTest.test_zeroinit_acc - (self) - test_zeroinit_acc - - self - self - - - - - - - - - - - def - def f110_gym.envs.dynamic_models.DynamicsTest.test_zeroinit_rollleft - (self) - test_zeroinit_rollleft - - self - self - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::envs::dynamic_models::DynamicsTesta_max - f110_gym::envs::dynamic_models::DynamicsTestC_Sf - f110_gym::envs::dynamic_models::DynamicsTestC_Sr - f110_gym::envs::dynamic_models::DynamicsTesth - f110_gym::envs::dynamic_models::DynamicsTestI - f110_gym::envs::dynamic_models::DynamicsTestlf - f110_gym::envs::dynamic_models::DynamicsTestlr - f110_gym::envs::dynamic_models::DynamicsTestm - f110_gym::envs::dynamic_models::DynamicsTestmu - f110_gym::envs::dynamic_models::DynamicsTests_max - f110_gym::envs::dynamic_models::DynamicsTests_min - f110_gym::envs::dynamic_models::DynamicsTestsetUp - f110_gym::envs::dynamic_models::DynamicsTestsv_max - f110_gym::envs::dynamic_models::DynamicsTestsv_min - f110_gym::envs::dynamic_models::DynamicsTesttest_derivatives - f110_gym::envs::dynamic_models::DynamicsTesttest_zeroinit_acc - f110_gym::envs::dynamic_models::DynamicsTesttest_zeroinit_dec - f110_gym::envs::dynamic_models::DynamicsTesttest_zeroinit_roll - f110_gym::envs::dynamic_models::DynamicsTesttest_zeroinit_rollleft - f110_gym::envs::dynamic_models::DynamicsTestv_max - f110_gym::envs::dynamic_models::DynamicsTestv_min - f110_gym::envs::dynamic_models::DynamicsTestv_switch - - - diff --git a/docs/xml/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.xml b/docs/xml/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.xml deleted file mode 100644 index 2f611488..00000000 --- a/docs/xml/classf110__gym_1_1envs_1_1f110__env_1_1_f110_env.xml +++ /dev/null @@ -1,741 +0,0 @@ - - - - f110_gym::envs::f110_env::F110Env - Env - EzPickle - - - dictionary - dictionary f110_gym.envs.f110_env.F110Env::metadata - - metadata - = {'render.modes': ['human', 'human_fast']} - - - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::map_name - - map_name - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::map_path - - map_path - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::map_ext - - map_ext - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::params - - params - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::num_agents - - num_agents - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::timestep - - timestep - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::ego_idx - - ego_idx - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::start_thresh - - start_thresh - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::poses_x - - poses_x - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::poses_y - - poses_y - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::poses_theta - - poses_theta - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::collisions - - collisions - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::near_start - - near_start - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::num_toggles - - num_toggles - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::lap_times - - lap_times - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::lap_counts - - lap_counts - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::current_time - - current_time - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::near_starts - - near_starts - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::toggle_list - - toggle_list - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::start_xs - - start_xs - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::start_ys - - start_ys - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::start_thetas - - start_thetas - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::start_rot - - start_rot - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::sim - - sim - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::renderer - - renderer - - - - - - - - - - - f110_gym.envs.f110_env.F110Env::current_obs - - current_obs - - - - - - - - - - - - def - def f110_gym.envs.f110_env.F110Env.__init__ - (self, **kwargs) - __init__ - - self - self - - - ** - kwargs - - - - - - - - - - - def - def f110_gym.envs.f110_env.F110Env.__del__ - (self) - __del__ - - self - self - - - - -Finalizer, does cleanup - - - - - - - - def - def f110_gym.envs.f110_env.F110Env.step - (self, action) - step - - self - self - - - action - action - - - - -Step function for the gym env - -Args: - action (np.ndarray(num_agents, 2)) - -Returns: - obs (dict): observation of the current step - reward (float, default=self.timestep): step reward, currently is physics timestep - done (bool): if the simulation is done - info (dict): auxillary information dictionary - - - - - - - - def - def f110_gym.envs.f110_env.F110Env.reset - (self, poses) - reset - - self - self - - - poses - poses - - - - -Reset the gym environment by given poses - -Args: - poses (np.ndarray (num_agents, 3)): poses to reset agents to - -Returns: - obs (dict): observation of the current step - reward (float, default=self.timestep): step reward, currently is physics timestep - done (bool): if the simulation is done - info (dict): auxillary information dictionary - - - - - - - - def - def f110_gym.envs.f110_env.F110Env.update_map - (self, map_path, map_ext) - update_map - - self - self - - - map_path - map_path - - - map_ext - map_ext - - - - -Updates the map used by simulation - -Args: - map_path (str): absolute path to the map yaml file - map_ext (str): extension of the map image file - -Returns: - None - - - - - - - - def - def f110_gym.envs.f110_env.F110Env.update_params - (self, params, index=-1) - update_params - - self - self - - - params - params - - - index - index - -1 - - - - -Updates the parameters used by simulation for vehicles - -Args: - params (dict): dictionary of parameters - index (int, default=-1): if >= 0 then only update a specific agent's params - -Returns: - None - - - - - - - - def - def f110_gym.envs.f110_env.F110Env.render - (self, mode='human') - render - - self - self - - - mode - mode - 'human' - - - - -Renders the environment with pyglet. Use mouse scroll in the window to zoom in/out, use mouse click drag to pan. Shows the agents, the map, current fps (bottom left corner), and the race information near as text. - -Args: - mode (str, default='human'): rendering mode, currently supports: -'human': slowed down rendering such that the env is rendered in a way that sim time elapsed is close to real time elapsed -'human_fast': render as fast as possible - -Returns: - None - - - - - - - - - - def - def f110_gym.envs.f110_env.F110Env._check_done - (self) - _check_done - - self - self - - - - -Check if the current rollout is done - -Args: - None - -Returns: - done (bool): whether the rollout is done - toggle_list (list[int]): each agent's toggle list for crossing the finish zone - - - - - - - - def - def f110_gym.envs.f110_env.F110Env._update_state - (self, obs_dict) - _update_state - - self - self - - - obs_dict - obs_dict - - - - -Update the env's states according to observations - -Args: - obs_dict (dict): dictionary of observation - -Returns: - None - - - - - - - - - - -OpenAI gym environment for F1TENTH - -Env should be initialized by calling gym.make('f110_gym:f110-v0', **kwargs) - -Args: - kwargs: - seed (int): seed for random state and reproducibility - - map (str, default='vegas'): name of the map used for the environment. Currently, available environments include: 'berlin', 'vegas', 'skirk'. You could use a string of the absolute path to the yaml file of your custom map. - - map_ext (str, default='png'): image extension of the map image file. For example 'png', 'pgm' - - params (dict, default={'mu': 1.0489, 'C_Sf':, 'C_Sr':, 'lf': 0.15875, 'lr': 0.17145, 'h': 0.074, 'm': 3.74, 'I': 0.04712, 's_min': -0.4189, 's_max': 0.4189, 'sv_min': -3.2, 'sv_max': 3.2, 'v_switch':7.319, 'a_max': 9.51, 'v_min':-5.0, 'v_max': 20.0, 'width': 0.31, 'length': 0.58}): dictionary of vehicle parameters. - mu: surface friction coefficient - C_Sf: Cornering stiffness coefficient, front - C_Sr: Cornering stiffness coefficient, rear - lf: Distance from center of gravity to front axle - lr: Distance from center of gravity to rear axle - h: Height of center of gravity - m: Total mass of the vehicle - I: Moment of inertial of the entire vehicle about the z axis - s_min: Minimum steering angle constraint - s_max: Maximum steering angle constraint - sv_min: Minimum steering velocity constraint - sv_max: Maximum steering velocity constraint - v_switch: Switching velocity (velocity at which the acceleration is no longer able to create wheel spin) - a_max: Maximum longitudinal acceleration - v_min: Minimum longitudinal velocity - v_max: Maximum longitudinal velocity - width: width of the vehicle in meters - length: length of the vehicle in meters - - num_agents (int, default=2): number of agents in the environment - - timestep (float, default=0.01): physics timestep - - ego_idx (int, default=0): ego's index in list of agents - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::envs::f110_env::F110Env__del__ - f110_gym::envs::f110_env::F110Env__init__ - f110_gym::envs::f110_env::F110Env_check_done - f110_gym::envs::f110_env::F110Env_update_state - f110_gym::envs::f110_env::F110Envcollisions - f110_gym::envs::f110_env::F110Envcurrent_obs - f110_gym::envs::f110_env::F110Envcurrent_time - f110_gym::envs::f110_env::F110Envego_idx - f110_gym::envs::f110_env::F110Envlap_counts - f110_gym::envs::f110_env::F110Envlap_times - f110_gym::envs::f110_env::F110Envmap_ext - f110_gym::envs::f110_env::F110Envmap_name - f110_gym::envs::f110_env::F110Envmap_path - f110_gym::envs::f110_env::F110Envmetadata - f110_gym::envs::f110_env::F110Envnear_start - f110_gym::envs::f110_env::F110Envnear_starts - f110_gym::envs::f110_env::F110Envnum_agents - f110_gym::envs::f110_env::F110Envnum_toggles - f110_gym::envs::f110_env::F110Envparams - f110_gym::envs::f110_env::F110Envposes_theta - f110_gym::envs::f110_env::F110Envposes_x - f110_gym::envs::f110_env::F110Envposes_y - f110_gym::envs::f110_env::F110Envrender - f110_gym::envs::f110_env::F110Envrenderer - f110_gym::envs::f110_env::F110Envreset - f110_gym::envs::f110_env::F110Envsim - f110_gym::envs::f110_env::F110Envstart_rot - f110_gym::envs::f110_env::F110Envstart_thetas - f110_gym::envs::f110_env::F110Envstart_thresh - f110_gym::envs::f110_env::F110Envstart_xs - f110_gym::envs::f110_env::F110Envstart_ys - f110_gym::envs::f110_env::F110Envstep - f110_gym::envs::f110_env::F110Envtimestep - f110_gym::envs::f110_env::F110Envtoggle_list - f110_gym::envs::f110_env::F110Envupdate_map - f110_gym::envs::f110_env::F110Envupdate_params - - - diff --git a/docs/xml/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.xml b/docs/xml/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.xml deleted file mode 100644 index 325121f7..00000000 --- a/docs/xml/classf110__gym_1_1envs_1_1f110__env__backup_1_1_f110_env.xml +++ /dev/null @@ -1,1003 +0,0 @@ - - - - f110_gym::envs::f110_env_backup::F110Env - Env - EzPickle - - - dictionary - dictionary f110_gym.envs.f110_env_backup.F110Env::metadata - - metadata - = {'render.modes': []} - - - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::params_set - - params_set - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::map_inited - - map_inited - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::params - - params - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::num_agents - - num_agents - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::timestep - - timestep - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::map_path - - map_path - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::map_img - - map_img - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::ego_idx - - ego_idx - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::timeout - - timeout - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::start_thresh - - start_thresh - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::x - - x - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::y - - y - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::theta - - theta - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::in_collision - - in_collision - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::collision_angle - - collision_angle - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::near_start - - near_start - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::num_toggles - - num_toggles - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::lap_times - - lap_times - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::lap_counts - - lap_counts - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::map_height - - map_height - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::map_width - - map_width - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::map_resolution - - map_resolution - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::free_thresh - - free_thresh - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::origin - - origin - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::port - - port - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::context - - context - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::socket - - socket - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::sim_p - - sim_p - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::all_x - - all_x - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::all_y - - all_y - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::current_time - - current_time - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::collision_angles - - collision_angles - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::near_starts - - near_starts - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::toggle_list - - toggle_list - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::start_x - - start_x - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::start_y - - start_y - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::start_theta - - start_theta - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::start_xs - - start_xs - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::start_ys - - start_ys - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::start_thetas - - start_thetas - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::start_rot - - start_rot - - - - - - - - - - - f110_gym.envs.f110_env_backup.F110Env::double_finish - - double_finish - - - - - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env.__init__ - (self) - __init__ - - self - self - - - - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env.__del__ - (self) - __del__ - - self - self - - - - -Finalizer, does cleanup - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env.step - (self, action) - step - - self - self - - - action - action - - - - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env.reset - (self, poses=None) - reset - - self - self - - - poses - poses - None - - - - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env.init_map - (self, map_path, img_ext, rgb, flip) - init_map - - self - self - - - map_path - map_path - - - img_ext - img_ext - - - rgb - rgb - - - flip - flip - - - - - init a map for the gym env - map_path: full path for the yaml, same as ROS, img and yaml in same dir - rgb: map grayscale or rgb - flip: if map needs flipping - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env.render - (self, mode='human', close=False) - render - - self - self - - - mode - mode - 'human' - - - close - close - False - - - - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env.update_params - (self, mu, h_cg, l_r, cs_f, cs_r, I_z, mass, exe_path, double_finish=False) - update_params - - self - self - - - mu - mu - - - h_cg - h_cg - - - l_r - l_r - - - cs_f - cs_f - - - cs_r - cs_r - - - I_z - I_z - - - mass - mass - - - exe_path - exe_path - - - double_finish - double_finish - False - - - - - - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env._start_executable - (self, path) - _start_executable - - self - self - - - path - path - - - - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env._set_map - (self) - _set_map - - self - self - - - - -Sets the map for the simulator instance - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env._check_done - (self) - _check_done - - self - self - - - - -Check if the episode is done -This is in terms of the ego car -For our case, whether the car ends up close enough to the starting point -And if accumulated time is over the timeout -return true if done, false if not -This assumes start is always (0, 0) - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env._check_passed - (self) - _check_passed - - self - self - - - - -Returns the times that the ego car overtook the other car - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env._update_state - (self, obs_dict) - _update_state - - self - self - - - obs_dict - obs_dict - - - - -Update the env's states according to observations -obs is observation dictionary - - - - - - - - def - def f110_gym.envs.f110_env_backup.F110Env._raycast_opponents - (self, obs_dict) - _raycast_opponents - - self - self - - - obs_dict - obs_dict - - - - - - - - - - - - - -OpenAI gym environment for F1/10 simulator -Use 0mq's REQ-REP pattern to communicate to the C++ simulator -ONE env has ONE corresponding C++ instance -Need to create env with map input, full path to map yaml file, map pgm image and yaml should be in same directory - -should be initialized with a map, a timestep, and number of agents - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::envs::f110_env_backup::F110Env__del__ - f110_gym::envs::f110_env_backup::F110Env__init__ - f110_gym::envs::f110_env_backup::F110Env_check_done - f110_gym::envs::f110_env_backup::F110Env_check_passed - f110_gym::envs::f110_env_backup::F110Env_raycast_opponents - f110_gym::envs::f110_env_backup::F110Env_set_map - f110_gym::envs::f110_env_backup::F110Env_start_executable - f110_gym::envs::f110_env_backup::F110Env_update_state - f110_gym::envs::f110_env_backup::F110Envall_x - f110_gym::envs::f110_env_backup::F110Envall_y - f110_gym::envs::f110_env_backup::F110Envcollision_angle - f110_gym::envs::f110_env_backup::F110Envcollision_angles - f110_gym::envs::f110_env_backup::F110Envcontext - f110_gym::envs::f110_env_backup::F110Envcurrent_time - f110_gym::envs::f110_env_backup::F110Envdouble_finish - f110_gym::envs::f110_env_backup::F110Envego_idx - f110_gym::envs::f110_env_backup::F110Envfree_thresh - f110_gym::envs::f110_env_backup::F110Envin_collision - f110_gym::envs::f110_env_backup::F110Envinit_map - f110_gym::envs::f110_env_backup::F110Envlap_counts - f110_gym::envs::f110_env_backup::F110Envlap_times - f110_gym::envs::f110_env_backup::F110Envmap_height - f110_gym::envs::f110_env_backup::F110Envmap_img - f110_gym::envs::f110_env_backup::F110Envmap_inited - f110_gym::envs::f110_env_backup::F110Envmap_path - f110_gym::envs::f110_env_backup::F110Envmap_resolution - f110_gym::envs::f110_env_backup::F110Envmap_width - f110_gym::envs::f110_env_backup::F110Envmetadata - f110_gym::envs::f110_env_backup::F110Envnear_start - f110_gym::envs::f110_env_backup::F110Envnear_starts - f110_gym::envs::f110_env_backup::F110Envnum_agents - f110_gym::envs::f110_env_backup::F110Envnum_toggles - f110_gym::envs::f110_env_backup::F110Envorigin - f110_gym::envs::f110_env_backup::F110Envparams - f110_gym::envs::f110_env_backup::F110Envparams_set - f110_gym::envs::f110_env_backup::F110Envport - f110_gym::envs::f110_env_backup::F110Envrender - f110_gym::envs::f110_env_backup::F110Envreset - f110_gym::envs::f110_env_backup::F110Envsim_p - f110_gym::envs::f110_env_backup::F110Envsocket - f110_gym::envs::f110_env_backup::F110Envstart_rot - f110_gym::envs::f110_env_backup::F110Envstart_theta - f110_gym::envs::f110_env_backup::F110Envstart_thetas - f110_gym::envs::f110_env_backup::F110Envstart_thresh - f110_gym::envs::f110_env_backup::F110Envstart_x - f110_gym::envs::f110_env_backup::F110Envstart_xs - f110_gym::envs::f110_env_backup::F110Envstart_y - f110_gym::envs::f110_env_backup::F110Envstart_ys - f110_gym::envs::f110_env_backup::F110Envstep - f110_gym::envs::f110_env_backup::F110Envtheta - f110_gym::envs::f110_env_backup::F110Envtimeout - f110_gym::envs::f110_env_backup::F110Envtimestep - f110_gym::envs::f110_env_backup::F110Envtoggle_list - f110_gym::envs::f110_env_backup::F110Envupdate_params - f110_gym::envs::f110_env_backup::F110Envx - f110_gym::envs::f110_env_backup::F110Envy - - - diff --git a/docs/xml/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.xml b/docs/xml/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.xml deleted file mode 100644 index b0ec5d16..00000000 --- a/docs/xml/classf110__gym_1_1envs_1_1laser__models_1_1_scan_simulator2_d.xml +++ /dev/null @@ -1,482 +0,0 @@ - - - - f110_gym::envs::laser_models::ScanSimulator2D - object - - - - f110_gym.envs.laser_models.ScanSimulator2D::num_beams - - num_beams - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::fov - - fov - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::std_dev - - std_dev - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::eps - - eps - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::theta_dis - - theta_dis - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::max_range - - max_range - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::angle_increment - - angle_increment - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::theta_index_increment - - theta_index_increment - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::orig_c - - orig_c - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::orig_s - - orig_s - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::orig_x - - orig_x - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::orig_y - - orig_y - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::map_height - - map_height - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::map_width - - map_width - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::map_resolution - - map_resolution - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::dt - - dt - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::rng - - rng - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::sines - - sines - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::cosines - - cosines - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::map_img - - map_img - - - - - - - - - - - f110_gym.envs.laser_models.ScanSimulator2D::origin - - origin - - - - - - - - - - - - def - def f110_gym.envs.laser_models.ScanSimulator2D.__init__ - (self, num_beams, fov, std_dev=0.01, eps=0.0001, theta_dis=2000, max_range=30.0, seed=123) - __init__ - - self - self - - - num_beams - num_beams - - - fov - fov - - - std_dev - std_dev - 0.01 - - - eps - eps - 0.0001 - - - theta_dis - theta_dis - 2000 - - - max_range - max_range - 30.0 - - - seed - seed - 123 - - - - - - - - - - - def - def f110_gym.envs.laser_models.ScanSimulator2D.set_map - (self, map_path, map_ext) - set_map - - self - self - - - map_path - map_path - - - map_ext - map_ext - - - - -Set the bitmap of the scan simulator by path - - Args: -map_path (str): path to the map yaml file -map_ext (str): extension (image type) of the map image - - Returns: -flag (bool): if image reading and loading is successful - - - - - - - - def - def f110_gym.envs.laser_models.ScanSimulator2D.scan - (self, pose) - scan - - self - self - - - pose - pose - - - - -Perform simulated 2D scan by pose on the given map - - Args: -pose (numpy.ndarray (3, )): pose of the scan frame (x, y, theta) - - Returns: -scan (numpy.ndarray (n, )): data array of the laserscan, n=num_beams - - Raises: -ValueError: when scan is called before a map is set - - - - - - - - def - def f110_gym.envs.laser_models.ScanSimulator2D.get_increment - (self) - get_increment - - self - self - - - - - - - - - - - - - -2D LIDAR scan simulator class - -Init params: - num_beams (int): number of beams in the scan - fov (float): field of view of the laser scan - std_dev (float, default=0.01): standard deviation of the generated whitenoise in the scan - eps (float, default=0.0001): ray tracing iteration termination condition - theta_dis (int, default=2000): number of steps to discretize the angles between 0 and 2pi for look up - max_range (float, default=30.0): maximum range of the laser - seed (int, default=123): seed for random number generator for the whitenoise in scan - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::envs::laser_models::ScanSimulator2D__init__ - f110_gym::envs::laser_models::ScanSimulator2Dangle_increment - f110_gym::envs::laser_models::ScanSimulator2Dcosines - f110_gym::envs::laser_models::ScanSimulator2Ddt - f110_gym::envs::laser_models::ScanSimulator2Deps - f110_gym::envs::laser_models::ScanSimulator2Dfov - f110_gym::envs::laser_models::ScanSimulator2Dget_increment - f110_gym::envs::laser_models::ScanSimulator2Dmap_height - f110_gym::envs::laser_models::ScanSimulator2Dmap_img - f110_gym::envs::laser_models::ScanSimulator2Dmap_resolution - f110_gym::envs::laser_models::ScanSimulator2Dmap_width - f110_gym::envs::laser_models::ScanSimulator2Dmax_range - f110_gym::envs::laser_models::ScanSimulator2Dnum_beams - f110_gym::envs::laser_models::ScanSimulator2Dorig_c - f110_gym::envs::laser_models::ScanSimulator2Dorig_s - f110_gym::envs::laser_models::ScanSimulator2Dorig_x - f110_gym::envs::laser_models::ScanSimulator2Dorig_y - f110_gym::envs::laser_models::ScanSimulator2Dorigin - f110_gym::envs::laser_models::ScanSimulator2Drng - f110_gym::envs::laser_models::ScanSimulator2Dscan - f110_gym::envs::laser_models::ScanSimulator2Dset_map - f110_gym::envs::laser_models::ScanSimulator2Dsines - f110_gym::envs::laser_models::ScanSimulator2Dstd_dev - f110_gym::envs::laser_models::ScanSimulator2Dtheta_dis - f110_gym::envs::laser_models::ScanSimulator2Dtheta_index_increment - - - diff --git a/docs/xml/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.xml b/docs/xml/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.xml deleted file mode 100644 index 8801bc4d..00000000 --- a/docs/xml/classf110__gym_1_1envs_1_1laser__models_1_1_scan_tests.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - f110_gym::envs::laser_models::ScanTests - TestCase - - - - f110_gym.envs.laser_models.ScanTests::num_beams - - num_beams - - - - - - - - - - - f110_gym.envs.laser_models.ScanTests::fov - - fov - - - - - - - - - - - f110_gym.envs.laser_models.ScanTests::num_test - - num_test - - - - - - - - - - - f110_gym.envs.laser_models.ScanTests::test_poses - - test_poses - - - - - - - - - - - f110_gym.envs.laser_models.ScanTests::berlin_scan - - berlin_scan - - - - - - - - - - - f110_gym.envs.laser_models.ScanTests::skirk_scan - - skirk_scan - - - - - - - - - - - - def - def f110_gym.envs.laser_models.ScanTests.setUp - (self) - setUp - - self - self - - - - - - - - - - - def - def f110_gym.envs.laser_models.ScanTests.test_map_berlin - (self) - test_map_berlin - - self - self - - - - - - - - - - - def - def f110_gym.envs.laser_models.ScanTests.test_map_skirk - (self) - test_map_skirk - - self - self - - - - - - - - - - - def - def f110_gym.envs.laser_models.ScanTests.test_fps - (self) - test_fps - - self - self - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::envs::laser_models::ScanTestsberlin_scan - f110_gym::envs::laser_models::ScanTestsfov - f110_gym::envs::laser_models::ScanTestsnum_beams - f110_gym::envs::laser_models::ScanTestsnum_test - f110_gym::envs::laser_models::ScanTestssetUp - f110_gym::envs::laser_models::ScanTestsskirk_scan - f110_gym::envs::laser_models::ScanTeststest_fps - f110_gym::envs::laser_models::ScanTeststest_map_berlin - f110_gym::envs::laser_models::ScanTeststest_map_skirk - f110_gym::envs::laser_models::ScanTeststest_poses - - - diff --git a/docs/xml/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.xml b/docs/xml/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.xml deleted file mode 100644 index 27e6d449..00000000 --- a/docs/xml/classf110__gym_1_1envs_1_1rendering_1_1_env_renderer.xml +++ /dev/null @@ -1,552 +0,0 @@ - - - - f110_gym::envs::rendering::EnvRenderer - Window - - - - f110_gym.envs.rendering.EnvRenderer::left - - left - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::right - - right - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::bottom - - bottom - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::top - - top - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::zoom_level - - zoom_level - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::zoomed_width - - zoomed_width - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::zoomed_height - - zoomed_height - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::batch - - batch - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::map_points - - map_points - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::poses - - poses - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::vertices - - vertices - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::score_label - - score_label - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::fps_display - - fps_display - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::ego_idx - - ego_idx - - - - - - - - - - - f110_gym.envs.rendering.EnvRenderer::cars - - cars - - - - - - - - - - - - def - def f110_gym.envs.rendering.EnvRenderer.__init__ - (self, width, height, *args, **kwargs) - __init__ - - self - self - - - width - width - - - height - height - - - * - args - - - ** - kwargs - - - - -Class constructor - -Args: - width (int): width of the window - height (int): height of the window - -Returns: - None - - - - - - - - def - def f110_gym.envs.rendering.EnvRenderer.update_map - (self, map_path, map_ext) - update_map - - self - self - - - map_path - map_path - - - map_ext - map_ext - - - - -Update the map being drawn by the renderer. Converts image to a list of 3D points representing each obstacle pixel in the map. - -Args: - map_path (str): absolute path to the map without extensions - map_ext (str): extension for the map image file - -Returns: - None - - - - - - - - def - def f110_gym.envs.rendering.EnvRenderer.on_resize - (self, width, height) - on_resize - - self - self - - - width - width - - - height - height - - - - -Callback function on window resize, overrides inherited method, and updates camera values on top of the inherited on_resize() method. - -Potential improvements on current behavior: zoom/pan resets on window resize. - -Args: - width (int): new width of window - height (int): new height of window - -Returns: - None - - - - - - - - def - def f110_gym.envs.rendering.EnvRenderer.on_mouse_drag - (self, x, y, dx, dy, buttons, modifiers) - on_mouse_drag - - self - self - - - x - x - - - y - y - - - dx - dx - - - dy - dy - - - buttons - buttons - - - modifiers - modifiers - - - - -Callback function on mouse drag, overrides inherited method. - -Args: - x (int): Distance in pixels from the left edge of the window. - y (int): Distance in pixels from the bottom edge of the window. - dx (int): Relative X position from the previous mouse position. - dy (int): Relative Y position from the previous mouse position. - buttons (int): Bitwise combination of the mouse buttons currently pressed. - modifiers (int): Bitwise combination of any keyboard modifiers currently active. - -Returns: - None - - - - - - - - def - def f110_gym.envs.rendering.EnvRenderer.on_mouse_scroll - (self, x, y, dx, dy) - on_mouse_scroll - - self - self - - - x - x - - - y - y - - - dx - dx - - - dy - dy - - - - -Callback function on mouse scroll, overrides inherited method. - -Args: - x (int): Distance in pixels from the left edge of the window. - y (int): Distance in pixels from the bottom edge of the window. - scroll_x (float): Amount of movement on the horizontal axis. - scroll_y (float): Amount of movement on the vertical axis. - -Returns: - None - - - - - - - - def - def f110_gym.envs.rendering.EnvRenderer.on_close - (self) - on_close - - self - self - - - - -Callback function when the 'x' is clicked on the window, overrides inherited method. Also throws exception to end the python program when in a loop. - -Args: - None - -Returns: - None - -Raises: - Exception: with a message that indicates the rendering window was closed - - - - - - - - def - def f110_gym.envs.rendering.EnvRenderer.on_draw - (self) - on_draw - - self - self - - - - -Function when the pyglet is drawing. The function draws the batch created that includes the map points, the agent polygons, and the information text, and the fps display. - -Args: - None - -Returns: - None - - - - - - - - def - def f110_gym.envs.rendering.EnvRenderer.update_obs - (self, obs) - update_obs - - self - self - - - obs - obs - - - - -Updates the renderer with the latest observation from the gym environment, including the agent poses, and the information text. - -Args: - obs (dict): observation dict from the gym env - -Returns: - None - - - - - - - - - - -A window class inherited from pyglet.window.Window, handles the camera/projection interaction, resizing window, and rendering the environment - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::envs::rendering::EnvRenderer__init__ - f110_gym::envs::rendering::EnvRendererbatch - f110_gym::envs::rendering::EnvRendererbottom - f110_gym::envs::rendering::EnvRenderercars - f110_gym::envs::rendering::EnvRendererego_idx - f110_gym::envs::rendering::EnvRendererfps_display - f110_gym::envs::rendering::EnvRendererleft - f110_gym::envs::rendering::EnvRenderermap_points - f110_gym::envs::rendering::EnvRendereron_close - f110_gym::envs::rendering::EnvRendereron_draw - f110_gym::envs::rendering::EnvRendereron_mouse_drag - f110_gym::envs::rendering::EnvRendereron_mouse_scroll - f110_gym::envs::rendering::EnvRendereron_resize - f110_gym::envs::rendering::EnvRendererposes - f110_gym::envs::rendering::EnvRendererright - f110_gym::envs::rendering::EnvRendererscore_label - f110_gym::envs::rendering::EnvRenderertop - f110_gym::envs::rendering::EnvRendererupdate_map - f110_gym::envs::rendering::EnvRendererupdate_obs - f110_gym::envs::rendering::EnvRenderervertices - f110_gym::envs::rendering::EnvRendererzoom_level - f110_gym::envs::rendering::EnvRendererzoomed_height - f110_gym::envs::rendering::EnvRendererzoomed_width - - - diff --git a/docs/xml/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.xml b/docs/xml/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.xml deleted file mode 100644 index c4fdfdde..00000000 --- a/docs/xml/classf110__gym_1_1unittest_1_1collision__checks_1_1_collision_tests.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - f110_gym::unittest::collision_checks::CollisionTests - TestCase - - - - f110_gym.unittest.collision_checks.CollisionTests::vertices1 - - vertices1 - - - - - - - - - - - f110_gym.unittest.collision_checks.CollisionTests::length - - length - - - - - - - - - - - f110_gym.unittest.collision_checks.CollisionTests::width - - width - - - - - - - - - - - - def - def f110_gym.unittest.collision_checks.CollisionTests.setUp - (self) - setUp - - self - self - - - - - - - - - - - def - def f110_gym.unittest.collision_checks.CollisionTests.test_get_vert - (self) - test_get_vert - - self - self - - - - - - - - - - - def - def f110_gym.unittest.collision_checks.CollisionTests.test_get_vert_fps - (self) - test_get_vert_fps - - self - self - - - - - - - - - - - def - def f110_gym.unittest.collision_checks.CollisionTests.test_random_collision - (self) - test_random_collision - - self - self - - - - - - - - - - - def - def f110_gym.unittest.collision_checks.CollisionTests.test_fps - (self) - test_fps - - self - self - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::unittest::collision_checks::CollisionTestslength - f110_gym::unittest::collision_checks::CollisionTestssetUp - f110_gym::unittest::collision_checks::CollisionTeststest_fps - f110_gym::unittest::collision_checks::CollisionTeststest_get_vert - f110_gym::unittest::collision_checks::CollisionTeststest_get_vert_fps - f110_gym::unittest::collision_checks::CollisionTeststest_random_collision - f110_gym::unittest::collision_checks::CollisionTestsvertices1 - f110_gym::unittest::collision_checks::CollisionTestswidth - - - diff --git a/docs/xml/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.xml b/docs/xml/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.xml deleted file mode 100644 index 7c7b3e1f..00000000 --- a/docs/xml/classf110__gym_1_1unittest_1_1dynamics__test_1_1_dynamics_test.xml +++ /dev/null @@ -1,372 +0,0 @@ - - - - f110_gym::unittest::dynamics_test::DynamicsTest - TestCase - - - - f110_gym.unittest.dynamics_test.DynamicsTest::mu - - mu - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::C_Sf - - C_Sf - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::C_Sr - - C_Sr - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::lf - - lf - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::lr - - lr - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::h - - h - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::m - - m - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::I - - I - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::s_min - - s_min - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::s_max - - s_max - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::sv_min - - sv_min - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::sv_max - - sv_max - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::v_min - - v_min - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::v_max - - v_max - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::v_switch - - v_switch - - - - - - - - - - - f110_gym.unittest.dynamics_test.DynamicsTest::a_max - - a_max - - - - - - - - - - - - def - def f110_gym.unittest.dynamics_test.DynamicsTest.setUp - (self) - setUp - - self - self - - - - - - - - - - - def - def f110_gym.unittest.dynamics_test.DynamicsTest.test_derivatives - (self) - test_derivatives - - self - self - - - - - - - - - - - def - def f110_gym.unittest.dynamics_test.DynamicsTest.test_zeroinit_roll - (self) - test_zeroinit_roll - - self - self - - - - - - - - - - - def - def f110_gym.unittest.dynamics_test.DynamicsTest.test_zeroinit_dec - (self) - test_zeroinit_dec - - self - self - - - - - - - - - - - def - def f110_gym.unittest.dynamics_test.DynamicsTest.test_zeroinit_acc - (self) - test_zeroinit_acc - - self - self - - - - - - - - - - - def - def f110_gym.unittest.dynamics_test.DynamicsTest.test_zeroinit_rollleft - (self) - test_zeroinit_rollleft - - self - self - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::unittest::dynamics_test::DynamicsTesta_max - f110_gym::unittest::dynamics_test::DynamicsTestC_Sf - f110_gym::unittest::dynamics_test::DynamicsTestC_Sr - f110_gym::unittest::dynamics_test::DynamicsTesth - f110_gym::unittest::dynamics_test::DynamicsTestI - f110_gym::unittest::dynamics_test::DynamicsTestlf - f110_gym::unittest::dynamics_test::DynamicsTestlr - f110_gym::unittest::dynamics_test::DynamicsTestm - f110_gym::unittest::dynamics_test::DynamicsTestmu - f110_gym::unittest::dynamics_test::DynamicsTests_max - f110_gym::unittest::dynamics_test::DynamicsTests_min - f110_gym::unittest::dynamics_test::DynamicsTestsetUp - f110_gym::unittest::dynamics_test::DynamicsTestsv_max - f110_gym::unittest::dynamics_test::DynamicsTestsv_min - f110_gym::unittest::dynamics_test::DynamicsTesttest_derivatives - f110_gym::unittest::dynamics_test::DynamicsTesttest_zeroinit_acc - f110_gym::unittest::dynamics_test::DynamicsTesttest_zeroinit_dec - f110_gym::unittest::dynamics_test::DynamicsTesttest_zeroinit_roll - f110_gym::unittest::dynamics_test::DynamicsTesttest_zeroinit_rollleft - f110_gym::unittest::dynamics_test::DynamicsTestv_max - f110_gym::unittest::dynamics_test::DynamicsTestv_min - f110_gym::unittest::dynamics_test::DynamicsTestv_switch - - - diff --git a/docs/xml/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.xml b/docs/xml/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.xml deleted file mode 100644 index 869ddbbb..00000000 --- a/docs/xml/classf110__gym_1_1unittest_1_1pyglet__test_1_1_camera.xml +++ /dev/null @@ -1,365 +0,0 @@ - - - - f110_gym::unittest::pyglet_test::Camera - f110_gym.unittest.pyglet_test.CenteredCamera - - - - f110_gym.unittest.pyglet_test.Camera::_window - - _window - - - - - - - - - - - f110_gym.unittest.pyglet_test.Camera::_zoom - - _zoom - - - - - - - - - - - - - f110_gym.unittest.pyglet_test.Camera::scroll_speed - - scroll_speed - - - - - - - - - - - f110_gym.unittest.pyglet_test.Camera::max_zoom - - max_zoom - - - - - - - - - - - f110_gym.unittest.pyglet_test.Camera::min_zoom - - min_zoom - - - - - - - - - - - f110_gym.unittest.pyglet_test.Camera::offset_x - - offset_x - - - - - - - - - - - f110_gym.unittest.pyglet_test.Camera::offset_y - - offset_y - - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test.Camera.__init__ - (self, pyglet.window.Window window, scroll_speed=1, min_zoom=1, max_zoom=4) - __init__ - - self - self - - - pyglet.window.Window - window - - - scroll_speed - scroll_speed - 1 - - - min_zoom - min_zoom - 1 - - - max_zoom - max_zoom - 4 - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test.Camera.zoom - (self) - zoom - - self - self - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test.Camera.zoom - (self, value) - zoom - - self - self - - - value - value - - - - -Here we set zoom, clamp value to minimum of min_zoom and max of max_zoom. - - - - - - - def - def f110_gym.unittest.pyglet_test.Camera.position - (self) - position - - self - self - - - - -Query the current offset. - - - - - - - def - def f110_gym.unittest.pyglet_test.Camera.position - (self, value) - position - - self - self - - - value - value - - - - -Set the scroll offset directly. - - - - - - - def - def f110_gym.unittest.pyglet_test.Camera.move - (self, axis_x, axis_y) - move - - self - self - - - axis_x - axis_x - - - axis_y - axis_y - - - - -Move axis direction with scroll_speed. - Example: Move left -> move(-1, 0) - - - - - - - def - def f110_gym.unittest.pyglet_test.Camera.begin - (self) - begin - begin - - self - self - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test.Camera.end - (self) - end - end - - self - self - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test.Camera.__enter__ - (self) - __enter__ - - self - self - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test.Camera.__exit__ - (self, exception_type, exception_value, traceback) - __exit__ - - self - self - - - exception_type - exception_type - - - exception_value - exception_value - - - traceback - traceback - - - - - - - - - - - - - -A simple 2D camera that contains the speed and offset. - - - - - - - - - - - - - - - - f110_gym::unittest::pyglet_test::Camera__enter__ - f110_gym::unittest::pyglet_test::Camera__exit__ - f110_gym::unittest::pyglet_test::Camera__init__ - f110_gym::unittest::pyglet_test::Camera_window - f110_gym::unittest::pyglet_test::Camera_zoom - f110_gym::unittest::pyglet_test::Camerabegin - f110_gym::unittest::pyglet_test::Cameraend - f110_gym::unittest::pyglet_test::Cameramax_zoom - f110_gym::unittest::pyglet_test::Cameramin_zoom - f110_gym::unittest::pyglet_test::Cameramove - f110_gym::unittest::pyglet_test::Cameraoffset_x - f110_gym::unittest::pyglet_test::Cameraoffset_y - f110_gym::unittest::pyglet_test::Cameraposition - f110_gym::unittest::pyglet_test::Cameraposition - f110_gym::unittest::pyglet_test::Camerascroll_speed - f110_gym::unittest::pyglet_test::Camerazoom - f110_gym::unittest::pyglet_test::Camerazoom - - - diff --git a/docs/xml/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera.xml b/docs/xml/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera.xml deleted file mode 100644 index 3b444eb8..00000000 --- a/docs/xml/classf110__gym_1_1unittest_1_1pyglet__test_1_1_centered_camera.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - f110_gym::unittest::pyglet_test::CenteredCamera - f110_gym.unittest.pyglet_test.Camera - - - def - def f110_gym.unittest.pyglet_test.CenteredCamera.begin - (self) - begin - begin - - self - self - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test.CenteredCamera.end - (self) - end - end - - self - self - - - - - - - - - - - - - -A simple 2D camera class. 0, 0 will be the center of the screen, as opposed to the bottom left. - - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::unittest::pyglet_test::CenteredCamera__enter__ - f110_gym::unittest::pyglet_test::CenteredCamera__exit__ - f110_gym::unittest::pyglet_test::CenteredCamera__init__ - f110_gym::unittest::pyglet_test::CenteredCamerabegin - f110_gym::unittest::pyglet_test::CenteredCameraend - f110_gym::unittest::pyglet_test::CenteredCameramax_zoom - f110_gym::unittest::pyglet_test::CenteredCameramin_zoom - f110_gym::unittest::pyglet_test::CenteredCameramove - f110_gym::unittest::pyglet_test::CenteredCameraoffset_x - f110_gym::unittest::pyglet_test::CenteredCameraoffset_y - f110_gym::unittest::pyglet_test::CenteredCameraposition - f110_gym::unittest::pyglet_test::CenteredCameraposition - f110_gym::unittest::pyglet_test::CenteredCamerascroll_speed - f110_gym::unittest::pyglet_test::CenteredCamerazoom - f110_gym::unittest::pyglet_test::CenteredCamerazoom - - - diff --git a/docs/xml/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app.xml b/docs/xml/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app.xml deleted file mode 100644 index ece91a9e..00000000 --- a/docs/xml/classf110__gym_1_1unittest_1_1pyglet__test__camera_1_1_app.xml +++ /dev/null @@ -1,336 +0,0 @@ - - - - f110_gym::unittest::pyglet_test_camera::App - Window - - - - f110_gym.unittest.pyglet_test_camera.App::left - - left - - - - - - - - - - - f110_gym.unittest.pyglet_test_camera.App::right - - right - - - - - - - - - - - f110_gym.unittest.pyglet_test_camera.App::bottom - - bottom - - - - - - - - - - - f110_gym.unittest.pyglet_test_camera.App::top - - top - - - - - - - - - - - f110_gym.unittest.pyglet_test_camera.App::zoom_level - - zoom_level - - - - - - - - - - - f110_gym.unittest.pyglet_test_camera.App::zoomed_width - - zoomed_width - - - - - - - - - - - f110_gym.unittest.pyglet_test_camera.App::zoomed_height - - zoomed_height - - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test_camera.App.__init__ - (self, width, height, *args, **kwargs) - __init__ - - self - self - - - width - width - - - height - height - - - * - args - - - ** - kwargs - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test_camera.App.init_gl - (self, width, height) - init_gl - - self - self - - - width - width - - - height - height - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test_camera.App.on_resize - (self, width, height) - on_resize - - self - self - - - width - width - - - height - height - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test_camera.App.on_mouse_drag - (self, x, y, dx, dy, buttons, modifiers) - on_mouse_drag - - self - self - - - x - x - - - y - y - - - dx - dx - - - dy - dy - - - buttons - buttons - - - modifiers - modifiers - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test_camera.App.on_mouse_scroll - (self, x, y, dx, dy) - on_mouse_scroll - - self - self - - - x - x - - - y - y - - - dx - dx - - - dy - dy - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test_camera.App.on_draw - (self) - on_draw - - self - self - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test_camera.App.run - (self) - run - - self - self - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::unittest::pyglet_test_camera::App__init__ - f110_gym::unittest::pyglet_test_camera::Appbottom - f110_gym::unittest::pyglet_test_camera::Appinit_gl - f110_gym::unittest::pyglet_test_camera::Appleft - f110_gym::unittest::pyglet_test_camera::Appon_draw - f110_gym::unittest::pyglet_test_camera::Appon_mouse_drag - f110_gym::unittest::pyglet_test_camera::Appon_mouse_scroll - f110_gym::unittest::pyglet_test_camera::Appon_resize - f110_gym::unittest::pyglet_test_camera::Appright - f110_gym::unittest::pyglet_test_camera::Apprun - f110_gym::unittest::pyglet_test_camera::Apptop - f110_gym::unittest::pyglet_test_camera::Appzoom_level - f110_gym::unittest::pyglet_test_camera::Appzoomed_height - f110_gym::unittest::pyglet_test_camera::Appzoomed_width - - - diff --git a/docs/xml/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.xml b/docs/xml/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.xml deleted file mode 100644 index d5de8118..00000000 --- a/docs/xml/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_simulator2_d.xml +++ /dev/null @@ -1,482 +0,0 @@ - - - - f110_gym::unittest::scan_sim::ScanSimulator2D - object - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::num_beams - - num_beams - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::fov - - fov - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::std_dev - - std_dev - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::eps - - eps - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::theta_dis - - theta_dis - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::max_range - - max_range - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::angle_increment - - angle_increment - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::theta_index_increment - - theta_index_increment - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::orig_c - - orig_c - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::orig_s - - orig_s - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::orig_x - - orig_x - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::orig_y - - orig_y - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::map_height - - map_height - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::map_width - - map_width - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::map_resolution - - map_resolution - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::dt - - dt - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::rng - - rng - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::sines - - sines - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::cosines - - cosines - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::map_img - - map_img - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanSimulator2D::origin - - origin - - - - - - - - - - - - def - def f110_gym.unittest.scan_sim.ScanSimulator2D.__init__ - (self, num_beams, fov, std_dev=0.01, eps=0.0001, theta_dis=2000, max_range=30.0, seed=123) - __init__ - - self - self - - - num_beams - num_beams - - - fov - fov - - - std_dev - std_dev - 0.01 - - - eps - eps - 0.0001 - - - theta_dis - theta_dis - 2000 - - - max_range - max_range - 30.0 - - - seed - seed - 123 - - - - - - - - - - - def - def f110_gym.unittest.scan_sim.ScanSimulator2D.set_map - (self, map_path, map_ext) - set_map - - self - self - - - map_path - map_path - - - map_ext - map_ext - - - - -Set the bitmap of the scan simulator by path - - Args: -map_path (str): path to the map yaml file -map_ext (str): extension (image type) of the map image - - Returns: -flag (bool): if image reading and loading is successful - - - - - - - - def - def f110_gym.unittest.scan_sim.ScanSimulator2D.scan - (self, pose) - scan - - self - self - - - pose - pose - - - - -Perform simulated 2D scan by pose on the given map - - Args: -pose (numpy.ndarray (3, )): pose of the scan frame (x, y, theta) - - Returns: -scan (numpy.ndarray (n, )): data array of the laserscan, n=num_beams - - Raises: -ValueError: when scan is called before a map is set - - - - - - - - def - def f110_gym.unittest.scan_sim.ScanSimulator2D.get_increment - (self) - get_increment - - self - self - - - - - - - - - - - - - -2D LIDAR scan simulator class - -Init params: - num_beams (int): number of beams in the scan - fov (float): field of view of the laser scan - std_dev (float, default=0.01): standard deviation of the generated whitenoise in the scan - eps (float, default=0.0001): ray tracing iteration termination condition - theta_dis (int, default=2000): number of steps to discretize the angles between 0 and 2pi for look up - max_range (float, default=30.0): maximum range of the laser - seed (int, default=123): seed for random number generator for the whitenoise in scan - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::unittest::scan_sim::ScanSimulator2D__init__ - f110_gym::unittest::scan_sim::ScanSimulator2Dangle_increment - f110_gym::unittest::scan_sim::ScanSimulator2Dcosines - f110_gym::unittest::scan_sim::ScanSimulator2Ddt - f110_gym::unittest::scan_sim::ScanSimulator2Deps - f110_gym::unittest::scan_sim::ScanSimulator2Dfov - f110_gym::unittest::scan_sim::ScanSimulator2Dget_increment - f110_gym::unittest::scan_sim::ScanSimulator2Dmap_height - f110_gym::unittest::scan_sim::ScanSimulator2Dmap_img - f110_gym::unittest::scan_sim::ScanSimulator2Dmap_resolution - f110_gym::unittest::scan_sim::ScanSimulator2Dmap_width - f110_gym::unittest::scan_sim::ScanSimulator2Dmax_range - f110_gym::unittest::scan_sim::ScanSimulator2Dnum_beams - f110_gym::unittest::scan_sim::ScanSimulator2Dorig_c - f110_gym::unittest::scan_sim::ScanSimulator2Dorig_s - f110_gym::unittest::scan_sim::ScanSimulator2Dorig_x - f110_gym::unittest::scan_sim::ScanSimulator2Dorig_y - f110_gym::unittest::scan_sim::ScanSimulator2Dorigin - f110_gym::unittest::scan_sim::ScanSimulator2Drng - f110_gym::unittest::scan_sim::ScanSimulator2Dscan - f110_gym::unittest::scan_sim::ScanSimulator2Dset_map - f110_gym::unittest::scan_sim::ScanSimulator2Dsines - f110_gym::unittest::scan_sim::ScanSimulator2Dstd_dev - f110_gym::unittest::scan_sim::ScanSimulator2Dtheta_dis - f110_gym::unittest::scan_sim::ScanSimulator2Dtheta_index_increment - - - diff --git a/docs/xml/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.xml b/docs/xml/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.xml deleted file mode 100644 index a64a1117..00000000 --- a/docs/xml/classf110__gym_1_1unittest_1_1scan__sim_1_1_scan_tests.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - f110_gym::unittest::scan_sim::ScanTests - TestCase - - - - f110_gym.unittest.scan_sim.ScanTests::num_beams - - num_beams - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanTests::fov - - fov - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanTests::num_test - - num_test - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanTests::test_poses - - test_poses - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanTests::berlin_scan - - berlin_scan - - - - - - - - - - - f110_gym.unittest.scan_sim.ScanTests::skirk_scan - - skirk_scan - - - - - - - - - - - - def - def f110_gym.unittest.scan_sim.ScanTests.setUp - (self) - setUp - - self - self - - - - - - - - - - - def - def f110_gym.unittest.scan_sim.ScanTests.test_map_berlin - (self) - test_map_berlin - - self - self - - - - - - - - - - - def - def f110_gym.unittest.scan_sim.ScanTests.test_map_skirk - (self) - test_map_skirk - - self - self - - - - - - - - - - - def - def f110_gym.unittest.scan_sim.ScanTests.test_fps - (self) - test_fps - - self - self - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f110_gym::unittest::scan_sim::ScanTestsberlin_scan - f110_gym::unittest::scan_sim::ScanTestsfov - f110_gym::unittest::scan_sim::ScanTestsnum_beams - f110_gym::unittest::scan_sim::ScanTestsnum_test - f110_gym::unittest::scan_sim::ScanTestssetUp - f110_gym::unittest::scan_sim::ScanTestsskirk_scan - f110_gym::unittest::scan_sim::ScanTeststest_fps - f110_gym::unittest::scan_sim::ScanTeststest_map_berlin - f110_gym::unittest::scan_sim::ScanTeststest_map_skirk - f110_gym::unittest::scan_sim::ScanTeststest_poses - - - diff --git a/docs/xml/collision__checks_8py.xml b/docs/xml/collision__checks_8py.xml deleted file mode 100644 index 31b16b0e..00000000 --- a/docs/xml/collision__checks_8py.xml +++ /dev/null @@ -1,311 +0,0 @@ - - - - collision_checks.py - f110_gym::unittest::collision_checks::CollisionTests - f110_gym::unittest::collision_checks - - - - - -#MITLicense - -#Copyright(c)2020JosephAuckley,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy -#ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal -#intheSoftwarewithoutrestriction,includingwithoutlimitationtherights -#touse,copy,modify,merge,publish,distribute,sublicense,and/orsell -#copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis -#furnishedtodoso,subjecttothefollowingconditions: - -#Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall -#copiesorsubstantialportionsoftheSoftware. - -#THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR -#IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY, -#FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE -#AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER -#LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM, -#OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE -#SOFTWARE. - - - -""" -PrototypeofUtilityfunctionsandGJKalgorithmforCollisionchecksbetweenvehicles -Originallyfromhttps://github.com/kroitor/gjk.c -Author:HongruiZheng -""" - -importnumpyasnp -fromnumbaimportnjit - -@njit(cache=True) -defperpendicular(pt): -""" -Returna2-vector'sperpendicularvector - -Args: -pt(np.ndarray,(2,)):inputvector - -Returns: -pt(np.ndarray,(2,)):perpendicularvector -""" -temp=pt[0] -pt[0]=pt[1] -pt[1]=-1*temp -returnpt - - -@njit(cache=True) -deftripleProduct(a,b,c): -""" -Returntripleproductofthreevectors - -Args: -a,b,c(np.ndarray,(2,)):inputvectors - -Returns: -(np.ndarray,(2,)):tripleproduct -""" -ac=a.dot(c) -bc=b.dot(c) -returnb*ac-a*bc - - -@njit(cache=True) -defavgPoint(vertices): -""" -Returntheaveragepointofmultiplevertices - -Args: -vertices(np.ndarray,(n,2)):theverticeswewanttofindavgon - -Returns: -avg(np.ndarray,(2,)):averagepointofthevertices -""" -returnnp.sum(vertices,axis=0)/vertices.shape[0] - - -@njit(cache=True) -defindexOfFurthestPoint(vertices,d): -""" -Returntheindexofthevertexfurthestawayalongadirectioninthelistofvertices - -Args: -vertices(np.ndarray,(n,2)):theverticeswewanttofindavgon - -Returns: -idx(int):indexofthefurthestpoint -""" -returnnp.argmax(vertices.dot(d)) - - -@njit(cache=True) -defsupport(vertices1,vertices2,d): -""" -MinkowskisumsupportfunctionforGJK - -Args: -vertices1(np.ndarray,(n,2)):verticesofthefirstbody -vertices2(np.ndarray,(n,2)):verticesofthesecondbody -d(np.ndarray,(2,)):directiontofindthesupportalong - -Returns: -support(np.ndarray,(n,2)):Minkowskisum -""" -i=indexOfFurthestPoint(vertices1,d) -j=indexOfFurthestPoint(vertices2,-d) -returnvertices1[i]-vertices2[j] - - -@njit(cache=True) -defcollision(vertices1,vertices2): -""" -GJKtesttoseewhethertwobodiesoverlap - -Args: -vertices1(np.ndarray,(n,2)):verticesofthefirstbody -vertices2(np.ndarray,(n,2)):verticesofthesecondbody - -Returns: -overlap(boolean):Trueiftwobodiescollide -""" -index=0 -simplex=np.empty((3,2)) - -position1=avgPoint(vertices1) -position2=avgPoint(vertices2) - -d=position1-position2 - -ifd[0]==0andd[1]==0: -d[0]=1.0 - -a=support(vertices1,vertices2,d) -simplex[index,:]=a - -ifd.dot(a)<=0: -returnFalse - -d=-a - -iter_count=0 -whileiter_count<1e3: -a=support(vertices1,vertices2,d) -index+=1 -simplex[index,:]=a -ifd.dot(a)<=0: -returnFalse - -ao=-a - -ifindex<2: -b=simplex[0,:] -ab=b-a -d=tripleProduct(ab,ao,ab) -ifnp.linalg.norm(d)<1e-10: -d=perpendicular(ab) -continue - -b=simplex[1,:] -c=simplex[0,:] -ab=b-a -ac=c-a - -acperp=tripleProduct(ab,ac,ac) - -ifacperp.dot(ao)>=0: -d=acperp -else: -abperp=tripleProduct(ac,ab,ab) -ifabperp.dot(ao)<0: -returnTrue -simplex[0,:]=simplex[1,:] -d=abperp - -simplex[1,:]=simplex[2,:] -index-=1 - -iter_count+=1 -returnFalse - -""" -Utilityfunctionsforgettingverticesbyposeandshape -""" - -@njit(cache=True) -defget_trmtx(pose): -""" -Gettransformationmatrixofvehicleframe->globalframe - -Args: -pose(np.ndarray(3,)):currentposeofthevehicle - -return: -H(np.ndarray(4,4)):transformationmatrix -""" -x=pose[0] -y=pose[1] -th=pose[2] -cos=np.cos(th) -sin=np.sin(th) -H=np.array([[cos,-sin,0.,x],[sin,cos,0.,y],[0.,0.,1.,0.],[0.,0.,0.,1.]]) -returnH - -@njit(cache=True) -defget_vertices(pose,length,width): -""" -Utilityfunctiontoreturnverticesofthecarbodygivenposeandsize - -Args: -pose(np.ndarray,(3,)):currentworldcoordinateposeofthevehicle -length(float):carlength -width(float):carwidth - -Returns: -vertices(np.ndarray,(4,2)):cornerverticesofthevehiclebody -""" -H=get_trmtx(pose) -rl=H.dot(np.asarray([[-length/2],[width/2],[0.],[1.]])).flatten() -rr=H.dot(np.asarray([[-length/2],[-width/2],[0.],[1.]])).flatten() -fl=H.dot(np.asarray([[length/2],[width/2],[0.],[1.]])).flatten() -fr=H.dot(np.asarray([[length/2],[-width/2],[0.],[1.]])).flatten() -rl=rl/rl[3] -rr=rr/rr[3] -fl=fl/fl[3] -fr=fr/fr[3] -vertices=np.asarray([[rl[0],rl[1]],[rr[0],rr[1]],[fr[0],fr[1]],[fl[0],fl[1]]]) -returnvertices - - -""" -UnittestsforGJKcollisionchecks -Author:HongruiZheng -""" - -importtime -importunittest - -classCollisionTests(unittest.TestCase): -defsetUp(self): -#testparams -np.random.seed(1234) - -#Collisioncheckbody -self.vertices1=np.asarray([[4,11.],[5,5],[9,9],[10,10]]) - -#carsize -self.length=0.32 -self.width=0.22 - -deftest_get_vert(self): -test_pose=np.array([2.3,6.7,0.8]) -vertices=get_vertices(test_pose,self.length,self.width) -rect=np.vstack((vertices,vertices[0,:])) -importmatplotlib.pyplotasplt -plt.scatter(test_pose[0],test_pose[1],c='red') -plt.plot(rect[:,0],rect[:,1]) -plt.xlim([1,4]) -plt.ylim([5,8]) -plt.axes().set_aspect('equal') -plt.show() -self.assertTrue(vertices.shape==(4,2)) - -deftest_get_vert_fps(self): -test_pose=np.array([2.3,6.7,0.8]) -start=time.time() -for_inrange(1000): -vertices=get_vertices(test_pose,self.length,self.width) -elapsed=time.time()-start -fps=1000/elapsed -print('getverticesfps:',fps) -self.assertTrue(fps>500) - -deftest_random_collision(self): -#perturbthebodybyasmallamountandmakesureitallcollideswiththeoriginalbody -for_inrange(1000): -a=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -b=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -self.assertTrue(collision(a,b)) - -deftest_fps(self): -#alsoperturbthebodybutmainlywanttotestGJKspeed -start=time.time() -for_inrange(1000): -a=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -b=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -collision(a,b) -elapsed=time.time()-start -fps=1000/elapsed -print('gjkfps:',fps) -self.assertTrue(fps>500) - -if__name__=='__main__': -unittest.main() - - - - diff --git a/docs/xml/collision__models_8py.xml b/docs/xml/collision__models_8py.xml deleted file mode 100644 index 1c22cbab..00000000 --- a/docs/xml/collision__models_8py.xml +++ /dev/null @@ -1,354 +0,0 @@ - - - - collision_models.py - f110_gym::envs::collision_models::CollisionTests - f110_gym::envs::collision_models - - - - - -#MITLicense - -#Copyright(c)2020JosephAuckley,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy -#ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal -#intheSoftwarewithoutrestriction,includingwithoutlimitationtherights -#touse,copy,modify,merge,publish,distribute,sublicense,and/orsell -#copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis -#furnishedtodoso,subjecttothefollowingconditions: - -#Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall -#copiesorsubstantialportionsoftheSoftware. - -#THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR -#IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY, -#FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE -#AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER -#LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM, -#OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE -#SOFTWARE. - - - -""" -PrototypeofUtilityfunctionsandGJKalgorithmforCollisionchecksbetweenvehicles -Originallyfromhttps://github.com/kroitor/gjk.c -Author:HongruiZheng -""" - -importnumpyasnp -fromnumbaimportnjit - -@njit(cache=True) -defperpendicular(pt): -""" -Returna2-vector'sperpendicularvector - -Args: -pt(np.ndarray,(2,)):inputvector - -Returns: -pt(np.ndarray,(2,)):perpendicularvector -""" -temp=pt[0] -pt[0]=pt[1] -pt[1]=-1*temp -returnpt - - -@njit(cache=True) -deftripleProduct(a,b,c): -""" -Returntripleproductofthreevectors - -Args: -a,b,c(np.ndarray,(2,)):inputvectors - -Returns: -(np.ndarray,(2,)):tripleproduct -""" -ac=a.dot(c) -bc=b.dot(c) -returnb*ac-a*bc - - -@njit(cache=True) -defavgPoint(vertices): -""" -Returntheaveragepointofmultiplevertices - -Args: -vertices(np.ndarray,(n,2)):theverticeswewanttofindavgon - -Returns: -avg(np.ndarray,(2,)):averagepointofthevertices -""" -returnnp.sum(vertices,axis=0)/vertices.shape[0] - - -@njit(cache=True) -defindexOfFurthestPoint(vertices,d): -""" -Returntheindexofthevertexfurthestawayalongadirectioninthelistofvertices - -Args: -vertices(np.ndarray,(n,2)):theverticeswewanttofindavgon - -Returns: -idx(int):indexofthefurthestpoint -""" -returnnp.argmax(vertices.dot(d)) - - -@njit(cache=True) -defsupport(vertices1,vertices2,d): -""" -MinkowskisumsupportfunctionforGJK - -Args: -vertices1(np.ndarray,(n,2)):verticesofthefirstbody -vertices2(np.ndarray,(n,2)):verticesofthesecondbody -d(np.ndarray,(2,)):directiontofindthesupportalong - -Returns: -support(np.ndarray,(n,2)):Minkowskisum -""" -i=indexOfFurthestPoint(vertices1,d) -j=indexOfFurthestPoint(vertices2,-d) -returnvertices1[i]-vertices2[j] - - -@njit(cache=True) -defcollision(vertices1,vertices2): -""" -GJKtesttoseewhethertwobodiesoverlap - -Args: -vertices1(np.ndarray,(n,2)):verticesofthefirstbody -vertices2(np.ndarray,(n,2)):verticesofthesecondbody - -Returns: -overlap(boolean):Trueiftwobodiescollide -""" -index=0 -simplex=np.empty((3,2)) - -position1=avgPoint(vertices1) -position2=avgPoint(vertices2) - -d=position1-position2 - -ifd[0]==0andd[1]==0: -d[0]=1.0 - -a=support(vertices1,vertices2,d) -simplex[index,:]=a - -ifd.dot(a)<=0: -returnFalse - -d=-a - -iter_count=0 -whileiter_count<1e3: -a=support(vertices1,vertices2,d) -index+=1 -simplex[index,:]=a -ifd.dot(a)<=0: -returnFalse - -ao=-a - -ifindex<2: -b=simplex[0,:] -ab=b-a -d=tripleProduct(ab,ao,ab) -ifnp.linalg.norm(d)<1e-10: -d=perpendicular(ab) -continue - -b=simplex[1,:] -c=simplex[0,:] -ab=b-a -ac=c-a - -acperp=tripleProduct(ab,ac,ac) - -ifacperp.dot(ao)>=0: -d=acperp -else: -abperp=tripleProduct(ac,ab,ab) -ifabperp.dot(ao)<0: -returnTrue -simplex[0,:]=simplex[1,:] -d=abperp - -simplex[1,:]=simplex[2,:] -index-=1 - -iter_count+=1 -returnFalse - -@njit(cache=True) -defcollision_multiple(vertices): -""" -Checkpair-wisecollisionsforallprovidedvertices - -Args: -vertices(np.ndarray(num_bodies,4,2)):allverticesforcheckingpair-wisecollision - -Returns: -collisions(np.ndarray(num_vertices,)):whethereachbodyisincollision -collision_idx(np.ndarray(num_vertices,)):whichindexofotherbodyiseachindex'sbodyisincollision,-1ifnotincollision -""" -collisions=np.zeros((vertices.shape[0],)) -collision_idx=-1*np.ones((vertices.shape[0],)) -#loopingoverallpairs -foriinrange(vertices.shape[0]-1): -forjinrange(i+1,vertices.shape[0]): -#checkcollision -vi=np.ascontiguousarray(vertices[i,:,:]) -vj=np.ascontiguousarray(vertices[j,:,:]) -ij_collision=collision(vi,vj) -#fillinresults -ifij_collision: -collisions[i]=1. -collisions[j]=1. -collision_idx[i]=j -collision_idx[j]=i - -returncollisions,collision_idx - -""" -Utilityfunctionsforgettingverticesbyposeandshape -""" - -@njit(cache=True) -defget_trmtx(pose): -""" -Gettransformationmatrixofvehicleframe->globalframe - -Args: -pose(np.ndarray(3,)):currentposeofthevehicle - -return: -H(np.ndarray(4,4)):transformationmatrix -""" -x=pose[0] -y=pose[1] -th=pose[2] -cos=np.cos(th) -sin=np.sin(th) -H=np.array([[cos,-sin,0.,x],[sin,cos,0.,y],[0.,0.,1.,0.],[0.,0.,0.,1.]]) -returnH - -@njit(cache=True) -defget_vertices(pose,length,width): -""" -Utilityfunctiontoreturnverticesofthecarbodygivenposeandsize - -Args: -pose(np.ndarray,(3,)):currentworldcoordinateposeofthevehicle -length(float):carlength -width(float):carwidth - -Returns: -vertices(np.ndarray,(4,2)):cornerverticesofthevehiclebody -""" -H=get_trmtx(pose) -rl=H.dot(np.asarray([[-length/2],[width/2],[0.],[1.]])).flatten() -rr=H.dot(np.asarray([[-length/2],[-width/2],[0.],[1.]])).flatten() -fl=H.dot(np.asarray([[length/2],[width/2],[0.],[1.]])).flatten() -fr=H.dot(np.asarray([[length/2],[-width/2],[0.],[1.]])).flatten() -rl=rl/rl[3] -rr=rr/rr[3] -fl=fl/fl[3] -fr=fr/fr[3] -vertices=np.asarray([[rl[0],rl[1]],[rr[0],rr[1]],[fr[0],fr[1]],[fl[0],fl[1]]]) -returnvertices - - -""" -UnittestsforGJKcollisionchecks -Author:HongruiZheng -""" - -importtime -importunittest - -classCollisionTests(unittest.TestCase): -defsetUp(self): -#testparams -np.random.seed(1234) - -#Collisioncheckbody -self.vertices1=np.asarray([[4,11.],[5,5],[9,9],[10,10]]) - -#carsize -self.length=0.32 -self.width=0.22 - -deftest_get_vert(self): -test_pose=np.array([2.3,6.7,0.8]) -vertices=get_vertices(test_pose,self.length,self.width) -rect=np.vstack((vertices,vertices[0,:])) -importmatplotlib.pyplotasplt -plt.scatter(test_pose[0],test_pose[1],c='red') -plt.plot(rect[:,0],rect[:,1]) -plt.xlim([1,4]) -plt.ylim([5,8]) -plt.axes().set_aspect('equal') -plt.show() -self.assertTrue(vertices.shape==(4,2)) - -deftest_get_vert_fps(self): -test_pose=np.array([2.3,6.7,0.8]) -start=time.time() -for_inrange(1000): -vertices=get_vertices(test_pose,self.length,self.width) -elapsed=time.time()-start -fps=1000/elapsed -print('getverticesfps:',fps) -self.assertTrue(fps>500) - -deftest_random_collision(self): -#perturbthebodybyasmallamountandmakesureitallcollideswiththeoriginalbody -for_inrange(1000): -a=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -b=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -self.assertTrue(collision(a,b)) - -deftest_multiple_collisions(self): -a=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -b=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -c=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -d=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -e=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -f=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -g=self.vertices1+10. -allv=np.stack((a,b,c,d,e,f,g)) -collisions,collision_idx=collision_multiple(allv) -self.assertTrue(np.all(collisions==np.array([1.,1.,1.,1.,1.,1.,0.]))) -self.assertTrue(np.all(collision_idx==np.array([5.,5.,5.,5.,5.,4.,-1.]))) - -deftest_fps(self): -#alsoperturbthebodybutmainlywanttotestGJKspeed -start=time.time() -for_inrange(1000): -a=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -b=self.vertices1+np.random.normal(size=(self.vertices1.shape))/100. -collision(a,b) -elapsed=time.time()-start -fps=1000/elapsed -print('gjkfps:',fps) -self.assertTrue(fps>500) - -if__name__=='__main__': -unittest.main() - - - - diff --git a/docs/xml/combine.xslt b/docs/xml/combine.xslt deleted file mode 100644 index f0ee1fd9..00000000 --- a/docs/xml/combine.xslt +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - diff --git a/docs/xml/compound.xsd b/docs/xml/compound.xsd deleted file mode 100644 index 083df158..00000000 --- a/docs/xml/compound.xsd +++ /dev/null @@ -1,1187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/xml/dir_0d9aa0052a6017cb7aea189bf393af42.xml b/docs/xml/dir_0d9aa0052a6017cb7aea189bf393af42.xml deleted file mode 100644 index b4ec9ec5..00000000 --- a/docs/xml/dir_0d9aa0052a6017cb7aea189bf393af42.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - /home/billyzheng/f1tenth_gym/gym/f110_gym - /home/billyzheng/f1tenth_gym/gym/f110_gym/envs - /home/billyzheng/f1tenth_gym/gym/f110_gym/unittest - __init__.py - - - - - - - diff --git a/docs/xml/dir_70fc25f479e8e19f7e6bd12b95eca2dc.xml b/docs/xml/dir_70fc25f479e8e19f7e6bd12b95eca2dc.xml deleted file mode 100644 index a3bb5753..00000000 --- a/docs/xml/dir_70fc25f479e8e19f7e6bd12b95eca2dc.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - /home/billyzheng/f1tenth_gym/gym/f110_gym/unittest - __init__.py - collision_checks.py - dynamics_test.py - legacy_scan_gen.py - pyglet_test.py - pyglet_test_camera.py - random_trackgen.py - scan_sim.py - - - - - - - diff --git a/docs/xml/dir_87aab0849a7ff80b67f27d7f0ecafd88.xml b/docs/xml/dir_87aab0849a7ff80b67f27d7f0ecafd88.xml deleted file mode 100644 index c0ca9f11..00000000 --- a/docs/xml/dir_87aab0849a7ff80b67f27d7f0ecafd88.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - /home/billyzheng/f1tenth_gym/gym/f110_gym/envs - __init__.py - base_classes.py - collision_models.py - dynamic_models.py - f110_env.py - f110_env_backup.py - laser_models.py - rendering.py - - - - - - - diff --git a/docs/xml/dir_cc06cd2fc16f827f09405fcedd02c7bb.xml b/docs/xml/dir_cc06cd2fc16f827f09405fcedd02c7bb.xml deleted file mode 100644 index a8a7fb02..00000000 --- a/docs/xml/dir_cc06cd2fc16f827f09405fcedd02c7bb.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - /home/billyzheng/f1tenth_gym/gym - /home/billyzheng/f1tenth_gym/gym/f110_gym - - - - - - - diff --git a/docs/xml/dynamic__models_8py.xml b/docs/xml/dynamic__models_8py.xml deleted file mode 100644 index e0ddc6dc..00000000 --- a/docs/xml/dynamic__models_8py.xml +++ /dev/null @@ -1,441 +0,0 @@ - - - - dynamic_models.py - f110_gym::envs::dynamic_models::DynamicsTest - f110_gym::envs::dynamic_models - - - - - -#Copyright2020TechnicalUniversityofMunich,ProfessorshipofCyber-PhysicalSystems,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Redistributionanduseinsourceandbinaryforms,withorwithoutmodification,arepermittedprovidedthatthefollowingconditionsaremet: - -#1.Redistributionsofsourcecodemustretaintheabovecopyrightnotice,thislistofconditionsandthefollowingdisclaimer. - -#2.Redistributionsinbinaryformmustreproducetheabovecopyrightnotice,thislistofconditionsandthefollowingdisclaimerinthedocumentationand/orothermaterialsprovidedwiththedistribution. - -#3.Neitherthenameofthecopyrightholdernorthenamesofitscontributorsmaybeusedtoendorseorpromoteproductsderivedfromthissoftwarewithoutspecificpriorwrittenpermission. - -#THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTORS"ASIS"ANDANYEXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOFMERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALLTHECOPYRIGHTHOLDERORCONTRIBUTORSBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENTOFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,ORTORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHISSOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE. - - - -""" -Prototypeofvehicledynamicsfunctionsandclassesforsimulating2DSingle -Trackdynamicmodel -Followingtheimplementationofcommanroad'sSingleTrackDynamicsmodel -Originalimplementation:https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/ -Author:HongruiZheng -""" - -importnumpyasnp -fromnumbaimportnjit - -importunittest -importtime - -@njit(cache=True) -defaccl_constraints(vel,accl,v_switch,a_max,v_min,v_max): -""" -Accelerationconstraints,adjuststheaccelerationbasedonconstraints - -Args: -vel(float):currentvelocityofthevehicle -accl(float):unconstraintdesiredacceleration -v_switch(float):switchingvelocity(velocityatwhichtheaccelerationisnolongerabletocreatewheelspin) -a_max(float):maximumallowedacceleration -v_min(float):minimumallowedvelocity -v_max(float):maximumallowedvelocity - -Returns: -accl(float):adjustedacceleration -""" - -#positiveaccllimit -ifvel>v_switch: -pos_limit=a_max*v_switch/vel -else: -pos_limit=a_max - -#accllimitreached? -if(vel<=v_minandaccl<=0)or(vel>=v_maxandaccl>=0): -accl=0. -elifaccl<=-a_max: -accl=-a_max -elifaccl>=pos_limit: -accl=pos_limit - -returnaccl - -@njit(cache=True) -defsteering_constraint(steering_angle,steering_velocity,s_min,s_max,sv_min,sv_max): -""" -Steeringconstraints,adjuststhesteeringvelocitybasedonconstraints - -Args: -steering_angle(float):currentsteering_angleofthevehicle -steering_velocity(float):unconstraintdesiredsteering_velocity -s_min(float):minimumsteeringangle -s_max(float):maximumsteeringangle -sv_min(float):minimumsteeringvelocity -sv_max(float):maximumsteeringvelocity - -Returns: -steering_velocity(float):adjustedsteeringvelocity -""" - -#constraintsteeringvelocity -if(steering_angle<=s_minandsteering_velocity<=0)or(steering_angle>=s_maxandsteering_velocity>=0): -steering_velocity=0. -elifsteering_velocity<=sv_min: -steering_velocity=sv_min -elifsteering_velocity>=sv_max: -steering_velocity=sv_max - -returnsteering_velocity - - -@njit(cache=True) -defvehicle_dynamics_ks(x,u_init,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max): -""" -SingleTrackKinematicVehicleDynamics. - -Args: -x(numpy.ndarray(3,)):vehiclestatevector(x1,x2,x3,x4,x5) -x1:xpositioninglobalcoordinates -x2:ypositioninglobalcoordinates -x3:steeringangleoffrontwheels -x4:velocityinxdirection -x5:yawangle -u(numpy.ndarray(2,)):controlinputvector(u1,u2) -u1:steeringanglevelocityoffrontwheels -u2:longitudinalacceleration - -Returns: -f(numpy.ndarray):righthandsideofdifferentialequations -""" -#wheelbase -lwb=lf+lr - -#constraints -u=np.array([steering_constraint(x[2],u_init[0],s_min,s_max,sv_min,sv_max),accl_constraints(x[3],u_init[1],v_switch,a_max,v_min,v_max)]) - -#systemdynamics -f=np.array([x[3]*np.cos(x[4]), -x[3]*np.sin(x[4]), -u[0], -u[1], -x[3]/lwb*np.tan(x[2])]) -returnf - -@njit(cache=True) -defvehicle_dynamics_st(x,u_init,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max): -""" -SingleTrackDynamicVehicleDynamics. - -Args: -x(numpy.ndarray(3,)):vehiclestatevector(x1,x2,x3,x4,x5,x6,x7) -x1:xpositioninglobalcoordinates -x2:ypositioninglobalcoordinates -x3:steeringangleoffrontwheels -x4:velocityinxdirection -x5:yawangle -x6:yawrate -x7:slipangleatvehiclecenter -u(numpy.ndarray(2,)):controlinputvector(u1,u2) -u1:steeringanglevelocityoffrontwheels -u2:longitudinalacceleration - -Returns: -f(numpy.ndarray):righthandsideofdifferentialequations -""" - -#gravityconstantm/s^2 -g=9.81 - -#constraints -u=np.array([steering_constraint(x[2],u_init[0],s_min,s_max,sv_min,sv_max),accl_constraints(x[3],u_init[1],v_switch,a_max,v_min,v_max)]) - -#switchtokinematicmodelforsmallvelocities -ifabs(x[3])<0.1: -#wheelbase -lwb=lf+lr - -#systemdynamics -x_ks=x[0:5] -f_ks=vehicle_dynamics_ks(x_ks,u,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max) -f=np.hstack((f_ks,np.array([u[1]/lwb*np.tan(x[2])+x[3]/(lwb*np.cos(x[2])**2)*u[0], -0]))) - -else: -#systemdynamics -f=np.array([x[3]*np.cos(x[6]+x[4]), -x[3]*np.sin(x[6]+x[4]), -u[0], -u[1], -x[5], --mu*m/(x[3]*I*(lr+lf))*(lf**2*C_Sf*(g*lr-u[1]*h)+lr**2*C_Sr*(g*lf+u[1]*h))*x[5]\ -+mu*m/(I*(lr+lf))*(lr*C_Sr*(g*lf+u[1]*h)-lf*C_Sf*(g*lr-u[1]*h))*x[6]\ -+mu*m/(I*(lr+lf))*lf*C_Sf*(g*lr-u[1]*h)*x[2], -(mu/(x[3]**2*(lr+lf))*(C_Sr*(g*lf+u[1]*h)*lr-C_Sf*(g*lr-u[1]*h)*lf)-1)*x[5]\ --mu/(x[3]*(lr+lf))*(C_Sr*(g*lf+u[1]*h)+C_Sf*(g*lr-u[1]*h))*x[6]\ -+mu/(x[3]*(lr+lf))*(C_Sf*(g*lr-u[1]*h))*x[2]]) - -returnf - -@njit(cache=True) -defpid(speed,steer,current_speed,current_steer,max_sv,max_a,max_v,min_v): -""" -Basiccontrollerforspeed/steer->accl./steervel. - -Args: -speed(float):desiredinputspeed -steer(float):desiredinputsteeringangle - -Returns: -accl(float):desiredinputacceleration -sv(float):desiredinputsteeringvelocity -""" -#steering -steer_diff=steer-current_steer -ifnp.fabs(steer_diff)>1e-4: -sv=(steer_diff/np.fabs(steer_diff))*max_sv -else: -sv=0.0 - -#accl -vel_diff=speed-current_speed -#currentlyforward -ifcurrent_speed>0.: -if(vel_diff>0): -#accelerate -kp=2.0*max_a/max_v -accl=kp*vel_diff -else: -#braking -kp=2.0*max_a/(-min_v) -accl=kp*vel_diff -#currentlybackwards -else: -if(vel_diff>0): -#braking -kp=2.0*max_a/max_v -accl=kp*vel_diff -else: -#accelerating -kp=2.0*max_a/(-min_v) -accl=kp*vel_diff - -returnaccl,sv - -deffunc_KS(x,t,u,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max): -f=vehicle_dynamics_ks(x,u,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max) -returnf - -deffunc_ST(x,t,u,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max): -f=vehicle_dynamics_st(x,u,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max) -returnf - -classDynamicsTest(unittest.TestCase): -defsetUp(self): -#testparams -self.mu=1.0489 -self.C_Sf=21.92/1.0489 -self.C_Sr=21.92/1.0489 -self.lf=0.3048*3.793293 -self.lr=0.3048*4.667707 -self.h=0.3048*2.01355 -self.m=4.4482216152605/0.3048*74.91452 -self.I=4.4482216152605*0.3048*1321.416 - -#steeringconstraints -self.s_min=-1.066#minimumsteeringangle[rad] -self.s_max=1.066#maximumsteeringangle[rad] -self.sv_min=-0.4#minimumsteeringvelocity[rad/s] -self.sv_max=0.4#maximumsteeringvelocity[rad/s] - -#longitudinalconstraints -self.v_min=-13.6#minimumvelocity[m/s] -self.v_max=50.8#minimumvelocity[m/s] -self.v_switch=7.319#switchingvelocity[m/s] -self.a_max=11.5#maximumabsoluteacceleration[m/s^2] - -deftest_derivatives(self): -#groundtruthderivatives -f_ks_gt=[16.3475935934250209,0.4819314886013121,0.1500000000000000,5.1464424102339752,0.2401426578627629] -f_st_gt=[15.7213512030862397,0.0925527979719355,0.1500000000000000,5.3536773276413925,0.0529001056654038,0.6435589397748606,0.0313297971641291] - -#systemdynamics -g=9.81 -x_ks=np.array([3.9579422297936526,0.0391650102771405,0.0378491427211811,16.3546957860883566,0.0294717351052816]) -x_st=np.array([2.0233348142065677,0.0041907137716636,0.0197545248559617,15.7216236334290116,0.0025857914776859,0.0529001056654038,0.0033012170610298]) -v_delta=0.15 -acc=0.63*g -u=np.array([v_delta,acc]) - -f_ks=vehicle_dynamics_ks(x_ks,u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max) -f_st=vehicle_dynamics_st(x_st,u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max) - -start=time.time() -foriinrange(10000): -f_st=vehicle_dynamics_st(x_st,u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max) -duration=time.time()-start -avg_fps=10000/duration - -self.assertAlmostEqual(np.max(np.abs(f_ks_gt-f_ks)),0.) -self.assertAlmostEqual(np.max(np.abs(f_st_gt-f_st)),0.) -self.assertGreater(avg_fps,5000) - -deftest_zeroinit_roll(self): -fromscipy.integrateimportodeint - -#testingforzeroinitialstate,zeroinputsingularities -g=9.81 -t_start=0. -t_final=1. -delta0=0. -vel0=0. -Psi0=0. -dotPsi0=0. -beta0=0. -sy0=0. -initial_state=[0,sy0,delta0,vel0,Psi0,dotPsi0,beta0] - -x0_KS=np.array(initial_state[0:5]) -x0_ST=np.array(initial_state) - -#timevector -t=np.arange(t_start,t_final,1e-4) - -#setinput:rollingcar(velocityshouldstayconstant) -u=np.array([0.,0.]) - -#simulatesingle-trackmodel -x_roll_st=odeint(func_ST,x0_ST,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) -#simulatekinematicsingle-trackmodel -x_roll_ks=odeint(func_KS,x0_KS,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) - -self.assertTrue(all(x_roll_st[-1]==x0_ST)) -self.assertTrue(all(x_roll_ks[-1]==x0_KS)) - -deftest_zeroinit_dec(self): -fromscipy.integrateimportodeint - -#testingforzeroinitialstate,deceleratinginputsingularities -g=9.81 -t_start=0. -t_final=1. -delta0=0. -vel0=0. -Psi0=0. -dotPsi0=0. -beta0=0. -sy0=0. -initial_state=[0,sy0,delta0,vel0,Psi0,dotPsi0,beta0] - -x0_KS=np.array(initial_state[0:5]) -x0_ST=np.array(initial_state) - -#timevector -t=np.arange(t_start,t_final,1e-4) - -#setdecelinput -u=np.array([0.,-0.7*g]) - -#simulatesingle-trackmodel -x_dec_st=odeint(func_ST,x0_ST,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) -#simulatekinematicsingle-trackmodel -x_dec_ks=odeint(func_KS,x0_KS,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) - -#groundtruthforsingle-trackmodel -x_dec_st_gt=[-3.4335000000000013,0.0000000000000000,0.0000000000000000,-6.8670000000000018,0.0000000000000000,0.0000000000000000,0.0000000000000000] -#groundtruthforkinematicsingle-trackmodel -x_dec_ks_gt=[-3.4335000000000013,0.0000000000000000,0.0000000000000000,-6.8670000000000018,0.0000000000000000] - -self.assertTrue(all(abs(x_dec_st[-1]-x_dec_st_gt)<1e-2)) -self.assertTrue(all(abs(x_dec_ks[-1]-x_dec_ks_gt)<1e-2)) - -deftest_zeroinit_acc(self): -fromscipy.integrateimportodeint - -#testingforzeroinitialstate,acceleratingwithleftsteerinputsingularities -#wheelspinandvelocityshouldincreasemorewheelspinatrear -g=9.81 -t_start=0. -t_final=1. -delta0=0. -vel0=0. -Psi0=0. -dotPsi0=0. -beta0=0. -sy0=0. -initial_state=[0,sy0,delta0,vel0,Psi0,dotPsi0,beta0] - -x0_KS=np.array(initial_state[0:5]) -x0_ST=np.array(initial_state) - -#timevector -t=np.arange(t_start,t_final,1e-4) - -#setdecelinput -u=np.array([0.15,0.63*g]) - -#simulatesingle-trackmodel -x_acc_st=odeint(func_ST,x0_ST,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) -#simulatekinematicsingle-trackmodel -x_acc_ks=odeint(func_KS,x0_KS,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) - -#groundtruthforsingle-trackmodel -x_acc_st_gt=[3.0731976046859715,0.2869835398304389,0.1500000000000000,6.1802999999999999,0.1097747074946325,0.3248268063223301,0.0697547542798040] -#groundtruthforkinematicsingle-trackmodel -x_acc_ks_gt=[3.0845676868494927,0.1484249221523042,0.1500000000000000,6.1803000000000017,0.1203664469224163] - -self.assertTrue(all(abs(x_acc_st[-1]-x_acc_st_gt)<1e-2)) -self.assertTrue(all(abs(x_acc_ks[-1]-x_acc_ks_gt)<1e-2)) - -deftest_zeroinit_rollleft(self): -fromscipy.integrateimportodeint - -#testingforzeroinitialstate,rollingandsteeringleftinputsingularities -g=9.81 -t_start=0. -t_final=1. -delta0=0. -vel0=0. -Psi0=0. -dotPsi0=0. -beta0=0. -sy0=0. -initial_state=[0,sy0,delta0,vel0,Psi0,dotPsi0,beta0] - -x0_KS=np.array(initial_state[0:5]) -x0_ST=np.array(initial_state) - -#timevector -t=np.arange(t_start,t_final,1e-4) - -#setdecelinput -u=np.array([0.15,0.]) - -#simulatesingle-trackmodel -x_left_st=odeint(func_ST,x0_ST,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) -#simulatekinematicsingle-trackmodel -x_left_ks=odeint(func_KS,x0_KS,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) - -#groundtruthforsingle-trackmodel -x_left_st_gt=[0.0000000000000000,0.0000000000000000,0.1500000000000000,0.0000000000000000,0.0000000000000000,0.0000000000000000,0.0000000000000000] -#groundtruthforkinematicsingle-trackmodel -x_left_ks_gt=[0.0000000000000000,0.0000000000000000,0.1500000000000000,0.0000000000000000,0.0000000000000000] - -self.assertTrue(all(abs(x_left_st[-1]-x_left_st_gt)<1e-2)) -self.assertTrue(all(abs(x_left_ks[-1]-x_left_ks_gt)<1e-2)) - -if__name__=='__main__': -unittest.main() - - - - diff --git a/docs/xml/dynamics__test_8py.xml b/docs/xml/dynamics__test_8py.xml deleted file mode 100644 index 7ed9ed57..00000000 --- a/docs/xml/dynamics__test_8py.xml +++ /dev/null @@ -1,411 +0,0 @@ - - - - dynamics_test.py - f110_gym::unittest::dynamics_test::DynamicsTest - f110_gym::unittest::dynamics_test - - - - - -#Copyright2020TechnicalUniversityofMunich,ProfessorshipofCyber-PhysicalSystems,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Redistributionanduseinsourceandbinaryforms,withorwithoutmodification,arepermittedprovidedthatthefollowingconditionsaremet: - -#1.Redistributionsofsourcecodemustretaintheabovecopyrightnotice,thislistofconditionsandthefollowingdisclaimer. - -#2.Redistributionsinbinaryformmustreproducetheabovecopyrightnotice,thislistofconditionsandthefollowingdisclaimerinthedocumentationand/orothermaterialsprovidedwiththedistribution. - -#3.Neitherthenameofthecopyrightholdernorthenamesofitscontributorsmaybeusedtoendorseorpromoteproductsderivedfromthissoftwarewithoutspecificpriorwrittenpermission. - -#THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTORS"ASIS"ANDANYEXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOFMERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALLTHECOPYRIGHTHOLDERORCONTRIBUTORSBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENTOFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,ORTORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHISSOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE. - - - -""" -Prototypeofvehicledynamicsfunctionsandclassesforsimulating2DSingle -Trackdynamicmodel -Followingtheimplementationofcommanroad'sSingleTrackDynamicsmodel -Originalimplementation:https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/ -Author:HongruiZheng -""" - -importnumpyasnp -fromnumbaimportnjit - -importunittest -importtime - -@njit(cache=True) -defaccl_constraints(vel,accl,v_switch,a_max,v_min,v_max): -""" -Accelerationconstraints,adjuststheaccelerationbasedonconstraints - -Args: -vel(float):currentvelocityofthevehicle -accl(float):unconstraintdesiredacceleration -v_switch(float):switchingvelocity(velocityatwhichtheaccelerationisnolongerabletocreatewheelspin) -a_max(float):maximumallowedacceleration -v_min(float):minimumallowedvelocity -v_max(float):maximumallowedvelocity - -Returns: -accl(float):adjustedacceleration -""" - -#positiveaccllimit -ifvel>v_switch: -pos_limit=a_max*v_switch/vel -else: -pos_limit=a_max - -#accllimitreached? -if(vel<=v_minandaccl<=0)or(vel>=v_maxandaccl>=0): -accl=0. -elifaccl<=-a_max: -accl=-a_max -elifaccl>=pos_limit: -accl=pos_limit - -returnaccl - -@njit(cache=True) -defsteering_constraint(steering_angle,steering_velocity,s_min,s_max,sv_min,sv_max): -""" -Steeringconstraints,adjuststhesteeringvelocitybasedonconstraints - -Args: -steering_angle(float):currentsteering_angleofthevehicle -steering_velocity(float):unconstraintdesiredsteering_velocity -s_min(float):minimumsteeringangle -s_max(float):maximumsteeringangle -sv_min(float):minimumsteeringvelocity -sv_max(float):maximumsteeringvelocity - -Returns: -steering_velocity(float):adjustedsteeringvelocity -""" - -#constraintsteeringvelocity -if(steering_angle<=s_minandsteering_velocity<=0)or(steering_angle>=s_maxandsteering_velocity>=0): -steering_velocity=0. -elifsteering_velocity<=sv_min: -steering_velocity=sv_min -elifsteering_velocity>=sv_max: -steering_velocity=sv_max - -returnsteering_velocity - - -@njit(cache=True) -defvehicle_dynamics_ks(x,u_init,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max): -""" -SingleTrackKinematicVehicleDynamics. - -Args: -x(numpy.ndarray(3,)):vehiclestatevector(x1,x2,x3,x4,x5) -x1:xpositioninglobalcoordinates -x2:ypositioninglobalcoordinates -x3:steeringangleoffrontwheels -x4:velocityinxdirection -x5:yawangle -u(numpy.ndarray(2,)):controlinputvector(u1,u2) -u1:steeringanglevelocityoffrontwheels -u2:longitudinalacceleration - -Returns: -f(numpy.ndarray):righthandsideofdifferentialequations -""" -#wheelbase -lwb=lf+lr - -#constraints -u=np.array([steering_constraint(x[2],u_init[0],s_min,s_max,sv_min,sv_max),accl_constraints(x[3],u_init[1],v_switch,a_max,v_min,v_max)]) - -#systemdynamics -f=np.array([x[3]*np.cos(x[4]), -x[3]*np.sin(x[4]), -u[0], -u[1], -x[3]/lwb*np.tan(x[2])]) -returnf - -@njit(cache=True) -defvehicle_dynamics_st(x,u_init,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max): -""" -SingleTrackDynamicVehicleDynamics. - -Args: -x(numpy.ndarray(3,)):vehiclestatevector(x1,x2,x3,x4,x5,x6,x7) -x1:xpositioninglobalcoordinates -x2:ypositioninglobalcoordinates -x3:steeringangleoffrontwheels -x4:velocityinxdirection -x5:yawangle -x6:yawrate -x7:slipangleatvehiclecenter -u(numpy.ndarray(2,)):controlinputvector(u1,u2) -u1:steeringanglevelocityoffrontwheels -u2:longitudinalacceleration - -Returns: -f(numpy.ndarray):righthandsideofdifferentialequations -""" - -#gravityconstantm/s^2 -g=9.81 - -#constraints -u=np.array([steering_constraint(x[2],u_init[0],s_min,s_max,sv_min,sv_max),accl_constraints(x[3],u_init[1],v_switch,a_max,v_min,v_max)]) - -#switchtokinematicmodelforsmallvelocities -ifabs(x[3])<0.1: -#wheelbase -lwb=lf+lr - -#systemdynamics -x_ks=x[0:5] -f_ks=vehicle_dynamics_ks(x_ks,u,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max) -f=np.hstack((f_ks,np.array([u[1]/lwb*np.tan(x[2])+x[3]/(lwb*np.cos(x[2])**2)*u[0], -0]))) - -else: -#systemdynamics -f=np.array([x[3]*np.cos(x[6]+x[4]), -x[3]*np.sin(x[6]+x[4]), -u[0], -u[1], -x[5], --mu*m/(x[3]*I*(lr+lf))*(lf**2*C_Sf*(g*lr-u[1]*h)+lr**2*C_Sr*(g*lf+u[1]*h))*x[5]\ -+mu*m/(I*(lr+lf))*(lr*C_Sr*(g*lf+u[1]*h)-lf*C_Sf*(g*lr-u[1]*h))*x[6]\ -+mu*m/(I*(lr+lf))*lf*C_Sf*(g*lr-u[1]*h)*x[2], -(mu/(x[3]**2*(lr+lf))*(C_Sr*(g*lf+u[1]*h)*lr-C_Sf*(g*lr-u[1]*h)*lf)-1)*x[5]\ --mu/(x[3]*(lr+lf))*(C_Sr*(g*lf+u[1]*h)+C_Sf*(g*lr-u[1]*h))*x[6]\ -+mu/(x[3]*(lr+lf))*(C_Sf*(g*lr-u[1]*h))*x[2]]) - -returnf - -@njit(cache=True) -defpid(speed,steer): -""" -Basiccontrollerforspeed/steer->accl./steervel. - -Args: -speed(float):desiredinputspeed -steer(float):desiredinputsteeringangle - -Returns: -accl(float):desiredinputacceleration -sv(float):desiredinputsteeringvelocity -""" -return - -deffunc_KS(x,t,u,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max): -f=vehicle_dynamics_ks(x,u,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max) -returnf - -deffunc_ST(x,t,u,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max): -f=vehicle_dynamics_st(x,u,mu,C_Sf,C_Sr,lf,lr,h,m,I,s_min,s_max,sv_min,sv_max,v_switch,a_max,v_min,v_max) -returnf - -classDynamicsTest(unittest.TestCase): -defsetUp(self): -#testparams -self.mu=1.0489 -self.C_Sf=21.92/1.0489 -self.C_Sr=21.92/1.0489 -self.lf=0.3048*3.793293 -self.lr=0.3048*4.667707 -self.h=0.3048*2.01355 -self.m=4.4482216152605/0.3048*74.91452 -self.I=4.4482216152605*0.3048*1321.416 - -#steeringconstraints -self.s_min=-1.066#minimumsteeringangle[rad] -self.s_max=1.066#maximumsteeringangle[rad] -self.sv_min=-0.4#minimumsteeringvelocity[rad/s] -self.sv_max=0.4#maximumsteeringvelocity[rad/s] - -#longitudinalconstraints -self.v_min=-13.6#minimumvelocity[m/s] -self.v_max=50.8#minimumvelocity[m/s] -self.v_switch=7.319#switchingvelocity[m/s] -self.a_max=11.5#maximumabsoluteacceleration[m/s^2] - -deftest_derivatives(self): -#groundtruthderivatives -f_ks_gt=[16.3475935934250209,0.4819314886013121,0.1500000000000000,5.1464424102339752,0.2401426578627629] -f_st_gt=[15.7213512030862397,0.0925527979719355,0.1500000000000000,5.3536773276413925,0.0529001056654038,0.6435589397748606,0.0313297971641291] - -#systemdynamics -g=9.81 -x_ks=np.array([3.9579422297936526,0.0391650102771405,0.0378491427211811,16.3546957860883566,0.0294717351052816]) -x_st=np.array([2.0233348142065677,0.0041907137716636,0.0197545248559617,15.7216236334290116,0.0025857914776859,0.0529001056654038,0.0033012170610298]) -v_delta=0.15 -acc=0.63*g -u=np.array([v_delta,acc]) - -f_ks=vehicle_dynamics_ks(x_ks,u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max) -f_st=vehicle_dynamics_st(x_st,u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max) - -start=time.time() -foriinrange(10000): -f_st=vehicle_dynamics_st(x_st,u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max) -duration=time.time()-start -avg_fps=10000/duration - -self.assertAlmostEqual(np.max(np.abs(f_ks_gt-f_ks)),0.) -self.assertAlmostEqual(np.max(np.abs(f_st_gt-f_st)),0.) -self.assertGreater(avg_fps,5000) - -deftest_zeroinit_roll(self): -fromscipy.integrateimportodeint - -#testingforzeroinitialstate,zeroinputsingularities -g=9.81 -t_start=0. -t_final=1. -delta0=0. -vel0=0. -Psi0=0. -dotPsi0=0. -beta0=0. -sy0=0. -initial_state=[0,sy0,delta0,vel0,Psi0,dotPsi0,beta0] - -x0_KS=np.array(initial_state[0:5]) -x0_ST=np.array(initial_state) - -#timevector -t=np.arange(t_start,t_final,1e-4) - -#setinput:rollingcar(velocityshouldstayconstant) -u=np.array([0.,0.]) - -#simulatesingle-trackmodel -x_roll_st=odeint(func_ST,x0_ST,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) -#simulatekinematicsingle-trackmodel -x_roll_ks=odeint(func_KS,x0_KS,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) - -self.assertTrue(all(x_roll_st[-1]==x0_ST)) -self.assertTrue(all(x_roll_ks[-1]==x0_KS)) - -deftest_zeroinit_dec(self): -fromscipy.integrateimportodeint - -#testingforzeroinitialstate,deceleratinginputsingularities -g=9.81 -t_start=0. -t_final=1. -delta0=0. -vel0=0. -Psi0=0. -dotPsi0=0. -beta0=0. -sy0=0. -initial_state=[0,sy0,delta0,vel0,Psi0,dotPsi0,beta0] - -x0_KS=np.array(initial_state[0:5]) -x0_ST=np.array(initial_state) - -#timevector -t=np.arange(t_start,t_final,1e-4) - -#setdecelinput -u=np.array([0.,-0.7*g]) - -#simulatesingle-trackmodel -x_dec_st=odeint(func_ST,x0_ST,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) -#simulatekinematicsingle-trackmodel -x_dec_ks=odeint(func_KS,x0_KS,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) - -#groundtruthforsingle-trackmodel -x_dec_st_gt=[-3.4335000000000013,0.0000000000000000,0.0000000000000000,-6.8670000000000018,0.0000000000000000,0.0000000000000000,0.0000000000000000] -#groundtruthforkinematicsingle-trackmodel -x_dec_ks_gt=[-3.4335000000000013,0.0000000000000000,0.0000000000000000,-6.8670000000000018,0.0000000000000000] - -self.assertTrue(all(abs(x_dec_st[-1]-x_dec_st_gt)<1e-2)) -self.assertTrue(all(abs(x_dec_ks[-1]-x_dec_ks_gt)<1e-2)) - -deftest_zeroinit_acc(self): -fromscipy.integrateimportodeint - -#testingforzeroinitialstate,acceleratingwithleftsteerinputsingularities -#wheelspinandvelocityshouldincreasemorewheelspinatrear -g=9.81 -t_start=0. -t_final=1. -delta0=0. -vel0=0. -Psi0=0. -dotPsi0=0. -beta0=0. -sy0=0. -initial_state=[0,sy0,delta0,vel0,Psi0,dotPsi0,beta0] - -x0_KS=np.array(initial_state[0:5]) -x0_ST=np.array(initial_state) - -#timevector -t=np.arange(t_start,t_final,1e-4) - -#setdecelinput -u=np.array([0.15,0.63*g]) - -#simulatesingle-trackmodel -x_acc_st=odeint(func_ST,x0_ST,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) -#simulatekinematicsingle-trackmodel -x_acc_ks=odeint(func_KS,x0_KS,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) - -#groundtruthforsingle-trackmodel -x_acc_st_gt=[3.0731976046859715,0.2869835398304389,0.1500000000000000,6.1802999999999999,0.1097747074946325,0.3248268063223301,0.0697547542798040] -#groundtruthforkinematicsingle-trackmodel -x_acc_ks_gt=[3.0845676868494927,0.1484249221523042,0.1500000000000000,6.1803000000000017,0.1203664469224163] - -self.assertTrue(all(abs(x_acc_st[-1]-x_acc_st_gt)<1e-2)) -self.assertTrue(all(abs(x_acc_ks[-1]-x_acc_ks_gt)<1e-2)) - -deftest_zeroinit_rollleft(self): -fromscipy.integrateimportodeint - -#testingforzeroinitialstate,rollingandsteeringleftinputsingularities -g=9.81 -t_start=0. -t_final=1. -delta0=0. -vel0=0. -Psi0=0. -dotPsi0=0. -beta0=0. -sy0=0. -initial_state=[0,sy0,delta0,vel0,Psi0,dotPsi0,beta0] - -x0_KS=np.array(initial_state[0:5]) -x0_ST=np.array(initial_state) - -#timevector -t=np.arange(t_start,t_final,1e-4) - -#setdecelinput -u=np.array([0.15,0.]) - -#simulatesingle-trackmodel -x_left_st=odeint(func_ST,x0_ST,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) -#simulatekinematicsingle-trackmodel -x_left_ks=odeint(func_KS,x0_KS,t,args=(u,self.mu,self.C_Sf,self.C_Sr,self.lf,self.lr,self.h,self.m,self.I,self.s_min,self.s_max,self.sv_min,self.sv_max,self.v_switch,self.a_max,self.v_min,self.v_max)) - -#groundtruthforsingle-trackmodel -x_left_st_gt=[0.0000000000000000,0.0000000000000000,0.1500000000000000,0.0000000000000000,0.0000000000000000,0.0000000000000000,0.0000000000000000] -#groundtruthforkinematicsingle-trackmodel -x_left_ks_gt=[0.0000000000000000,0.0000000000000000,0.1500000000000000,0.0000000000000000,0.0000000000000000] - -self.assertTrue(all(abs(x_left_st[-1]-x_left_st_gt)<1e-2)) -self.assertTrue(all(abs(x_left_ks[-1]-x_left_ks_gt)<1e-2)) - -if__name__=='__main__': -unittest.main() - - - - diff --git a/docs/xml/envs_2____init_____8py.xml b/docs/xml/envs_2____init_____8py.xml deleted file mode 100644 index f379fa78..00000000 --- a/docs/xml/envs_2____init_____8py.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - __init__.py - f110_gym::envs - - - - - -fromf110_gym.envs.f110_envimportF110Env -fromf110_gym.envs.dynamic_modelsimport* -fromf110_gym.envs.laser_modelsimport* -fromf110_gym.envs.base_classesimport* -fromf110_gym.envs.collision_modelsimport* - - - - diff --git a/docs/xml/f110__env_8py.xml b/docs/xml/f110__env_8py.xml deleted file mode 100644 index 666383d3..00000000 --- a/docs/xml/f110__env_8py.xml +++ /dev/null @@ -1,380 +0,0 @@ - - - - f110_env.py - f110_gym::envs::f110_env::F110Env - f110_gym::envs::f110_env - - - - - -#MITLicense - -#Copyright(c)2020JosephAuckley,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy -#ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal -#intheSoftwarewithoutrestriction,includingwithoutlimitationtherights -#touse,copy,modify,merge,publish,distribute,sublicense,and/orsell -#copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis -#furnishedtodoso,subjecttothefollowingconditions: - -#Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall -#copiesorsubstantialportionsoftheSoftware. - -#THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR -#IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY, -#FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE -#AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER -#LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM, -#OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE -#SOFTWARE. - -''' -Author:HongruiZheng -''' - -#gymimports -importgym -fromgymimporterror,spaces,utils -fromgym.utilsimportseeding - -#baseclasses -fromf110_gym.envs.base_classesimportSimulator - -#others -importnumpyasnp -importos -importtime - -#gl -importpyglet -pyglet.options['debug_gl']=False -frompygletimportgl - -#constants - -#rendering -VIDEO_W=600 -VIDEO_H=400 -WINDOW_W=1000 -WINDOW_H=800 - -classF110Env(gym.Env,utils.EzPickle): -""" -OpenAIgymenvironmentforF1TENTH - -Envshouldbeinitializedbycallinggym.make('f110_gym:f110-v0',**kwargs) - -Args: -kwargs: -seed(int):seedforrandomstateandreproducibility - -map(str,default='vegas'):nameofthemapusedfortheenvironment.Currently,availableenvironmentsinclude:'berlin','vegas','skirk'.Youcoulduseastringoftheabsolutepathtotheyamlfileofyourcustommap. - -map_ext(str,default='png'):imageextensionofthemapimagefile.Forexample'png','pgm' - -params(dict,default={'mu':1.0489,'C_Sf':,'C_Sr':,'lf':0.15875,'lr':0.17145,'h':0.074,'m':3.74,'I':0.04712,'s_min':-0.4189,'s_max':0.4189,'sv_min':-3.2,'sv_max':3.2,'v_switch':7.319,'a_max':9.51,'v_min':-5.0,'v_max':20.0,'width':0.31,'length':0.58}):dictionaryofvehicleparameters. -mu:surfacefrictioncoefficient -C_Sf:Corneringstiffnesscoefficient,front -C_Sr:Corneringstiffnesscoefficient,rear -lf:Distancefromcenterofgravitytofrontaxle -lr:Distancefromcenterofgravitytorearaxle -h:Heightofcenterofgravity -m:Totalmassofthevehicle -I:Momentofinertialoftheentirevehicleaboutthezaxis -s_min:Minimumsteeringangleconstraint -s_max:Maximumsteeringangleconstraint -sv_min:Minimumsteeringvelocityconstraint -sv_max:Maximumsteeringvelocityconstraint -v_switch:Switchingvelocity(velocityatwhichtheaccelerationisnolongerabletocreatewheelspin) -a_max:Maximumlongitudinalacceleration -v_min:Minimumlongitudinalvelocity -v_max:Maximumlongitudinalvelocity -width:widthofthevehicleinmeters -length:lengthofthevehicleinmeters - -num_agents(int,default=2):numberofagentsintheenvironment - -timestep(float,default=0.01):physicstimestep - -ego_idx(int,default=0):ego'sindexinlistofagents -""" -metadata={'render.modes':['human','human_fast']} - -def__init__(self,**kwargs): -#kwargsextraction -try: -np.random.seed(kwargs['seed']) -except: -pass -try: -self.map_name=kwargs['map'] -#differentdefaultmaps -ifself.map_name=='berlin': -self.map_path=os.path.dirname(os.path.abspath(__file__))+'/maps/berlin.yaml' -elifself.map_name=='skirk': -self.map_path=os.path.dirname(os.path.abspath(__file__))+'/maps/skirk.yaml' -elifself.map_name=='levine': -self.map_path=os.path.dirname(os.path.abspath(__file__))+'/maps/levine.yaml' -else: -self.map_path=self.map_name+'.yaml' -except: -self.map_path=os.path.dirname(os.path.abspath(__file__))+'/maps/vegas.yaml' - -try: -self.map_ext=kwargs['map_ext'] -except: -self.map_ext='.png' - -try: -self.params=kwargs['params'] -except: -self.params={'mu':1.0489,'C_Sf':4.718,'C_Sr':5.4562,'lf':0.15875,'lr':0.17145,'h':0.074,'m':3.74,'I':0.04712,'s_min':-0.4189,'s_max':0.4189,'sv_min':-3.2,'sv_max':3.2,'v_switch':7.319,'a_max':9.51,'v_min':-5.0,'v_max':20.0,'width':0.31,'length':0.58} - -#simulationparameters -try: -self.num_agents=kwargs['num_agents'] -except: -self.num_agents=2 - -try: -self.timestep=kwargs['timestep'] -except: -self.timestep=0.01 - -#defaultegoindex -try: -self.ego_idx=kwargs['ego_idx'] -except: -self.ego_idx=0 - -#radiustoconsiderdone -self.start_thresh=0.5#10cm - -#envstates -self.poses_x=[] -self.poses_y=[] -self.poses_theta=[] -self.collisions=np.zeros((self.num_agents,)) -#TODO:collision_idxnotusedyet -#self.collision_idx=-1*np.ones((self.num_agents,)) - -#loopcompletion -self.near_start=True -self.num_toggles=0 - -#raceinfo -self.lap_times=np.zeros((self.num_agents,)) -self.lap_counts=np.zeros((self.num_agents,)) -self.current_time=0.0 - -#finishlineinfo -self.num_toggles=0 -self.near_start=True -self.near_starts=np.array([True]*self.num_agents) -self.toggle_list=np.zeros((self.num_agents,)) -self.start_xs=np.zeros((self.num_agents,)) -self.start_ys=np.zeros((self.num_agents,)) -self.start_thetas=np.zeros((self.num_agents,)) -self.start_rot=np.eye(2) - -#initiatestuff -self.sim=Simulator(self.params,self.num_agents) -self.sim.set_map(self.map_path,self.map_ext) - -#rendering -self.renderer=None -self.current_obs=None - -def__del__(self): -""" -Finalizer,doescleanup -""" -pass - -def_check_done(self): -""" -Checkifthecurrentrolloutisdone - -Args: -None - -Returns: -done(bool):whethertherolloutisdone -toggle_list(list[int]):eachagent'stogglelistforcrossingthefinishzone -""" - -#thisisassuming2agents -#TODO:switchtomaybes-based -left_t=2 -right_t=2 - -poses_x=np.array(self.poses_x)-self.start_xs -poses_y=np.array(self.poses_y)-self.start_ys -delta_pt=np.dot(self.start_rot,np.stack((poses_x,poses_y),axis=0)) -temp_y=delta_pt[1,:] -idx1=temp_y>left_t -idx2=temp_y<-right_t -temp_y[idx1]-=left_t -temp_y[idx2]=-right_t-temp_y[idx2] -temp_y[np.invert(np.logical_or(idx1,idx2))]=0 - -dist2=delta_pt[0,:]**2+temp_y**2 -closes=dist2<=0.1 -foriinrange(self.num_agents): -ifcloses[i]andnotself.near_starts[i]: -self.near_starts[i]=True -self.toggle_list[i]+=1 -elifnotcloses[i]andself.near_starts[i]: -self.near_starts[i]=False -self.toggle_list[i]+=1 -self.lap_counts[i]=self.toggle_list[i]//2 -ifself.toggle_list[i]<4: -self.lap_times[i]=self.current_time - -done=(self.collisions[self.ego_idx])ornp.all(self.toggle_list>=4) - -returndone,self.toggle_list>=4 - -def_update_state(self,obs_dict): -""" -Updatetheenv'sstatesaccordingtoobservations - -Args: -obs_dict(dict):dictionaryofobservation - -Returns: -None -""" -self.poses_x=obs_dict['poses_x'] -self.poses_y=obs_dict['poses_y'] -self.poses_theta=obs_dict['poses_theta'] -self.collisions=obs_dict['collisions'] - -defstep(self,action): -""" -Stepfunctionforthegymenv - -Args: -action(np.ndarray(num_agents,2)) - -Returns: -obs(dict):observationofthecurrentstep -reward(float,default=self.timestep):stepreward,currentlyisphysicstimestep -done(bool):ifthesimulationisdone -info(dict):auxillaryinformationdictionary -""" - -#callsimulationstep -obs=self.sim.step(action) -obs['lap_times']=self.lap_times -obs['lap_counts']=self.lap_counts - -self.current_obs=obs - -#times -reward=self.timestep -self.current_time=self.current_time+self.timestep - -#updatedatamember -self._update_state(obs) - -#checkdone -done,toggle_list=self._check_done() -info={'checkpoint_done':toggle_list} - -returnobs,reward,done,info - -defreset(self,poses): -""" -Resetthegymenvironmentbygivenposes - -Args: -poses(np.ndarray(num_agents,3)):posestoresetagentsto - -Returns: -obs(dict):observationofthecurrentstep -reward(float,default=self.timestep):stepreward,currentlyisphysicstimestep -done(bool):ifthesimulationisdone -info(dict):auxillaryinformationdictionary -""" -#resetcountersanddatamembers -self.current_time=0.0 -self.collisions=np.zeros((self.num_agents,)) -self.num_toggles=0 -self.near_start=True -self.near_starts=np.array([True]*self.num_agents) -self.toggle_list=np.zeros((self.num_agents,)) - -#statesafterreset -self.start_xs=poses[:,0] -self.start_ys=poses[:,1] -self.start_thetas=poses[:,2] -self.start_rot=np.array([[np.cos(-self.start_thetas[self.ego_idx]),-np.sin(-self.start_thetas[self.ego_idx])],[np.sin(-self.start_thetas[self.ego_idx]),np.cos(-self.start_thetas[self.ego_idx])]]) - -#callresettosimulator -self.sim.reset(poses) - -#getnoinputobservations -action=np.zeros((self.num_agents,2)) -obs,reward,done,info=self.step(action) -returnobs,reward,done,info - -defupdate_map(self,map_path,map_ext): -""" -Updatesthemapusedbysimulation - -Args: -map_path(str):absolutepathtothemapyamlfile -map_ext(str):extensionofthemapimagefile - -Returns: -None -""" -self.sim.set_map(map_path,map_ext) - -defupdate_params(self,params,index=-1): -""" -Updatestheparametersusedbysimulationforvehicles - -Args: -params(dict):dictionaryofparameters -index(int,default=-1):if>=0thenonlyupdateaspecificagent'sparams - -Returns: -None -""" -self.sim.update_params(params,agent_idx=index) - -defrender(self,mode='human'): -""" -Renderstheenvironmentwithpyglet.Usemousescrollinthewindowtozoomin/out,usemouseclickdragtopan.Showstheagents,themap,currentfps(bottomleftcorner),andtheraceinformationnearastext. - -Args: -mode(str,default='human'):renderingmode,currentlysupports: -'human':sloweddownrenderingsuchthattheenvisrenderedinawaythatsimtimeelapsedisclosetorealtimeelapsed -'human_fast':renderasfastaspossible - -Returns: -None -""" -assertmodein['human','human_fast'] -ifself.rendererisNone: -#firstcall,initializeeverything -fromf110_gym.envs.renderingimportEnvRenderer -self.renderer=EnvRenderer(WINDOW_W,WINDOW_H) -self.renderer.update_map(self.map_name,self.map_ext) -self.renderer.update_obs(self.current_obs) -self.renderer.dispatch_events() -self.renderer.on_draw() -self.renderer.flip() -ifmode=='human': -time.sleep(0.005) -elifmode=='human_fast': -pass - - - - diff --git a/docs/xml/f110__env__backup_8py.xml b/docs/xml/f110__env__backup_8py.xml deleted file mode 100644 index 7b59ab6e..00000000 --- a/docs/xml/f110__env__backup_8py.xml +++ /dev/null @@ -1,602 +0,0 @@ - - - - f110_env_backup.py - f110_gym::envs::f110_env_backup::F110Env - f110_gym::envs::f110_env_backup - - - - - -#MITLicense - -#Copyright(c)2020JosephAuckley,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy -#ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal -#intheSoftwarewithoutrestriction,includingwithoutlimitationtherights -#touse,copy,modify,merge,publish,distribute,sublicense,and/orsell -#copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis -#furnishedtodoso,subjecttothefollowingconditions: - -#Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall -#copiesorsubstantialportionsoftheSoftware. - -#THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR -#IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY, -#FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE -#AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER -#LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM, -#OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE -#SOFTWARE. - -''' -Author:HongruiZheng -''' - -#gymimports -importgym -fromgymimporterror,spaces,utils -fromgym.utilsimportseeding - -#zmqimports -importzmq - -#protobufimport -importsim_requests_pb2 - -#others -importnumpyasnp - -fromnumbaimportnjit -fromscipy.ndimageimportdistance_transform_edtasedt - -fromPILimportImage -importsys -importos -importsignal -importsubprocess -importmath -importyaml -importcsv - -#frommatplotlib.pyplotimportimshow -#importmatplotlib.pyplotasplt - -classF110Env(gym.Env,utils.EzPickle): -""" -OpenAIgymenvironmentforF1/10simulator -Use0mq'sREQ-REPpatterntocommunicatetotheC++simulator -ONEenvhasONEcorrespondingC++instance -Needtocreateenvwithmapinput,fullpathtomapyamlfile,mappgmimageandyamlshouldbeinsamedirectory - -shouldbeinitializedwithamap,atimestep,andnumberofagents -""" -metadata={'render.modes':[]} - -def__init__(self): -#simualtorparams -self.params_set=False -self.map_inited=False -#paramslistis[mu,h_cg,l_r,cs_f,cs_r,I_z,mass] -self.params=[] -#TODO:addmultiagentstuff,needa_add_agentfunctionofsth -self.num_agents=2 -self.timestep=0.01 - -#TODO:cleanupthemappathstuff,rightnowit'sainit_mapfunction -self.map_path=None -self.map_img=None - -#current_dir=os.path.dirname(os.path.abspath(__file__)) -#map_path=current_dir+'/../../../maps/levine.yaml' - -#default -self.ego_idx=0 - -#TODO:alsosetthesethingsininitfunction? -self.timeout=120.0 -#radiustoconsiderdone -self.start_thresh=0.5#10cm - -#envstates -#moreaccuratedescriptionshouldbeegocarstate -#mightnotneedtokeepscan -self.x=None -self.y=None -self.theta=None - -self.in_collision=False -self.collision_angle=None - -#loopcompletion -self.near_start=True -self.num_toggles=0 - -#raceinfo -self.lap_times=[0.0,0.0] -self.lap_counts=[0,0] - -#TODO:loadthemap(sameasROS.yamlformat) -#ifnotmap_path.endswith('.yaml'): -#print('Gymenv-Pleaseuseayamlfileformapinput.') -#sys.exit() -#loadmapimg -#map_img_path='levine.png' -#self.map_img=cv2.imread(map_img_path,0) -#self.map_img=cv2.flip(self.map_img,0) -#self.map_img=np.array(Image.open(map_img_path).transpose(Image.FLIP_TOP_BOTTOM)) -#self.map_img=self.map_img.astype(np.float64) -#self.map_img=self.map_img[::-1] -#self.map_img=np.dot(self.map_img[...,:3],[0.29,0.57,0.14]) -#plt.imshow(self.map_img) -#plt.show() - -#mapmetadata -#self.map_height=self.map_img.shape[0] -#self.map_width=self.map_img.shape[1] -self.map_height=0.0 -self.map_width=0.0 -self.map_resolution=0.0 -self.free_thresh=0.0 -self.origin=[] -#loadmapmetadata -#withopen(map_path,'r')asyaml_stream: -#try: -#map_metadata=yaml.safe_load(yaml_stream) -#self.map_resolution=map_metadata['resolution'] -#self.origin=map_metadata['origin'] -##print(self.origin) -##self.free_thresh????? -#exceptyaml.YAMLErrorasex: -#print(ex) - -#createzmqstuff -#portnumberrangefrom6666-6766 -#max100triestoconnect/bind -tries=0 -max_tries=100 -min_port=6666 -self.port=min_port -self.context=zmq.Context() -self.socket=self.context.socket(zmq.PAIR) -whiletries<max_tries: -try: -self.socket.bind('tcp://*:%s'%str(min_port+tries)) -#self.socket.connect('tcp://localhost:6666') -self.port=min_port+tries -break -except: -tries=tries+1 -#print('Gymenv-retryingfor'+str(tries)+'times') - -print('Gymenv-Connectedenvtoport:'+str(self.port)) - -#createcppinstanceifcreatethenneedtopassportnumber -#subprocesscallassumesdirectorystructure -#initsimwitharguments:[extimestepnum_agentsport_num] -#TODO:includeothercarparamsinargument -#args=['../build/sim_server',str(self.timestep),str(self.num_agents),str(self.port)] -#self.sim_p=subprocess.Popen(args) -self.sim_p=None - -#print('Gymenv-envcreated,waitingforparams...') - -def__del__(self): -""" -Finalizer,doescleanup -""" -ifself.sim_pisNone: -pass -else: -os.kill(self.sim_p.pid,signal.SIGTERM) -#print('Gymenv-Simchildprocesskilled.') - -def_start_executable(self,path): -mu=self.params[0] -h_cg=self.params[1] -l_r=self.params[2] -cs_f=self.params[3] -cs_r=self.params[4] -I_z=self.params[5] -mass=self.params[6] -args=[path+'sim_server',str(self.timestep),str(self.num_agents),str(self.port),str(mu),str(h_cg),str(l_r),str(cs_f),str(cs_r),str(I_z),str(mass)] -self.sim_p=subprocess.Popen(args) - -def_set_map(self): -""" -Setsthemapforthesimulatorinstance -""" -ifnotself.map_inited: -print('Gymenv-Simmapnotinitialized,callenv.init_map()toinitmap.') -#createandfillinprotobuf -map_request_proto=sim_requests_pb2.SimRequest() -map_request_proto.type=1 -map_request_proto.map_request.map.extend((1.-self.map_img/255.).flatten().tolist()) -map_request_proto.map_request.origin_x=self.origin[0] -map_request_proto.map_request.origin_y=self.origin[1] -map_request_proto.map_request.map_resolution=self.map_resolution -#TODO:doublecheckifthisvalueisvalid -map_request_proto.map_request.free_threshold=self.free_thresh -map_request_proto.map_request.map_height=self.map_height -map_request_proto.map_request.map_width=self.map_width -#serialization -map_request_string=map_request_proto.SerializeToString() -#sendsetmaprequest -#print('Gymenv-Sendingsetmaprequest...') -self.socket.send(map_request_string) -#print('Gymenv-Maprequestsent.') -#receiveresponsefromsiminstance -sim_response_string=self.socket.recv() -#parsemapresponseproto -sim_response_proto=sim_requests_pb2.SimResponse() -sim_response_proto.ParseFromString(sim_response_string) -#getresults -set_map_result=sim_response_proto.map_result.result -ifset_map_result==1: -print('Gymenv-Setmapfailed,exiting...') -sys.exit() - -def_check_done(self): -""" -Checkiftheepisodeisdone -Thisisintermsoftheegocar -Forourcase,whetherthecarendsupcloseenoughtothestartingpoint -Andifaccumulatedtimeisoverthetimeout -returntrueifdone,falseifnot -Thisassumesstartisalways(0,0) - -""" -#TODO:startnotalways0,0 -#dist_to_start=math.sqrt((self.x-self.start_x)**2+(self.y-self.start_y)**2) -left_t=2 -right_t=2 -timeout=self.current_time>=self.timeout -ifself.double_finish: -poses_x=np.array(self.all_x)-self.start_xs -poses_y=np.array(self.all_y)-self.start_ys -delta_pt=np.dot(self.start_rot,np.stack((poses_x,poses_y),axis=0)) -temp_y=delta_pt[1,:] -idx1=temp_y>left_t -idx2=temp_y<-right_t -temp_y[idx1]-=left_t -temp_y[idx2]=-right_t-temp_y[idx2] -temp_y[np.invert(np.logical_or(idx1,idx2))]=0 - -dist2=delta_pt[0,:]**2+temp_y**2 -closes=dist2<=0.1 -foriinrange(self.num_agents): -ifcloses[i]andnotself.near_starts[i]: -self.near_starts[i]=True -self.toggle_list[i]+=1 -elifnotcloses[i]andself.near_starts[i]: -self.near_starts[i]=False -self.toggle_list[i]+=1 -done=(self.in_collision|(timeout)|np.all(self.toggle_list>=4)) -#onlyfortwocarsatm -self.lap_counts[0]=np.floor(self.toggle_list[0]/2) -self.lap_counts[1]=np.floor(self.toggle_list[1]/2) -ifself.toggle_list[0]<4: -self.lap_times[0]=self.current_time -ifself.toggle_list[1]<4: -self.lap_times[1]=self.current_time -returndone,self.toggle_list>=4 - -delta_pt=np.dot(self.start_rot,np.array([self.x-self.start_x,self.y-self.start_y])) -ifdelta_pt[1]>left_t:#left -temp_y=delta_pt[1]-left_t -elifdelta_pt[1]<-right_t:#right -temp_y=-right_t-delta_pt[1] -else: -temp_y=0 -dist2=delta_pt[0]**2+temp_y**2 -close=dist2<=0.1 -#close=dist_to_start<=self.start_thresh -ifcloseandnotself.near_start: -self.near_start=True -self.num_toggles+=1 -elifnotcloseandself.near_start: -self.near_start=False -self.num_toggles+=1 -done=(self.in_collision|(timeout)|(self.num_toggles>=4)) -returndone - -def_check_passed(self): -""" -Returnsthetimesthattheegocarovertooktheothercar -""" -return0 - -def_update_state(self,obs_dict): -""" -Updatetheenv'sstatesaccordingtoobservations -obsisobservationdictionary -""" -self.x=obs_dict['poses_x'][obs_dict['ego_idx']] -self.y=obs_dict['poses_y'][obs_dict['ego_idx']] -ifself.double_finish: -self.all_x=obs_dict['poses_x'] -self.all_y=obs_dict['poses_y'] - -self.theta=obs_dict['poses_theta'][obs_dict['ego_idx']] -self.in_collision=obs_dict['collisions'][obs_dict['ego_idx']] -self.collision_angle=obs_dict['collision_angles'][obs_dict['ego_idx']] - -#TODO:dowedotheraycastinghereorinC++? -#ifspeedisaconcerndoitinC++? -#numbashouldn'tbeadependencyofgymenv -def_raycast_opponents(self,obs_dict): -#findtheangleofbeamofeachcarineachother'sfov - -#setrangeofbeamstoraycast,egoandop - -#raycastbeams,twoset -new_obs={} -returnnew_obs - -defstep(self,action): -#can'tstepifparamsnotset -ifnotself.params_set: -print('ERROR-GymEnv-Paramsnotset,callupdateparamsbeforestepping.') -sys.exit() -#actionisalistofsteeringangles+commandvelocities -#alsoaegocarindex -#actionshouldaDICTwith{'ego_idx':int,'speed':[],'steer':[]} -step_request_proto=sim_requests_pb2.SimRequest() -step_request_proto.type=0 -step_request_proto.step_request.ego_idx=action['ego_idx'] -step_request_proto.step_request.requested_vel.extend(action['speed']) -step_request_proto.step_request.requested_ang.extend(action['steer']) -#serialization -step_request_string=step_request_proto.SerializeToString() -#sendsteprequest -self.socket.send(step_request_string) -#receiveresponsefromsiminstance -sim_response_string=self.socket.recv() -#print('Gymenv-Receivedresponseforsteprequest.') -#parsemapresponseproto -sim_response_proto=sim_requests_pb2.SimResponse() -sim_response_proto.ParseFromString(sim_response_string) -#getresults -#makesurewehavetherighttypeofresponse -response_type=sim_response_proto.type -#TODO:alsocheckforsteppingfail -ifnotresponse_type==0: -print('Gymenv-Wrongresponsetypeforstepping,exiting...') -sys.exit() -observations_proto=sim_response_proto.sim_obs -#makesuretheegoidxmatches -ifnotobservations_proto.ego_idx==action['ego_idx']: -print('Gymenv-Egoindexmismatch,exiting...') -sys.exit() -#getobservations -carobs_list=observations_proto.observations -#constructobservationdict -#ObservationDICT,assumeindicesconsistent:{'ego_idx':int,'scans':[[]],'poses_x':[],'poses_y':[],'poses_theta':[],'linear_vels_x':[],'linear_vels_y':[],'ang_vels_z':[],'collisions':[],'collision_angles':[]} -obs={'ego_idx':observations_proto.ego_idx,'scans':[],'poses_x':[],'poses_y':[],'poses_theta':[],'linear_vels_x':[],'linear_vels_y':[],'ang_vels_z':[],'collisions':[],'collision_angles':[],'lap_times':[],'lap_counts':[]} -forcar_obsincarobs_list: -obs['scans'].append(car_obs.scan) -obs['poses_x'].append(car_obs.pose_x) -obs['poses_y'].append(car_obs.pose_y) -ifabs(car_obs.theta)<np.pi: -obs['poses_theta'].append(car_obs.theta) -else: -obs['poses_theta'].append(-((2*np.pi)-car_obs.theta)) -obs['linear_vels_x'].append(car_obs.linear_vel_x) -obs['linear_vels_y'].append(car_obs.linear_vel_y) -obs['ang_vels_z'].append(car_obs.ang_vel_z) -obs['collisions'].append(car_obs.collision) -obs['collision_angles'].append(car_obs.collision_angle) - -obs['lap_times']=self.lap_times -obs['lap_counts']=self.lap_counts - -#TODO:doweneedstepreward? -reward=self.timestep -#updateaccumulatedtimeinenv -self.current_time=self.current_time+self.timestep -#TODO:donezoshouldbedoneinsimulator?couldbedonehereaswell -self._update_state(obs) -ifself.double_finish: -done,temp=self._check_done() -info={'checkpoint_done':temp} -else: -done=self._check_done() -info={} - -#TODO:returnobs,reward,done,info -returnobs,reward,done,info - -defreset(self,poses=None): - -self.current_time=0.0 -self.in_collision=False -self.collision_angles=None -self.num_toggles=0 -self.near_start=True -self.near_starts=np.array([True]*self.num_agents) -self.toggle_list=np.zeros((self.num_agents,)) -ifposes: -pose_x=poses['x'] -pose_y=poses['y'] -pose_theta=poses['theta'] -self.start_x=pose_x[0] -self.start_y=pose_y[0] -self.start_theta=pose_theta[0] -self.start_xs=np.array(pose_x) -self.start_ys=np.array(pose_y) -self.start_thetas=np.array(pose_theta) -self.start_rot=np.array([[np.cos(-self.start_theta),-np.sin(-self.start_theta)], -[np.sin(-self.start_theta),np.cos(-self.start_theta)]]) -#createresetbyposeproto -reset_request_proto=sim_requests_pb2.SimRequest() -reset_request_proto.type=4 -reset_request_proto.reset_bypose_request.num_cars=self.num_agents -reset_request_proto.reset_bypose_request.ego_idx=0 -reset_request_proto.reset_bypose_request.car_x.extend(pose_x) -reset_request_proto.reset_bypose_request.car_y.extend(pose_y) -reset_request_proto.reset_bypose_request.car_theta.extend(pose_theta) -reset_request_string=reset_request_proto.SerializeToString() -self.socket.send(reset_request_string) -else: -#createresetproto -self.start_x=0.0 -self.start_y=0.0 -self.start_theta=0.0 -self.start_rot=np.array([[np.cos(-self.start_theta),-np.sin(-self.start_theta)], -[np.sin(-self.start_theta),np.cos(-self.start_theta)]]) -reset_request_proto=sim_requests_pb2.SimRequest() -reset_request_proto.type=2 -reset_request_proto.reset_request.num_cars=self.num_agents -reset_request_proto.reset_request.ego_idx=0 -#serializeresetproto -reset_request_string=reset_request_proto.SerializeToString() -#sendresetprotostring -self.socket.send(reset_request_string) -#receiveresponsefromsim -reset_response_string=self.socket.recv() -reset_response_proto=sim_requests_pb2.SimResponse() -reset_response_proto.ParseFromString(reset_response_string) -ifreset_response_proto.reset_resp.result: -print('Gymenv-Resetfailed') -#TODO:failurehandling -returnNone -#TODO:returnwithgymconvention,onestep? -vels=[0.0]*self.num_agents -angs=[0.0]*self.num_agents -action={'ego_idx':self.ego_idx,'speed':vels,'steer':angs} -#print('Gymenv-Resetdone') -obs,reward,done,info=self.step(action) -#print('Gymenv-stepdoneforreset') -returnobs,reward,done,info - -definit_map(self,map_path,img_ext,rgb,flip): -""" -initamapforthegymenv -map_path:fullpathfortheyaml,sameasROS,imgandyamlinsamedir -rgb:mapgrayscaleorrgb -flip:ifmapneedsflipping -""" - -self.map_path=map_path -ifnotmap_path.endswith('.yaml'): -print('Gymenv-Pleaseuseayamlfileformapinitialization.') -print('Exiting...') -sys.exit() - -#splityamlextname -map_img_path=os.path.splitext(self.map_path)[0]+img_ext -self.map_img=np.array(Image.open(map_img_path).transpose(Image.FLIP_TOP_BOTTOM)) -self.map_img=self.map_img.astype(np.float64) -ifflip: -self.map_img=self.map_img[::-1] - -ifrgb: -self.map_img=np.dot(self.map_img[...,:3],[0.29,0.57,0.14]) - -#updatemapmetadata -self.map_height=self.map_img.shape[0] -self.map_width=self.map_img.shape[1] -self.free_thresh=0.6#TODO:doublecheck -withopen(self.map_path,'r')asyaml_stream: -try: -map_metadata=yaml.safe_load(yaml_stream) -self.map_resolution=map_metadata['resolution'] -self.origin=map_metadata['origin'] -exceptyaml.YAMLErrorasex: -print(ex) -self.map_inited=True - -#loadwaypoints -#self.csv_path=os.path.splitext(self.map_path)[0]+'.csv' -#withopen(self.csv_path)asf: -#self.waypoints=[tuple(line)forlineincsv.reader(f)] -##waypointsare[x,y,speed,theta] -#self.waypoints=np.array([(float(pt[0]),float(pt[1]),float(pt[2]),float(pt[3]))forptinself.waypoints]) - - -defrender(self,mode='human',close=False): -return - -#defget_min_dist(self,position): -#wpts=self.waypoints[:,0:2] -##=position[0:2] -#nearest_point,nearest_dist,t,i=self.nearest_point_on_trajectory(position,wpts) -##speed=self.waypoints[i,2] -#returnnearest_dist - -#defnearest_point_on_trajectory(self,point,trajectory): -#''' -#Returnthenearestpointalongthegivenpiecewiselineartrajectory. - -#Sameasnearest_point_on_line_segment,butvectorized.Thismethodisquitefast,timeconstraintsshould -#notbeanissuesolongastrajectoriesarenotinsanelylong. - -#Orderofmagnitude:trajectorylength:1000-->0.0002secondcomputation(5000fps) - -#point:size2numpyarray -#trajectory:Nx2matrixof(x,y)trajectorywaypoints -#-thesemustbeunique.Iftheyarenotunique,adivideby0errorwilldestroytheworld -#''' -#diffs=trajectory[1:,:]-trajectory[:-1,:] -#l2s=diffs[:,0]**2+diffs[:,1]**2 -##thisisequivalenttotheelementwisedotproduct -#dots=np.sum((point-trajectory[:-1,:])*diffs[:,:],axis=1) -#t=np.clip(dots/l2s,0.0,1.0) -#projections=trajectory[:-1,:]+(t*diffs.T).T -#dists=np.linalg.norm(point-projections,axis=1) -#min_dist_segment=np.argmin(dists) -#returnprojections[min_dist_segment],dists[min_dist_segment],t[min_dist_segment],min_dist_segment - -defupdate_params(self,mu,h_cg,l_r,cs_f,cs_r,I_z,mass,exe_path,double_finish=False): -#ifnotself.sim_pisNone: -#print('Gymenv-Simserverexists,killing...') -#self.socket.send(b'dead') -#self.sim_p.kill() -#os.kill(self.sim_p.pid,signal.SIGINT) -#self.sim_p=None -#print('inupdateparams') - -self.params=[mu,h_cg,l_r,cs_f,cs_r,I_z,mass] -self.params_set=True -ifself.sim_pisNone: -#print('startingexandsettingmap') -self._start_executable(exe_path) -self._set_map() -self.double_finish=double_finish -#print('beforecreatingproto') - -#createupdateproto -update_param_proto=sim_requests_pb2.SimRequest() -update_param_proto.type=3 -update_param_proto.update_request.mu=mu -update_param_proto.update_request.h_cg=h_cg -update_param_proto.update_request.l_r=l_r -update_param_proto.update_request.cs_f=cs_f -update_param_proto.update_request.cs_r=cs_r -update_param_proto.update_request.I_z=I_z -update_param_proto.update_request.mass=mass -#serializeresetproto -update_param_string=update_param_proto.SerializeToString() -#print('protoserialized') -#sendupdateparamrequest -self.socket.send(update_param_string) -#print('Gymenv-Updateparamrequestsent.') -#receiveresponse -update_response_string=self.socket.recv() -update_response_proto=sim_requests_pb2.SimResponse() -update_response_proto.ParseFromString(update_response_string) -ifupdate_response_proto.update_resp.result: -print('Gymenv-Updateparamfailed') -returnNone - -#print('Gymenv-paramsupdated.') -#startexecutable -#self._start_executable() -#callsetmap -#self._set_map() - - - - diff --git a/docs/xml/f110__gym_2____init_____8py.xml b/docs/xml/f110__gym_2____init_____8py.xml deleted file mode 100644 index 60c6cb38..00000000 --- a/docs/xml/f110__gym_2____init_____8py.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - __init__.py - f110_gym - - - - - -fromgym.envs.registrationimportregister -register( -id='f110-v0', -entry_point='f110_gym.envs:F110Env', -) - - - - diff --git a/docs/xml/f110__gym_2envs_2____init_____8py.xml b/docs/xml/f110__gym_2envs_2____init_____8py.xml deleted file mode 100644 index b4c45408..00000000 --- a/docs/xml/f110__gym_2envs_2____init_____8py.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - __init__.py - f110_gym::envs - - - - - -fromf110_gym.envs.f110_envimportF110Env -fromf110_gym.envs.dynamic_modelsimport* -fromf110_gym.envs.laser_modelsimport* -fromf110_gym.envs.base_classesimport* -fromf110_gym.envs.collision_modelsimport* - - - - diff --git a/docs/xml/f110__gym_2unittest_2____init_____8py.xml b/docs/xml/f110__gym_2unittest_2____init_____8py.xml deleted file mode 100644 index 43b2b593..00000000 --- a/docs/xml/f110__gym_2unittest_2____init_____8py.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - __init__.py - f110_gym::unittest - gym::envs::unittest::scan_sim - - - - - -fromgym.envs.unittest.scan_simimport* - - - - diff --git a/docs/xml/index.xml b/docs/xml/index.xml deleted file mode 100644 index ac873c31..00000000 --- a/docs/xml/index.xml +++ /dev/null @@ -1,572 +0,0 @@ - - - f110_gym::unittest::pyglet_test_camera::App - left - right - bottom - top - zoom_level - zoomed_width - zoomed_height - __init__ - init_gl - on_resize - on_mouse_drag - on_mouse_scroll - on_draw - run - - f110_gym::unittest::pyglet_test::Camera - _window - _zoom - scroll_speed - max_zoom - min_zoom - offset_x - offset_y - __init__ - zoom - zoom - position - position - move - begin - end - __enter__ - __exit__ - - f110_gym::unittest::pyglet_test::CenteredCamera - begin - end - - f110_gym::unittest::collision_checks::CollisionTests - vertices1 - length - width - setUp - test_get_vert - test_get_vert_fps - test_random_collision - test_fps - - f110_gym::envs::collision_models::CollisionTests - vertices1 - length - width - setUp - test_get_vert - test_get_vert_fps - test_random_collision - test_multiple_collisions - test_fps - - f110_gym::envs::dynamic_models::DynamicsTest - mu - C_Sf - C_Sr - lf - lr - h - m - I - s_min - s_max - sv_min - sv_max - v_min - v_max - v_switch - a_max - setUp - test_derivatives - test_zeroinit_roll - test_zeroinit_dec - test_zeroinit_acc - test_zeroinit_rollleft - - f110_gym::unittest::dynamics_test::DynamicsTest - mu - C_Sf - C_Sr - lf - lr - h - m - I - s_min - s_max - sv_min - sv_max - v_min - v_max - v_switch - a_max - setUp - test_derivatives - test_zeroinit_roll - test_zeroinit_dec - test_zeroinit_acc - test_zeroinit_rollleft - - f110_gym::envs::rendering::EnvRenderer - left - right - bottom - top - zoom_level - zoomed_width - zoomed_height - batch - map_points - poses - vertices - score_label - fps_display - ego_idx - cars - __init__ - update_map - on_resize - on_mouse_drag - on_mouse_scroll - on_close - on_draw - update_obs - - f110_gym::envs::f110_env_backup::F110Env - metadata - params_set - map_inited - params - num_agents - timestep - map_path - map_img - ego_idx - timeout - start_thresh - x - y - theta - in_collision - collision_angle - near_start - num_toggles - lap_times - lap_counts - map_height - map_width - map_resolution - free_thresh - origin - port - context - socket - sim_p - all_x - all_y - current_time - collision_angles - near_starts - toggle_list - start_x - start_y - start_theta - start_xs - start_ys - start_thetas - start_rot - double_finish - __init__ - __del__ - step - reset - init_map - render - update_params - _start_executable - _set_map - _check_done - _check_passed - _update_state - _raycast_opponents - - f110_gym::envs::f110_env::F110Env - metadata - map_name - map_path - map_ext - params - num_agents - timestep - ego_idx - start_thresh - poses_x - poses_y - poses_theta - collisions - near_start - num_toggles - lap_times - lap_counts - current_time - near_starts - toggle_list - start_xs - start_ys - start_thetas - start_rot - sim - renderer - current_obs - __init__ - __del__ - step - reset - update_map - update_params - render - _check_done - _update_state - - f110_gym::envs::base_classes::RaceCar - params - is_ego - time_step - num_beams - fov - state - opp_poses - accel - steer_angle_vel - steer_buffer - steer_buffer_size - in_collision - ttc_thresh - scan_simulator - current_scan - cosines - scan_angles - side_distances - __init__ - update_params - set_map - reset - ray_cast_agents - check_ttc - update_pose - update_opp_poses - update_scan - - f110_gym::unittest::scan_sim::ScanSimulator2D - num_beams - fov - std_dev - eps - theta_dis - max_range - angle_increment - theta_index_increment - orig_c - orig_s - orig_x - orig_y - map_height - map_width - map_resolution - dt - rng - sines - cosines - map_img - origin - __init__ - set_map - scan - get_increment - - f110_gym::envs::laser_models::ScanSimulator2D - num_beams - fov - std_dev - eps - theta_dis - max_range - angle_increment - theta_index_increment - orig_c - orig_s - orig_x - orig_y - map_height - map_width - map_resolution - dt - rng - sines - cosines - map_img - origin - __init__ - set_map - scan - get_increment - - f110_gym::unittest::scan_sim::ScanTests - num_beams - fov - num_test - test_poses - berlin_scan - skirk_scan - setUp - test_map_berlin - test_map_skirk - test_fps - - f110_gym::envs::laser_models::ScanTests - num_beams - fov - num_test - test_poses - berlin_scan - skirk_scan - setUp - test_map_berlin - test_map_skirk - test_fps - - f110_gym::envs::base_classes::Simulator - num_agents - time_step - ego_idx - params - agent_poses - agents - collisions - collision_idx - __init__ - set_map - update_params - check_collision - step - reset - - f110_gym - id - entry_point - - f110_gym::envs - - f110_gym::envs::base_classes - - f110_gym::envs::collision_models - cache - perpendicular - tripleProduct - avgPoint - indexOfFurthestPoint - support - collision - collision_multiple - get_trmtx - get_vertices - - f110_gym::envs::dynamic_models - cache - accl_constraints - steering_constraint - vehicle_dynamics_ks - vehicle_dynamics_st - pid - func_KS - func_ST - - f110_gym::envs::f110_env - VIDEO_W - VIDEO_H - WINDOW_W - WINDOW_H - - f110_gym::envs::f110_env_backup - - f110_gym::envs::laser_models - get_dt - xy_2_rc - distance_transform - trace_ray - get_scan - check_ttc_jit - cross - are_collinear - get_range - ray_cast - main - - f110_gym::envs::rendering - ZOOM_IN_FACTOR - ZOOM_OUT_FACTOR - CAR_LENGTH - CAR_WIDTH - - f110_gym::unittest - - f110_gym::unittest::collision_checks - cache - perpendicular - tripleProduct - avgPoint - indexOfFurthestPoint - support - collision - get_trmtx - get_vertices - - f110_gym::unittest::dynamics_test - cache - accl_constraints - steering_constraint - vehicle_dynamics_ks - vehicle_dynamics_st - pid - func_KS - func_ST - - f110_gym::unittest::legacy_scan_gen - thetas - executable_dir - mass - l_r - I_z - mu - h_cg - cs_f - cs_r - num_test - test_poses - num - map_path - map_ext - racecar_env - double_finish - vegas_scan - x - y - theta - obs - _ - berlin_scan - skirk_scan - vegas - berlin - skirk - - f110_gym::unittest::pyglet_test - parser - type - str - required - True - help - args - map_metada - map_resolution - origin - origin_x - origin_y - map_img - map_height - map_width - range_x - range_y - map_x - map_y - map_z - map_coords - map_mask - map_mask_flat - map_points - config - window - cam - batch - points - particle - on_resize - loop - on_draw - - f110_gym::unittest::pyglet_test_camera - ZOOM_IN_FACTOR - ZOOM_OUT_FACTOR - - f110_gym::unittest::random_trackgen - parser - type - int - default - help - args - NUM_MAPS - WIDTH - track - track_int - track_ext - create_track - convert_track - - f110_gym::unittest::scan_sim - get_dt - xy_2_rc - distance_transform - trace_ray - get_scan - main - - gym::envs::unittest::scan_sim - - pyglet::gl - - __init__.py - - __init__.py - - __init__.py - - base_classes.py - - collision_models.py - - dynamic_models.py - - f110_env.py - - f110_env_backup.py - - laser_models.py - - rendering.py - - collision_checks.py - - dynamics_test.py - - legacy_scan_gen.py - - pyglet_test.py - - pyglet_test_camera.py - - random_trackgen.py - - scan_sim.py - - /home/billyzheng/f1tenth_gym/gym/f110_gym/envs - - /home/billyzheng/f1tenth_gym/gym/f110_gym - - /home/billyzheng/f1tenth_gym/gym - - /home/billyzheng/f1tenth_gym/gym/f110_gym/unittest - - diff --git a/docs/xml/index.xsd b/docs/xml/index.xsd deleted file mode 100644 index 04cb2f13..00000000 --- a/docs/xml/index.xsd +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/xml/laser__models_8py.xml b/docs/xml/laser__models_8py.xml deleted file mode 100644 index a339a27b..00000000 --- a/docs/xml/laser__models_8py.xml +++ /dev/null @@ -1,596 +0,0 @@ - - - - laser_models.py - f110_gym::envs::laser_models::ScanSimulator2D - f110_gym::envs::laser_models::ScanTests - f110_gym::envs::laser_models - - - - - -#MITLicense - -#Copyright(c)2020JosephAuckley,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy -#ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal -#intheSoftwarewithoutrestriction,includingwithoutlimitationtherights -#touse,copy,modify,merge,publish,distribute,sublicense,and/orsell -#copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis -#furnishedtodoso,subjecttothefollowingconditions: - -#Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall -#copiesorsubstantialportionsoftheSoftware. - -#THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR -#IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY, -#FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE -#AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER -#LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM, -#OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE -#SOFTWARE. - - - -""" -PrototypeofUtilityfunctionsandclassesforsimulating2DLIDARscans -Author:HongruiZheng -""" - -importnumpyasnp -fromnumbaimportnjit -fromscipy.ndimageimportdistance_transform_edtasedt -fromPILimportImage -importos -importyaml - -importunittest -importtimeit - -defget_dt(bitmap,resolution): -""" -Distancetransformation,returnsthedistancematrixfromtheinputbitmap. -Usesscipy.ndimage,cannotbeJITted. - -Args: -bitmap(numpy.ndarray,(n,m)):inputbinarybitmapoftheenvironment,where0isobstacles,and255(oranything>0)isfreespace -resolution(float):resolutionoftheinputbitmap(m/cell) - -Returns: -dt(numpy.ndarray,(n,m)):outputdistancematrix,whereeachcellhasthecorrespondingdistance(inmeters)totheclosestobstacle -""" -dt=resolution*edt(bitmap) -returndt - -@njit(cache=True) -defxy_2_rc(x,y,orig_x,orig_y,orig_c,orig_s,height,width,resolution): -""" -Translate(x,y)coordinateinto(r,c)inthematrix - -Args: -x(float):coordinateinx(m) -y(float):coordinateiny(m) -orig_x(float):xcoordinateofthemaporigin(m) -orig_y(float):ycoordinateofthemaporigin(m) - -Returns: -r(int):rownumberinthetransformmatrixofthegivenpoint -c(int):columnnumberinthetransformmatrixofthegivenpoint -""" -#translation -x_trans=x-orig_x -y_trans=y-orig_y - -#rotation -x_rot=x_trans*orig_c+y_trans*orig_s -y_rot=-x_trans*orig_s+y_trans*orig_c - -#clipthestatetobeacell -ifx_rot<0orx_rot>=width*resolutionory_rot<0ory_rot>=height*resolution: -c=-1 -r=-1 -else: -c=int(x_rot/resolution) -r=int(y_rot/resolution) - -returnr,c - -@njit(cache=True) -defdistance_transform(x,y,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt): -""" -Lookupcorrespondingdistanceinthedistancematrix - -Args: -x(float):xcoordinateofthelookuppoint -y(float):ycoordinateofthelookuppoint -orig_x(float):xcoordinateofthemaporigin(m) -orig_y(float):ycoordinateofthemaporigin(m) - -Returns: -distance(float):correspondingshortestdistancetoobstacleinmeters -""" -r,c=xy_2_rc(x,y,orig_x,orig_y,orig_c,orig_s,height,width,resolution) -distance=dt[r,c] -returndistance - -@njit(cache=True) -deftrace_ray(x,y,theta_index,sines,cosines,eps,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt,max_range): -""" -Findthelengthofaspecificrayataspecificscanangletheta -Purelymathcalculationandloops,shouldbeJITted. - -Args: -x(float):currentxcoordinateoftheego(scan)frame -y(float):currentycoordinateoftheego(scan)frame -theta_index(int):currentindexofthescanbeaminthescanrange -sines(numpy.ndarray(n,)):pre-calculatedsinesoftheanglearray -cosines(numpy.ndarray(n,)):pre-calculatedcosines... - -Returns: -total_distance(float):thedistancetofirstobstacleonthecurrentscanbeam -""" - -#intcasting,andindexprecaltrigs -theta_index_=int(theta_index) -s=sines[theta_index_] -c=cosines[theta_index_] - -#distancetonearestinitialization -dist_to_nearest=distance_transform(x,y,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt) -total_dist=dist_to_nearest - -#raytracingiterations -whiledist_to_nearest>epsandtotal_dist<=max_range: -#moveinthedirectionoftheraybydist_to_nearest -x+=dist_to_nearest*c -y+=dist_to_nearest*s - -#updatedist_to_nearestforcurrentpointonray -#alsokeepstrackoftotalraylength -dist_to_nearest=distance_transform(x,y,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt) -total_dist+=dist_to_nearest - -iftotal_dist>max_range: -total_dist=max_range - -returntotal_dist - -@njit(cache=True) -defget_scan(pose,theta_dis,fov,num_beams,theta_index_increment,sines,cosines,eps,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt,max_range): -""" -Performthescanforeachdiscretizedangleofeachbeamofthelaser,loopheavy,shouldbeJITted - -Args: -pose(numpy.ndarray(3,)):currentposeofthescanframeinthemap -theta_dis(int):numberofstepstodiscretizetheanglesbetween0and2piforlookup -fov(float):fieldofviewofthelaserscan -num_beams(int):numberofbeamsinthescan -theta_index_increment(float):incrementbetweenangleindicesafterdiscretization - -Returns: -scan(numpy.ndarray(n,)):resultinglaserscanatthepose,n=num_beams -""" -#emptyscanarrayinit -scan=np.empty((num_beams,)) - -#makethetadiscretebymappingtherange[-pi,pi]onto[0,theta_dis] -theta_index=theta_dis*(pose[2]-fov/2.)/(2.*np.pi) - -#makesureit'swrappedproperly -theta_index=np.fmod(theta_index,theta_dis) -while(theta_index<0): -theta_index+=theta_dis - -#sweepthrougheachbeam -foriinrange(0,num_beams): -#tracethecurrentbeam -scan[i]=trace_ray(pose[0],pose[1],theta_index,sines,cosines,eps,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt,max_range) - -#incrementthebeamindex -theta_index+=theta_index_increment - -#makesureitstaysintherange[0,theta_dis) -whiletheta_index>=theta_dis: -theta_index-=theta_dis - -returnscan - -@njit(cache=True) -defcheck_ttc_jit(scan,vel,scan_angles,cosines,side_distances,ttc_thresh): -""" -CheckstheiTTCofeachbeaminascanforcollisionwithenvironment - -Args: -scan(np.ndarray(num_beams,)):currentscantocheck -vel(float):currentvelocity -scan_angles(np.ndarray(num_beams,)):precompedanglesofeachbeam -cosines(np.ndarray(num_beams,)):precompedcosinesofthescanangles -side_distances(np.ndarray(num_beams,)):precompeddistancesateachbeamfromthelasertothesidesofthecar -ttc_thresh(float):thresholdforiTTCforcollision - -Returns: -in_collision(bool):whethervehicleisincollisionwithenvironment -collision_angle(float):atwhichanglethecollisionhappened -""" -ifvel!=0.0: -num_beams=scan.shape[0] -foriinrange(num_beams): -proj_vel=vel*cosines[i] -ttc=(scan[i]-side_distances[i])/proj_vel -if(ttc<ttc_thresh)and(ttc>=0.0): -in_collision=True -break -else: -in_collision=False - -returnin_collision - -@njit(cache=True) -defcross(v1,v2): -""" -Crossproductoftwo2-vectors - -Args: -v1,v2(np.ndarray(2,)):inputvectors - -Returns: -crossproduct(float):crossproduct -""" -returnv1[0]*v2[1]-v1[1]*v2[0] - -@njit(cache=True) -defare_collinear(pt_a,pt_b,pt_c): -""" -Checksifthreepointsarecollinearin2D - -Args: -pt_a,pt_b,pt_c(np.ndarray(2,)):pointstocheckin2D - -Returns: -col(bool):whetherthreepointsarecollinear -""" -tol=1e-8 -ba=pt_b-pt_a -ca=pt_a-pt_c -col=np.fabs(cross(ba,ca))<tol -returncol - -@njit(cache=True) -defget_range(pose,beam_theta,va,vb): -""" -Getthedistanceatabeamangletothevectorformedbytwoofthefourverticesofavehicle - -Args: -pose(np.ndarray(3,)):poseofthescanningvehicle -beam_theta(float):angleofthecurrentbeam(worldframe) -va,vb(np.ndarray(2,)):thetwoverticesforminganedge - -Returns: -distance(float):smallestdistanceatbeamthetafromscanningposetoedge -""" -o=pose[0:2] -v1=o-va -v2=vb-va -v3=np.array([np.cos(beam_theta+np.pi/2.),np.sin(beam_theta+np.pi/2.)]) - -denom=v2.dot(v3) -distance=np.inf - -ifnp.fabs(denom)>0.0: -d1=cross(v2,v1)/denom -d2=v1.dot(v3)/denom -ifd1>=0.0andd2>=0.0andd2<=1.0: -distance=d1 -elifare_collinear(o,va,vb): -da=np.linalg.norm(va-o) -db=np.linalg.norm(vb-o) -distance=min(da,db) - -returndistance - -@njit(cache=True) -defray_cast(pose,scan,scan_angles,vertices): -""" -Modifyascanbyraycastingontoanotheragent'sfourvertices - -Args: -pose(np.ndarray(3,)):poseofthevehicleperformingscan -scan(np.ndarray(num_beams,)):originalscantomodify -scan_angles(np.ndarray(num_beams,)):correspondingbeamangles -vertices(np.ndarray(4,2)):fourverticesofavehiclepose - -Returns: -new_scan(np.ndarray(num_beams,)):modifiedscan -""" -num_beams=scan.shape[0] - -#padverticessoloopsaround -looped_vertices=np.empty((5,2)) -looped_vertices[0:4,:]=vertices -looped_vertices[4,:]=vertices[0,:] - -#loopingoverbeams -foriinrange(num_beams): -#loopingoververtices -forjinrange(4): -#checkiforiginalscanislongerthanraycasteddistance -scan_range=get_range(pose,pose[2]+scan_angles[i],looped_vertices[j,:],looped_vertices[j+1,:]) -ifscan_range<scan[i]: -scan[i]=scan_range - -returnscan - -classScanSimulator2D(object): -""" -2DLIDARscansimulatorclass - -Initparams: -num_beams(int):numberofbeamsinthescan -fov(float):fieldofviewofthelaserscan -std_dev(float,default=0.01):standarddeviationofthegeneratedwhitenoiseinthescan -eps(float,default=0.0001):raytracingiterationterminationcondition -theta_dis(int,default=2000):numberofstepstodiscretizetheanglesbetween0and2piforlookup -max_range(float,default=30.0):maximumrangeofthelaser -seed(int,default=123):seedforrandomnumbergeneratorforthewhitenoiseinscan -""" - -def__init__(self,num_beams,fov,std_dev=0.01,eps=0.0001,theta_dis=2000,max_range=30.0,seed=123): -#initialization -self.num_beams=num_beams -self.fov=fov -self.std_dev=std_dev -self.eps=eps -self.theta_dis=theta_dis -self.max_range=max_range -self.angle_increment=self.fov/(self.num_beams-1) -self.theta_index_increment=theta_dis*self.angle_increment/(2.*np.pi) -self.orig_c=None -self.orig_s=None -self.orig_x=None -self.orig_y=None -self.map_height=None -self.map_width=None -self.map_resolution=None -self.dt=None - -#whitenoisegenerator -self.rng=np.random.default_rng(seed=seed) - -#precomputingcorrespondingcosinesandsinesoftheanglearray -theta_arr=np.linspace(0.0,2*np.pi,num=theta_dis) -self.sines=np.sin(theta_arr) -self.cosines=np.cos(theta_arr) - -defset_map(self,map_path,map_ext): -""" -Setthebitmapofthescansimulatorbypath - -Args: -map_path(str):pathtothemapyamlfile -map_ext(str):extension(imagetype)ofthemapimage - -Returns: -flag(bool):ifimagereadingandloadingissuccessful -""" -#TODO:doweopentheoptiontofliptheimages,andturnrgbintograyscale?orspecifytheexactrequirementsindocumentation. -#TODO:throwerrorifimagespecificationisn'tmet - -#loadmapimage -map_img_path=os.path.splitext(map_path)[0]+map_ext -self.map_img=np.array(Image.open(map_img_path).transpose(Image.FLIP_TOP_BOTTOM)) -self.map_img=self.map_img.astype(np.float64) - -#grayscale->binary -self.map_img[self.map_img<=128.]=0. -self.map_img[self.map_img>128.]=255. - -self.map_height=self.map_img.shape[0] -self.map_width=self.map_img.shape[1] - -#loadmapyaml -withopen(map_path,'r')asyaml_stream: -try: -map_metadata=yaml.safe_load(yaml_stream) -self.map_resolution=map_metadata['resolution'] -self.origin=map_metadata['origin'] -exceptyaml.YAMLErrorasex: -print(ex) - -#calculatemapparameters -self.orig_x=self.origin[0] -self.orig_y=self.origin[1] -self.orig_s=np.sin(self.origin[2]) -self.orig_c=np.cos(self.origin[2]) - -#getthedistancetransform -self.dt=get_dt(self.map_img,self.map_resolution) - -returnTrue - -defscan(self,pose): -""" -Performsimulated2Dscanbyposeonthegivenmap - -Args: -pose(numpy.ndarray(3,)):poseofthescanframe(x,y,theta) - -Returns: -scan(numpy.ndarray(n,)):dataarrayofthelaserscan,n=num_beams - -Raises: -ValueError:whenscaniscalledbeforeamapisset -""" -ifself.map_heightisNone: -raiseValueError('Mapisnotsetforscansimulator.') -scan=get_scan(pose,self.theta_dis,self.fov,self.num_beams,self.theta_index_increment,self.sines,self.cosines,self.eps,self.orig_x,self.orig_y,self.orig_c,self.orig_s,self.map_height,self.map_width,self.map_resolution,self.dt,self.max_range) -noise=self.rng.normal(0.,self.std_dev,size=self.num_beams) -final_scan=scan+noise -returnfinal_scan - -defget_increment(self): -returnself.angle_increment - - -""" -Unittestsforthe2Dscansimulatorclass -Author:HongruiZheng - -Testcases: -1,2:ComparisonbetweengeneratedscanarrayofthenewsimulatorandthelegacyC++simulator,generateddataused,MSEisusedasthemetric -2.FPStest,shouldbegreaterthan500 -""" - - -classScanTests(unittest.TestCase): -defsetUp(self): -#testparams -self.num_beams=1080 -self.fov=4.7 - -self.num_test=10 -self.test_poses=np.zeros((self.num_test,3)) -self.test_poses[:,2]=np.linspace(-1.,1.,num=self.num_test) - -#legacygymdata -sample_scan=np.load('legacy_scan.npz') -self.berlin_scan=sample_scan['berlin'] -self.skirk_scan=sample_scan['skirk'] - -deftest_map_berlin(self): -scan_sim=ScanSimulator2D(self.num_beams,self.fov) -new_berlin=np.empty((self.num_test,self.num_beams)) -map_path='../../../maps/berlin.yaml' -map_ext='.png' -scan_sim.set_map(map_path,map_ext) -#scangenloop -foriinrange(self.num_test): -test_pose=self.test_poses[i] -new_berlin[i,:]=scan_sim.scan(test_pose) -diff=self.berlin_scan-new_berlin -mse=np.mean(diff**2) -#print('Levinedistancetest,norm:'+str(norm)) - -#plotting -importmatplotlib.pyplotasplt -theta=np.linspace(-self.fov/2.,self.fov/2.,num=self.num_beams) -plt.polar(theta,new_berlin[1,:],'.',lw=0) -plt.polar(theta,self.berlin_scan[1,:],'.',lw=0) -plt.show() - -self.assertLess(mse,2.) - -deftest_map_skirk(self): -scan_sim=ScanSimulator2D(self.num_beams,self.fov) -new_skirk=np.empty((self.num_test,self.num_beams)) -map_path='../../../maps/skirk.yaml' -map_ext='.png' -scan_sim.set_map(map_path,map_ext) -print('mapset') -#scangenloop -foriinrange(self.num_test): -test_pose=self.test_poses[i] -new_skirk[i,:]=scan_sim.scan(test_pose) -diff=self.skirk_scan-new_skirk -mse=np.mean(diff**2) -print('skirkdistancetest,mse:'+str(mse)) - -#plotting -importmatplotlib.pyplotasplt -theta=np.linspace(-self.fov/2.,self.fov/2.,num=self.num_beams) -plt.polar(theta,new_skirk[1,:],'.',lw=0) -plt.polar(theta,self.skirk_scan[1,:],'.',lw=0) -plt.show() - -self.assertLess(mse,2.) - -deftest_fps(self): -#scanfpsshouldbegreaterthan500 -scan_sim=ScanSimulator2D(self.num_beams,self.fov) -map_path='../../../maps/skirk.yaml' -map_ext='.png' -scan_sim.set_map(map_path,map_ext) - -importtime -start=time.time() -foriinrange(10000): -x_test=i/10000 -scan=scan_sim.scan(np.array([x_test,0.,0.])) -end=time.time() -fps=10000/(end-start) -#print('FPStest') -#print('Elapsedtime:'+str(end-start)+',FPS:'+str(1/fps)) -self.assertGreater(fps,500.) - - -defmain(): -num_beams=1080 -fov=4.7 -#map_path='../envs/maps/berlin.yaml' -map_path='/home/f1tenth-eval/tunercar/es/maps/map0.yaml' -map_ext='.png' -scan_sim=ScanSimulator2D(num_beams,fov) -scan_sim.set_map(map_path,map_ext) -scan=scan_sim.scan(np.array([0.,0.,0.])) - -#fpstest -importtime -start=time.time() -foriinrange(10000): -x_test=i/10000 -scan=scan_sim.scan(np.array([x_test,0.,0.])) -end=time.time() -fps=(end-start)/10000 -print('FPStest') -print('Elapsedtime:'+str(end-start)+',FPS:'+str(1/fps)) - -#visualization -importmatplotlib.pyplotasplt -frommatplotlib.animationimportFuncAnimation -num_iter=100 -theta=np.linspace(-fov/2.,fov/2.,num=num_beams) -fig=plt.figure() -ax=fig.add_subplot(111,projection='polar') -ax.set_ylim(0,31) -line,=ax.plot([],[],'.',lw=0) -defupdate(i): -#x_ani=i*3./num_iter -theta_ani=-i*2*np.pi/num_iter -x_ani=0. -current_scan=scan_sim.scan(np.array([x_ani,0.,theta_ani])) -print(np.max(current_scan)) -line.set_data(theta,current_scan) -returnline, -ani=FuncAnimation(fig,update,frames=num_iter,blit=True) -plt.show() - -if__name__=='__main__': -#unittest.main() -main() - -#importtime -#pt_a=np.array([1.,1.]) -#pt_b=np.array([1.,2.]) -#pt_c=np.array([1.,3.]) -#col=are_collinear(pt_a,pt_b,pt_c) -#print(col) - -#pose=np.array([0.,0.,-1.]) -#beam_theta=0. -#start=time.time() -#dist=get_range(pose,beam_theta,pt_a,pt_b) -#print(dist,time.time()-start) - -#num_beams=1080 -#scan=100.*np.ones((num_beams,)) -#scan_angles=np.linspace(-2.35,2.35,num=num_beams) -#assertscan.shape[0]==scan_angles.shape[0] -#vertices=np.asarray([[4,11.],[5,5],[9,9],[10,10]]) -#start=time.time() -#new_scan=ray_cast(pose,scan,scan_angles,vertices) -#print(time.time()-start) - - - - diff --git a/docs/xml/legacy__scan__gen_8py.xml b/docs/xml/legacy__scan__gen_8py.xml deleted file mode 100644 index 35fcecee..00000000 --- a/docs/xml/legacy__scan__gen_8py.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - legacy_scan_gen.py - f110_gym::unittest::legacy_scan_gen - - - - - -#MITLicense - -#Copyright(c)2020JosephAuckley,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy -#ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal -#intheSoftwarewithoutrestriction,includingwithoutlimitationtherights -#touse,copy,modify,merge,publish,distribute,sublicense,and/orsell -#copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis -#furnishedtodoso,subjecttothefollowingconditions: - -#Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall -#copiesorsubstantialportionsoftheSoftware. - -#THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR -#IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY, -#FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE -#AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER -#LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM, -#OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE -#SOFTWARE. - - - -""" -UtilityfunctionstogeneratesamplescandatafromlegacyC++backend -Author:HongruiZheng - -Thescriptgeneratessamplescandatafor3differentmapsusedintheunittests. - -Map1:Levine - -Map2:Berlin - -Map3:Skirkanich -""" - -importnumpyasnp -importgym -importmatplotlib.pyplotasplt - -thetas=np.linspace(-2.35,2.35,num=1080) - -#init -executable_dir='../../../build/' -mass=3.74 -l_r=0.17145 -I_z=0.04712 -mu=0.523 -h_cg=0.074 -cs_f=4.718 -cs_r=5.4562 - -#testposes -num_test=10 -test_poses=np.zeros((num_test,3)) -test_poses[:,2]=np.linspace(-1.,1.,num=num_test) - -#map1:vegas -map_path='../../../maps/vegas.yaml' -map_ext='.png' -racecar_env=gym.make('f110_gym:f110-v0') -racecar_env.init_map(map_path,map_ext,False,False) -racecar_env.update_params(mu,h_cg,l_r,cs_f,cs_r,I_z,mass,executable_dir,double_finish=True) -vegas_scan=np.empty((num_test,1080)) -foriinrange(test_poses.shape[0]): -x=[test_poses[i,0],200.] -y=[test_poses[i,1],200.] -theta=[test_poses[i,2],0.] -obs,_,_,_=racecar_env.reset({'x':x,'y':y,'theta':theta}) -vegas_scan[i,:]=obs['scans'][0] - -#map2:berlin -map_path='../../../maps/berlin.yaml' -map_ext='.png' -racecar_env=gym.make('f110_gym:f110-v0') -racecar_env.init_map(map_path,map_ext,False,False) -racecar_env.update_params(mu,h_cg,l_r,cs_f,cs_r,I_z,mass,executable_dir,double_finish=True) -berlin_scan=np.empty((num_test,1080)) -foriinrange(test_poses.shape[0]): -x=[test_poses[i,0],200.] -y=[test_poses[i,1],200.] -theta=[test_poses[i,2],0.] -obs,_,_,_=racecar_env.reset({'x':x,'y':y,'theta':theta}) -berlin_scan[i,:]=obs['scans'][0] - -#map3:skirk -map_path='../../../maps/skirk.yaml' -map_ext='.png' -racecar_env=gym.make('f110_gym:f110-v0') -racecar_env.init_map(map_path,map_ext,False,False) -racecar_env.update_params(mu,h_cg,l_r,cs_f,cs_r,I_z,mass,executable_dir,double_finish=True) -skirk_scan=np.empty((num_test,1080)) -foriinrange(test_poses.shape[0]): -x=[test_poses[i,0],200.] -y=[test_poses[i,1],200.] -theta=[test_poses[i,2],0.] -obs,_,_,_=racecar_env.reset({'x':x,'y':y,'theta':theta}) -skirk_scan[i,:]=obs['scans'][0] - -#packagedata -np.savez_compressed('legacy_scan.npz',vegas=vegas_scan,berlin=berlin_scan,skirk=skirk_scan) - - - - diff --git a/docs/xml/namespacef110__gym.xml b/docs/xml/namespacef110__gym.xml deleted file mode 100644 index 24c2de95..00000000 --- a/docs/xml/namespacef110__gym.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - f110_gym - f110_gym::envs - f110_gym::unittest - - - - f110_gym.id - - id - - - - - - - - - - - f110_gym.entry_point - - entry_point - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1envs.xml b/docs/xml/namespacef110__gym_1_1envs.xml deleted file mode 100644 index 38c8b891..00000000 --- a/docs/xml/namespacef110__gym_1_1envs.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - f110_gym::envs - f110_gym::envs::base_classes - f110_gym::envs::collision_models - f110_gym::envs::dynamic_models - f110_gym::envs::f110_env - f110_gym::envs::f110_env_backup - f110_gym::envs::laser_models - f110_gym::envs::rendering - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1envs_1_1base__classes.xml b/docs/xml/namespacef110__gym_1_1envs_1_1base__classes.xml deleted file mode 100644 index 42a5c630..00000000 --- a/docs/xml/namespacef110__gym_1_1envs_1_1base__classes.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - f110_gym::envs::base_classes - f110_gym::envs::base_classes::RaceCar - f110_gym::envs::base_classes::Simulator - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1envs_1_1collision__models.xml b/docs/xml/namespacef110__gym_1_1envs_1_1collision__models.xml deleted file mode 100644 index dd847980..00000000 --- a/docs/xml/namespacef110__gym_1_1envs_1_1collision__models.xml +++ /dev/null @@ -1,292 +0,0 @@ - - - - f110_gym::envs::collision_models - f110_gym::envs::collision_models::CollisionTests - - - - f110_gym::envs::collision_models.cache - - cache - - - - - - - - - - - - def - def f110_gym.envs.collision_models.perpendicular - (pt) - perpendicular - - pt - pt - - - - -Return a 2-vector's perpendicular vector - -Args: - pt (np.ndarray, (2,)): input vector - -Returns: - pt (np.ndarray, (2,)): perpendicular vector - - - - - - - - def - def f110_gym.envs.collision_models.tripleProduct - (a, b, c) - tripleProduct - - a - a - - - b - b - - - c - c - - - - -Return triple product of three vectors - -Args: - a, b, c (np.ndarray, (2,)): input vectors - -Returns: - (np.ndarray, (2,)): triple product - - - - - - - - def - def f110_gym.envs.collision_models.avgPoint - (vertices) - avgPoint - - vertices - vertices - - - - -Return the average point of multiple vertices - -Args: - vertices (np.ndarray, (n, 2)): the vertices we want to find avg on - -Returns: - avg (np.ndarray, (2,)): average point of the vertices - - - - - - - - def - def f110_gym.envs.collision_models.indexOfFurthestPoint - (vertices, d) - indexOfFurthestPoint - - vertices - vertices - - - d - d - - - - -Return the index of the vertex furthest away along a direction in the list of vertices - -Args: - vertices (np.ndarray, (n, 2)): the vertices we want to find avg on - -Returns: - idx (int): index of the furthest point - - - - - - - - def - def f110_gym.envs.collision_models.support - (vertices1, vertices2, d) - support - - vertices1 - vertices1 - - - vertices2 - vertices2 - - - d - d - - - - -Minkowski sum support function for GJK - -Args: - vertices1 (np.ndarray, (n, 2)): vertices of the first body - vertices2 (np.ndarray, (n, 2)): vertices of the second body - d (np.ndarray, (2, )): direction to find the support along - -Returns: - support (np.ndarray, (n, 2)): Minkowski sum - - - - - - - - def - def f110_gym.envs.collision_models.collision - (vertices1, vertices2) - collision - - vertices1 - vertices1 - - - vertices2 - vertices2 - - - - -GJK test to see whether two bodies overlap - -Args: - vertices1 (np.ndarray, (n, 2)): vertices of the first body - vertices2 (np.ndarray, (n, 2)): vertices of the second body - -Returns: - overlap (boolean): True if two bodies collide - - - - - - - - def - def f110_gym.envs.collision_models.collision_multiple - (vertices) - collision_multiple - - vertices - vertices - - - - -Check pair-wise collisions for all provided vertices - -Args: - vertices (np.ndarray (num_bodies, 4, 2)): all vertices for checking pair-wise collision - -Returns: - collisions (np.ndarray (num_vertices, )): whether each body is in collision - collision_idx (np.ndarray (num_vertices, )): which index of other body is each index's body is in collision, -1 if not in collision - - - - - - - - def - def f110_gym.envs.collision_models.get_trmtx - (pose) - get_trmtx - - pose - pose - - - - -Get transformation matrix of vehicle frame -> global frame - -Args: - pose (np.ndarray (3, )): current pose of the vehicle - -return: - H (np.ndarray (4, 4)): transformation matrix - - - - - - - - def - def f110_gym.envs.collision_models.get_vertices - (pose, length, width) - get_vertices - - pose - pose - - - length - length - - - width - width - - - - -Utility function to return vertices of the car body given pose and size - -Args: - pose (np.ndarray, (3, )): current world coordinate pose of the vehicle - length (float): car length - width (float): car width - -Returns: - vertices (np.ndarray, (4, 2)): corner vertices of the vehicle body - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1envs_1_1dynamic__models.xml b/docs/xml/namespacef110__gym_1_1envs_1_1dynamic__models.xml deleted file mode 100644 index ef796cc2..00000000 --- a/docs/xml/namespacef110__gym_1_1envs_1_1dynamic__models.xml +++ /dev/null @@ -1,566 +0,0 @@ - - - - f110_gym::envs::dynamic_models - f110_gym::envs::dynamic_models::DynamicsTest - - - - f110_gym::envs::dynamic_models.cache - - cache - - - - - - - - - - - - def - def f110_gym.envs.dynamic_models.accl_constraints - (vel, accl, v_switch, a_max, v_min, v_max) - accl_constraints - - vel - vel - - - accl - accl - - - v_switch - v_switch - - - a_max - a_max - - - v_min - v_min - - - v_max - v_max - - - - -Acceleration constraints, adjusts the acceleration based on constraints - - Args: - vel (float): current velocity of the vehicle - accl (float): unconstraint desired acceleration - v_switch (float): switching velocity (velocity at which the acceleration is no longer able to create wheel spin) - a_max (float): maximum allowed acceleration - v_min (float): minimum allowed velocity - v_max (float): maximum allowed velocity - - Returns: - accl (float): adjusted acceleration - - - - - - - - def - def f110_gym.envs.dynamic_models.steering_constraint - (steering_angle, steering_velocity, s_min, s_max, sv_min, sv_max) - steering_constraint - - steering_angle - steering_angle - - - steering_velocity - steering_velocity - - - s_min - s_min - - - s_max - s_max - - - sv_min - sv_min - - - sv_max - sv_max - - - - -Steering constraints, adjusts the steering velocity based on constraints - - Args: - steering_angle (float): current steering_angle of the vehicle - steering_velocity (float): unconstraint desired steering_velocity - s_min (float): minimum steering angle - s_max (float): maximum steering angle - sv_min (float): minimum steering velocity - sv_max (float): maximum steering velocity - - Returns: - steering_velocity (float): adjusted steering velocity - - - - - - - - def - def f110_gym.envs.dynamic_models.vehicle_dynamics_ks - (x, u_init, mu, C_Sf, C_Sr, lf, lr, h, m, I, s_min, s_max, sv_min, sv_max, v_switch, a_max, v_min, v_max) - vehicle_dynamics_ks - - x - x - - - u_init - u_init - - - mu - mu - - - C_Sf - C_Sf - - - C_Sr - C_Sr - - - lf - lf - - - lr - lr - - - h - h - - - m - m - - - I - I - - - s_min - s_min - - - s_max - s_max - - - sv_min - sv_min - - - sv_max - sv_max - - - v_switch - v_switch - - - a_max - a_max - - - v_min - v_min - - - v_max - v_max - - - - -Single Track Kinematic Vehicle Dynamics. - - Args: - x (numpy.ndarray (3, )): vehicle state vector (x1, x2, x3, x4, x5) - x1: x position in global coordinates - x2: y position in global coordinates - x3: steering angle of front wheels - x4: velocity in x direction - x5: yaw angle - u (numpy.ndarray (2, )): control input vector (u1, u2) - u1: steering angle velocity of front wheels - u2: longitudinal acceleration - - Returns: - f (numpy.ndarray): right hand side of differential equations - - - - - - - - def - def f110_gym.envs.dynamic_models.vehicle_dynamics_st - (x, u_init, mu, C_Sf, C_Sr, lf, lr, h, m, I, s_min, s_max, sv_min, sv_max, v_switch, a_max, v_min, v_max) - vehicle_dynamics_st - - x - x - - - u_init - u_init - - - mu - mu - - - C_Sf - C_Sf - - - C_Sr - C_Sr - - - lf - lf - - - lr - lr - - - h - h - - - m - m - - - I - I - - - s_min - s_min - - - s_max - s_max - - - sv_min - sv_min - - - sv_max - sv_max - - - v_switch - v_switch - - - a_max - a_max - - - v_min - v_min - - - v_max - v_max - - - - -Single Track Dynamic Vehicle Dynamics. - - Args: - x (numpy.ndarray (3, )): vehicle state vector (x1, x2, x3, x4, x5, x6, x7) - x1: x position in global coordinates - x2: y position in global coordinates - x3: steering angle of front wheels - x4: velocity in x direction - x5: yaw angle - x6: yaw rate - x7: slip angle at vehicle center - u (numpy.ndarray (2, )): control input vector (u1, u2) - u1: steering angle velocity of front wheels - u2: longitudinal acceleration - - Returns: - f (numpy.ndarray): right hand side of differential equations - - - - - - - - def - def f110_gym.envs.dynamic_models.pid - (speed, steer, current_speed, current_steer, max_sv, max_a, max_v, min_v) - pid - - speed - speed - - - steer - steer - - - current_speed - current_speed - - - current_steer - current_steer - - - max_sv - max_sv - - - max_a - max_a - - - max_v - max_v - - - min_v - min_v - - - - -Basic controller for speed/steer -> accl./steer vel. - - Args: - speed (float): desired input speed - steer (float): desired input steering angle - - Returns: - accl (float): desired input acceleration - sv (float): desired input steering velocity - - - - - - - - def - def f110_gym.envs.dynamic_models.func_KS - (x, t, u, mu, C_Sf, C_Sr, lf, lr, h, m, I, s_min, s_max, sv_min, sv_max, v_switch, a_max, v_min, v_max) - func_KS - - x - x - - - t - t - - - u - u - - - mu - mu - - - C_Sf - C_Sf - - - C_Sr - C_Sr - - - lf - lf - - - lr - lr - - - h - h - - - m - m - - - I - I - - - s_min - s_min - - - s_max - s_max - - - sv_min - sv_min - - - sv_max - sv_max - - - v_switch - v_switch - - - a_max - a_max - - - v_min - v_min - - - v_max - v_max - - - - - - - - - - - def - def f110_gym.envs.dynamic_models.func_ST - (x, t, u, mu, C_Sf, C_Sr, lf, lr, h, m, I, s_min, s_max, sv_min, sv_max, v_switch, a_max, v_min, v_max) - func_ST - - x - x - - - t - t - - - u - u - - - mu - mu - - - C_Sf - C_Sf - - - C_Sr - C_Sr - - - lf - lf - - - lr - lr - - - h - h - - - m - m - - - I - I - - - s_min - s_min - - - s_max - s_max - - - sv_min - sv_min - - - sv_max - sv_max - - - v_switch - v_switch - - - a_max - a_max - - - v_min - v_min - - - v_max - v_max - - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1envs_1_1f110__env.xml b/docs/xml/namespacef110__gym_1_1envs_1_1f110__env.xml deleted file mode 100644 index 8988d293..00000000 --- a/docs/xml/namespacef110__gym_1_1envs_1_1f110__env.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - f110_gym::envs::f110_env - f110_gym::envs::f110_env::F110Env - - - int - int f110_gym::envs::f110_env.VIDEO_W - - VIDEO_W - = 600 - - - - - - - - - - int - int f110_gym::envs::f110_env.VIDEO_H - - VIDEO_H - = 400 - - - - - - - - - - int - int f110_gym::envs::f110_env.WINDOW_W - - WINDOW_W - = 1000 - - - - - - - - - - int - int f110_gym::envs::f110_env.WINDOW_H - - WINDOW_H - = 800 - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1envs_1_1f110__env__backup.xml b/docs/xml/namespacef110__gym_1_1envs_1_1f110__env__backup.xml deleted file mode 100644 index d8f723c9..00000000 --- a/docs/xml/namespacef110__gym_1_1envs_1_1f110__env__backup.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - f110_gym::envs::f110_env_backup - f110_gym::envs::f110_env_backup::F110Env - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1envs_1_1laser__models.xml b/docs/xml/namespacef110__gym_1_1envs_1_1laser__models.xml deleted file mode 100644 index f957991a..00000000 --- a/docs/xml/namespacef110__gym_1_1envs_1_1laser__models.xml +++ /dev/null @@ -1,555 +0,0 @@ - - - - f110_gym::envs::laser_models - f110_gym::envs::laser_models::ScanSimulator2D - f110_gym::envs::laser_models::ScanTests - - - def - def f110_gym.envs.laser_models.get_dt - (bitmap, resolution) - get_dt - - bitmap - bitmap - - - resolution - resolution - - - - -Distance transformation, returns the distance matrix from the input bitmap. -Uses scipy.ndimage, cannot be JITted. - - Args: - bitmap (numpy.ndarray, (n, m)): input binary bitmap of the environment, where 0 is obstacles, and 255 (or anything > 0) is freespace - resolution (float): resolution of the input bitmap (m/cell) - - Returns: - dt (numpy.ndarray, (n, m)): output distance matrix, where each cell has the corresponding distance (in meters) to the closest obstacle - - - - - - - - def - def f110_gym.envs.laser_models.xy_2_rc - (x, y, orig_x, orig_y, orig_c, orig_s, height, width, resolution) - xy_2_rc - - x - x - - - y - y - - - orig_x - orig_x - - - orig_y - orig_y - - - orig_c - orig_c - - - orig_s - orig_s - - - height - height - - - width - width - - - resolution - resolution - - - - -Translate (x, y) coordinate into (r, c) in the matrix - - Args: - x (float): coordinate in x (m) - y (float): coordinate in y (m) - orig_x (float): x coordinate of the map origin (m) - orig_y (float): y coordinate of the map origin (m) - - Returns: - r (int): row number in the transform matrix of the given point - c (int): column number in the transform matrix of the given point - - - - - - - - def - def f110_gym.envs.laser_models.distance_transform - (x, y, orig_x, orig_y, orig_c, orig_s, height, width, resolution, dt) - distance_transform - - x - x - - - y - y - - - orig_x - orig_x - - - orig_y - orig_y - - - orig_c - orig_c - - - orig_s - orig_s - - - height - height - - - width - width - - - resolution - resolution - - - dt - dt - - - - -Look up corresponding distance in the distance matrix - - Args: - x (float): x coordinate of the lookup point - y (float): y coordinate of the lookup point - orig_x (float): x coordinate of the map origin (m) - orig_y (float): y coordinate of the map origin (m) - - Returns: - distance (float): corresponding shortest distance to obstacle in meters - - - - - - - - def - def f110_gym.envs.laser_models.trace_ray - (x, y, theta_index, sines, cosines, eps, orig_x, orig_y, orig_c, orig_s, height, width, resolution, dt, max_range) - trace_ray - - x - x - - - y - y - - - theta_index - theta_index - - - sines - sines - - - cosines - cosines - - - eps - eps - - - orig_x - orig_x - - - orig_y - orig_y - - - orig_c - orig_c - - - orig_s - orig_s - - - height - height - - - width - width - - - resolution - resolution - - - dt - dt - - - max_range - max_range - - - - -Find the length of a specific ray at a specific scan angle theta -Purely math calculation and loops, should be JITted. - - Args: - x (float): current x coordinate of the ego (scan) frame - y (float): current y coordinate of the ego (scan) frame - theta_index(int): current index of the scan beam in the scan range - sines (numpy.ndarray (n, )): pre-calculated sines of the angle array - cosines (numpy.ndarray (n, )): pre-calculated cosines ... - - Returns: - total_distance (float): the distance to first obstacle on the current scan beam - - - - - - - - def - def f110_gym.envs.laser_models.get_scan - (pose, theta_dis, fov, num_beams, theta_index_increment, sines, cosines, eps, orig_x, orig_y, orig_c, orig_s, height, width, resolution, dt, max_range) - get_scan - - pose - pose - - - theta_dis - theta_dis - - - fov - fov - - - num_beams - num_beams - - - theta_index_increment - theta_index_increment - - - sines - sines - - - cosines - cosines - - - eps - eps - - - orig_x - orig_x - - - orig_y - orig_y - - - orig_c - orig_c - - - orig_s - orig_s - - - height - height - - - width - width - - - resolution - resolution - - - dt - dt - - - max_range - max_range - - - - -Perform the scan for each discretized angle of each beam of the laser, loop heavy, should be JITted - - Args: - pose (numpy.ndarray(3, )): current pose of the scan frame in the map - theta_dis (int): number of steps to discretize the angles between 0 and 2pi for look up - fov (float): field of view of the laser scan - num_beams (int): number of beams in the scan - theta_index_increment (float): increment between angle indices after discretization - - Returns: - scan (numpy.ndarray(n, )): resulting laser scan at the pose, n=num_beams - - - - - - - - def - def f110_gym.envs.laser_models.check_ttc_jit - (scan, vel, scan_angles, cosines, side_distances, ttc_thresh) - check_ttc_jit - - scan - scan - - - vel - vel - - - scan_angles - scan_angles - - - cosines - cosines - - - side_distances - side_distances - - - ttc_thresh - ttc_thresh - - - - -Checks the iTTC of each beam in a scan for collision with environment - -Args: - scan (np.ndarray(num_beams, )): current scan to check - vel (float): current velocity - scan_angles (np.ndarray(num_beams, )): precomped angles of each beam - cosines (np.ndarray(num_beams, )): precomped cosines of the scan angles - side_distances (np.ndarray(num_beams, )): precomped distances at each beam from the laser to the sides of the car - ttc_thresh (float): threshold for iTTC for collision - -Returns: - in_collision (bool): whether vehicle is in collision with environment - collision_angle (float): at which angle the collision happened - - - - - - - - def - def f110_gym.envs.laser_models.cross - (v1, v2) - cross - - v1 - v1 - - - v2 - v2 - - - - -Cross product of two 2-vectors - -Args: - v1, v2 (np.ndarray(2, )): input vectors - -Returns: - crossproduct (float): cross product - - - - - - - - def - def f110_gym.envs.laser_models.are_collinear - (pt_a, pt_b, pt_c) - are_collinear - - pt_a - pt_a - - - pt_b - pt_b - - - pt_c - pt_c - - - - -Checks if three points are collinear in 2D - -Args: - pt_a, pt_b, pt_c (np.ndarray(2, )): points to check in 2D - -Returns: - col (bool): whether three points are collinear - - - - - - - - def - def f110_gym.envs.laser_models.get_range - (pose, beam_theta, va, vb) - get_range - - pose - pose - - - beam_theta - beam_theta - - - va - va - - - vb - vb - - - - -Get the distance at a beam angle to the vector formed by two of the four vertices of a vehicle - -Args: - pose (np.ndarray(3, )): pose of the scanning vehicle - beam_theta (float): angle of the current beam (world frame) - va, vb (np.ndarray(2, )): the two vertices forming an edge - -Returns: - distance (float): smallest distance at beam theta from scanning pose to edge - - - - - - - - def - def f110_gym.envs.laser_models.ray_cast - (pose, scan, scan_angles, vertices) - ray_cast - - pose - pose - - - scan - scan - - - scan_angles - scan_angles - - - vertices - vertices - - - - -Modify a scan by ray casting onto another agent's four vertices - -Args: - pose (np.ndarray(3, )): pose of the vehicle performing scan - scan (np.ndarray(num_beams, )): original scan to modify - scan_angles (np.ndarray(num_beams, )): corresponding beam angles - vertices (np.ndarray(4, 2)): four vertices of a vehicle pose - -Returns: - new_scan (np.ndarray(num_beams, )): modified scan - - - - - - - - def - def f110_gym.envs.laser_models.main - () - main - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1envs_1_1rendering.xml b/docs/xml/namespacef110__gym_1_1envs_1_1rendering.xml deleted file mode 100644 index f29085fc..00000000 --- a/docs/xml/namespacef110__gym_1_1envs_1_1rendering.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - f110_gym::envs::rendering - f110_gym::envs::rendering::EnvRenderer - - - float - float f110_gym::envs::rendering.ZOOM_IN_FACTOR - - ZOOM_IN_FACTOR - = 1.2 - - - - - - - - - - int - int f110_gym::envs::rendering.ZOOM_OUT_FACTOR - - ZOOM_OUT_FACTOR - = 1/ZOOM_IN_FACTOR - - - - - - - - - - float - float f110_gym::envs::rendering.CAR_LENGTH - - CAR_LENGTH - = 0.58 - - - - - - - - - - float - float f110_gym::envs::rendering.CAR_WIDTH - - CAR_WIDTH - = 0.31 - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1unittest.xml b/docs/xml/namespacef110__gym_1_1unittest.xml deleted file mode 100644 index 0c08ffdf..00000000 --- a/docs/xml/namespacef110__gym_1_1unittest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - f110_gym::unittest - f110_gym::unittest::collision_checks - f110_gym::unittest::dynamics_test - f110_gym::unittest::legacy_scan_gen - f110_gym::unittest::pyglet_test - f110_gym::unittest::pyglet_test_camera - f110_gym::unittest::random_trackgen - f110_gym::unittest::scan_sim - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1unittest_1_1collision__checks.xml b/docs/xml/namespacef110__gym_1_1unittest_1_1collision__checks.xml deleted file mode 100644 index e8ac1328..00000000 --- a/docs/xml/namespacef110__gym_1_1unittest_1_1collision__checks.xml +++ /dev/null @@ -1,266 +0,0 @@ - - - - f110_gym::unittest::collision_checks - f110_gym::unittest::collision_checks::CollisionTests - - - - f110_gym::unittest::collision_checks.cache - - cache - - - - - - - - - - - - def - def f110_gym.unittest.collision_checks.perpendicular - (pt) - perpendicular - - pt - pt - - - - -Return a 2-vector's perpendicular vector - -Args: - pt (np.ndarray, (2,)): input vector - -Returns: - pt (np.ndarray, (2,)): perpendicular vector - - - - - - - - def - def f110_gym.unittest.collision_checks.tripleProduct - (a, b, c) - tripleProduct - - a - a - - - b - b - - - c - c - - - - -Return triple product of three vectors - -Args: - a, b, c (np.ndarray, (2,)): input vectors - -Returns: - (np.ndarray, (2,)): triple product - - - - - - - - def - def f110_gym.unittest.collision_checks.avgPoint - (vertices) - avgPoint - - vertices - vertices - - - - -Return the average point of multiple vertices - -Args: - vertices (np.ndarray, (n, 2)): the vertices we want to find avg on - -Returns: - avg (np.ndarray, (2,)): average point of the vertices - - - - - - - - def - def f110_gym.unittest.collision_checks.indexOfFurthestPoint - (vertices, d) - indexOfFurthestPoint - - vertices - vertices - - - d - d - - - - -Return the index of the vertex furthest away along a direction in the list of vertices - -Args: - vertices (np.ndarray, (n, 2)): the vertices we want to find avg on - -Returns: - idx (int): index of the furthest point - - - - - - - - def - def f110_gym.unittest.collision_checks.support - (vertices1, vertices2, d) - support - - vertices1 - vertices1 - - - vertices2 - vertices2 - - - d - d - - - - -Minkowski sum support function for GJK - -Args: - vertices1 (np.ndarray, (n, 2)): vertices of the first body - vertices2 (np.ndarray, (n, 2)): vertices of the second body - d (np.ndarray, (2, )): direction to find the support along - -Returns: - support (np.ndarray, (n, 2)): Minkowski sum - - - - - - - - def - def f110_gym.unittest.collision_checks.collision - (vertices1, vertices2) - collision - - vertices1 - vertices1 - - - vertices2 - vertices2 - - - - -GJK test to see whether two bodies overlap - -Args: - vertices1 (np.ndarray, (n, 2)): vertices of the first body - vertices2 (np.ndarray, (n, 2)): vertices of the second body - -Returns: - overlap (boolean): True if two bodies collide - - - - - - - - def - def f110_gym.unittest.collision_checks.get_trmtx - (pose) - get_trmtx - - pose - pose - - - - -Get transformation matrix of vehicle frame -> global frame - -Args: - pose (np.ndarray (3, )): current pose of the vehicle - -return: - H (np.ndarray (4, 4)): transformation matrix - - - - - - - - def - def f110_gym.unittest.collision_checks.get_vertices - (pose, length, width) - get_vertices - - pose - pose - - - length - length - - - width - width - - - - -Utility function to return vertices of the car body given pose and size - -Args: - pose (np.ndarray, (3, )): current world coordinate pose of the vehicle - length (float): car length - width (float): car width - -Returns: - vertices (np.ndarray, (4, 2)): corner vertices of the vehicle body - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1unittest_1_1dynamics__test.xml b/docs/xml/namespacef110__gym_1_1unittest_1_1dynamics__test.xml deleted file mode 100644 index b45d2ef7..00000000 --- a/docs/xml/namespacef110__gym_1_1unittest_1_1dynamics__test.xml +++ /dev/null @@ -1,542 +0,0 @@ - - - - f110_gym::unittest::dynamics_test - f110_gym::unittest::dynamics_test::DynamicsTest - - - - f110_gym::unittest::dynamics_test.cache - - cache - - - - - - - - - - - - def - def f110_gym.unittest.dynamics_test.accl_constraints - (vel, accl, v_switch, a_max, v_min, v_max) - accl_constraints - - vel - vel - - - accl - accl - - - v_switch - v_switch - - - a_max - a_max - - - v_min - v_min - - - v_max - v_max - - - - -Acceleration constraints, adjusts the acceleration based on constraints - - Args: - vel (float): current velocity of the vehicle - accl (float): unconstraint desired acceleration - v_switch (float): switching velocity (velocity at which the acceleration is no longer able to create wheel spin) - a_max (float): maximum allowed acceleration - v_min (float): minimum allowed velocity - v_max (float): maximum allowed velocity - - Returns: - accl (float): adjusted acceleration - - - - - - - - def - def f110_gym.unittest.dynamics_test.steering_constraint - (steering_angle, steering_velocity, s_min, s_max, sv_min, sv_max) - steering_constraint - - steering_angle - steering_angle - - - steering_velocity - steering_velocity - - - s_min - s_min - - - s_max - s_max - - - sv_min - sv_min - - - sv_max - sv_max - - - - -Steering constraints, adjusts the steering velocity based on constraints - - Args: - steering_angle (float): current steering_angle of the vehicle - steering_velocity (float): unconstraint desired steering_velocity - s_min (float): minimum steering angle - s_max (float): maximum steering angle - sv_min (float): minimum steering velocity - sv_max (float): maximum steering velocity - - Returns: - steering_velocity (float): adjusted steering velocity - - - - - - - - def - def f110_gym.unittest.dynamics_test.vehicle_dynamics_ks - (x, u_init, mu, C_Sf, C_Sr, lf, lr, h, m, I, s_min, s_max, sv_min, sv_max, v_switch, a_max, v_min, v_max) - vehicle_dynamics_ks - - x - x - - - u_init - u_init - - - mu - mu - - - C_Sf - C_Sf - - - C_Sr - C_Sr - - - lf - lf - - - lr - lr - - - h - h - - - m - m - - - I - I - - - s_min - s_min - - - s_max - s_max - - - sv_min - sv_min - - - sv_max - sv_max - - - v_switch - v_switch - - - a_max - a_max - - - v_min - v_min - - - v_max - v_max - - - - -Single Track Kinematic Vehicle Dynamics. - - Args: - x (numpy.ndarray (3, )): vehicle state vector (x1, x2, x3, x4, x5) - x1: x position in global coordinates - x2: y position in global coordinates - x3: steering angle of front wheels - x4: velocity in x direction - x5: yaw angle - u (numpy.ndarray (2, )): control input vector (u1, u2) - u1: steering angle velocity of front wheels - u2: longitudinal acceleration - - Returns: - f (numpy.ndarray): right hand side of differential equations - - - - - - - - def - def f110_gym.unittest.dynamics_test.vehicle_dynamics_st - (x, u_init, mu, C_Sf, C_Sr, lf, lr, h, m, I, s_min, s_max, sv_min, sv_max, v_switch, a_max, v_min, v_max) - vehicle_dynamics_st - - x - x - - - u_init - u_init - - - mu - mu - - - C_Sf - C_Sf - - - C_Sr - C_Sr - - - lf - lf - - - lr - lr - - - h - h - - - m - m - - - I - I - - - s_min - s_min - - - s_max - s_max - - - sv_min - sv_min - - - sv_max - sv_max - - - v_switch - v_switch - - - a_max - a_max - - - v_min - v_min - - - v_max - v_max - - - - -Single Track Dynamic Vehicle Dynamics. - - Args: - x (numpy.ndarray (3, )): vehicle state vector (x1, x2, x3, x4, x5, x6, x7) - x1: x position in global coordinates - x2: y position in global coordinates - x3: steering angle of front wheels - x4: velocity in x direction - x5: yaw angle - x6: yaw rate - x7: slip angle at vehicle center - u (numpy.ndarray (2, )): control input vector (u1, u2) - u1: steering angle velocity of front wheels - u2: longitudinal acceleration - - Returns: - f (numpy.ndarray): right hand side of differential equations - - - - - - - - def - def f110_gym.unittest.dynamics_test.pid - (speed, steer) - pid - - speed - speed - - - steer - steer - - - - -Basic controller for speed/steer -> accl./steer vel. - - Args: - speed (float): desired input speed - steer (float): desired input steering angle - - Returns: - accl (float): desired input acceleration - sv (float): desired input steering velocity - - - - - - - - def - def f110_gym.unittest.dynamics_test.func_KS - (x, t, u, mu, C_Sf, C_Sr, lf, lr, h, m, I, s_min, s_max, sv_min, sv_max, v_switch, a_max, v_min, v_max) - func_KS - - x - x - - - t - t - - - u - u - - - mu - mu - - - C_Sf - C_Sf - - - C_Sr - C_Sr - - - lf - lf - - - lr - lr - - - h - h - - - m - m - - - I - I - - - s_min - s_min - - - s_max - s_max - - - sv_min - sv_min - - - sv_max - sv_max - - - v_switch - v_switch - - - a_max - a_max - - - v_min - v_min - - - v_max - v_max - - - - - - - - - - - def - def f110_gym.unittest.dynamics_test.func_ST - (x, t, u, mu, C_Sf, C_Sr, lf, lr, h, m, I, s_min, s_max, sv_min, sv_max, v_switch, a_max, v_min, v_max) - func_ST - - x - x - - - t - t - - - u - u - - - mu - mu - - - C_Sf - C_Sf - - - C_Sr - C_Sr - - - lf - lf - - - lr - lr - - - h - h - - - m - m - - - I - I - - - s_min - s_min - - - s_max - s_max - - - sv_min - sv_min - - - sv_max - sv_max - - - v_switch - v_switch - - - a_max - a_max - - - v_min - v_min - - - v_max - v_max - - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1unittest_1_1legacy__scan__gen.xml b/docs/xml/namespacef110__gym_1_1unittest_1_1legacy__scan__gen.xml deleted file mode 100644 index daf5a58e..00000000 --- a/docs/xml/namespacef110__gym_1_1unittest_1_1legacy__scan__gen.xml +++ /dev/null @@ -1,384 +0,0 @@ - - - - f110_gym::unittest::legacy_scan_gen - - - - f110_gym::unittest::legacy_scan_gen.thetas - - thetas - = np.linspace(-2.35, 2.35, num=1080) - - - - - - - - - - string - f110_gym::unittest::legacy_scan_gen.executable_dir - - executable_dir - = '../../../build/' - - - - - - - - - - float - f110_gym::unittest::legacy_scan_gen.mass - - mass - = 3.74 - - - - - - - - - - float - f110_gym::unittest::legacy_scan_gen.l_r - - l_r - = 0.17145 - - - - - - - - - - float - f110_gym::unittest::legacy_scan_gen.I_z - - I_z - = 0.04712 - - - - - - - - - - float - f110_gym::unittest::legacy_scan_gen.mu - - mu - = 0.523 - - - - - - - - - - float - f110_gym::unittest::legacy_scan_gen.h_cg - - h_cg - = 0.074 - - - - - - - - - - float - f110_gym::unittest::legacy_scan_gen.cs_f - - cs_f - = 4.718 - - - - - - - - - - float - f110_gym::unittest::legacy_scan_gen.cs_r - - cs_r - = 5.4562 - - - - - - - - - - int - int f110_gym::unittest::legacy_scan_gen.num_test - - num_test - = 10 - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.test_poses - - test_poses - = np.zeros((num_test, 3)) - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.num - - num - - - - - - - - - - string - string f110_gym::unittest::legacy_scan_gen::map_path - - map_path - = '../../../maps/vegas.yaml' - - - - - - - - - - string - string f110_gym::unittest::legacy_scan_gen::map_ext - - map_ext - = '.png' - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.racecar_env - - racecar_env - = gym.make('f110_gym:f110-v0') - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.double_finish - - double_finish - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.vegas_scan - - vegas_scan - = np.empty((num_test, 1080)) - - - - - - - - - - list - list f110_gym::unittest::legacy_scan_gen::x - - x - = [test_poses[i, 0], 200.] - - - - - - - - - - list - list f110_gym::unittest::legacy_scan_gen::y - - y - = [test_poses[i, 1], 200.] - - - - - - - - - - list - list f110_gym::unittest::legacy_scan_gen::theta - - theta - = [test_poses[i, 2], 0.] - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.obs - - obs - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen._ - - _ - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.berlin_scan - - berlin_scan - = np.empty((num_test, 1080)) - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.skirk_scan - - skirk_scan - = np.empty((num_test, 1080)) - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.vegas - - vegas - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.berlin - - berlin - - - - - - - - - - - f110_gym::unittest::legacy_scan_gen.skirk - - skirk - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1unittest_1_1pyglet__test.xml b/docs/xml/namespacef110__gym_1_1unittest_1_1pyglet__test.xml deleted file mode 100644 index 0acbf61c..00000000 --- a/docs/xml/namespacef110__gym_1_1unittest_1_1pyglet__test.xml +++ /dev/null @@ -1,484 +0,0 @@ - - - - f110_gym::unittest::pyglet_test - f110_gym::unittest::pyglet_test::Camera - f110_gym::unittest::pyglet_test::CenteredCamera - - - - f110_gym::unittest::pyglet_test.parser - - parser - = argparse.ArgumentParser() - - - - - - - - - - - f110_gym::unittest::pyglet_test.type - - type - - - - - - - - - - - f110_gym::unittest::pyglet_test.str - - str - - - - - - - - - - - f110_gym::unittest::pyglet_test.required - - required - - - - - - - - - - - f110_gym::unittest::pyglet_test.True - - True - - - - - - - - - - - f110_gym::unittest::pyglet_test.help - - help - - - - - - - - - - - f110_gym::unittest::pyglet_test.args - - args - = parser.parse_args() - - - - - - - - - - - f110_gym::unittest::pyglet_test.map_metada - - map_metada - = yaml.safe_load(yaml_stream) - - - - - - - - - - - f110_gym::unittest::pyglet_test.map_resolution - - map_resolution - = map_metada['resolution'] - - - - - - - - - - - f110_gym::unittest::pyglet_test.origin - - origin - = map_metada['origin'] - - - - - - - - - - - f110_gym::unittest::pyglet_test.origin_x - - origin_x - = origin[0] - - - - - - - - - - - f110_gym::unittest::pyglet_test.origin_y - - origin_y - = origin[1] - - - - - - - - - - - f110_gym::unittest::pyglet_test.map_img - - map_img - = np.array(Image.open(args.map_path + args.map_ext).transpose(Image.FLIP_TOP_BOTTOM)).astype(np.float64) - - - - - - - - - - - f110_gym::unittest::pyglet_test.map_height - - map_height - = map_img.shape[0] - - - - - - - - - - - f110_gym::unittest::pyglet_test.map_width - - map_width - = map_img.shape[1] - - - - - - - - - - - f110_gym::unittest::pyglet_test.range_x - - range_x - = np.arange(map_width) - - - - - - - - - - - f110_gym::unittest::pyglet_test.range_y - - range_y - = np.arange(map_height) - - - - - - - - - - - tuple f110_gym::unittest::pyglet_test::map_x - - map_x - = (map_x * map_resolution + origin_x).flatten() - - - - - - - - - - - tuple f110_gym::unittest::pyglet_test::map_y - - map_y - = (map_y * map_resolution + origin_y).flatten() - - - - - - - - - - - f110_gym::unittest::pyglet_test.map_z - - map_z - = np.zeros(map_y.shape) - - - - - - - - - - - f110_gym::unittest::pyglet_test.map_coords - - map_coords - = np.vstack((map_x, map_y, map_z)) - - - - - - - - - - float - float f110_gym::unittest::pyglet_test.map_mask - - map_mask - = 0.0 - - - - - - - - - - float - float f110_gym::unittest::pyglet_test.map_mask_flat - - map_mask_flat - = map_mask.flatten() - - - - - - - - - - - f110_gym::unittest::pyglet_test.map_points - - map_points - = map_coords[:, map_mask_flat].T - - - - - - - - - - - f110_gym::unittest::pyglet_test.config - - config - = Config(sample_buffers=1, samples=4, - depth_size=16, double_buffer=True, ) - - - - - - - - - - - f110_gym::unittest::pyglet_test.window - - window - = window.Window(resizable=True, config=config) - - - - - - - - - - - f110_gym::unittest::pyglet_test.cam - - cam - = Camera(window) - - - - - - - - - - - f110_gym::unittest::pyglet_test.batch - - batch - = graphics.Batch() - - - - - - - - - - list - list f110_gym::unittest::pyglet_test.points - - points - = [] - - - - - - - - - - - f110_gym::unittest::pyglet_test.particle - - particle - = batch.add(1, GL_POINTS, None, ('v3f/stream', [map_points[i, 0], map_points[i, 1], map_points[i, 2]])) - - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test.on_resize - (width, height) - on_resize - - width - width - - - height - height - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test.loop - (dt) - loop - - dt - dt - - - - - - - - - - - def - def f110_gym.unittest.pyglet_test.on_draw - () - on_draw - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1unittest_1_1pyglet__test__camera.xml b/docs/xml/namespacef110__gym_1_1unittest_1_1pyglet__test__camera.xml deleted file mode 100644 index 29039c2f..00000000 --- a/docs/xml/namespacef110__gym_1_1unittest_1_1pyglet__test__camera.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - f110_gym::unittest::pyglet_test_camera - f110_gym::unittest::pyglet_test_camera::App - - - float - float f110_gym::unittest::pyglet_test_camera.ZOOM_IN_FACTOR - - ZOOM_IN_FACTOR - = 1.2 - - - - - - - - - - int - int f110_gym::unittest::pyglet_test_camera.ZOOM_OUT_FACTOR - - ZOOM_OUT_FACTOR - = 1/ZOOM_IN_FACTOR - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1unittest_1_1random__trackgen.xml b/docs/xml/namespacef110__gym_1_1unittest_1_1random__trackgen.xml deleted file mode 100644 index e65e7637..00000000 --- a/docs/xml/namespacef110__gym_1_1unittest_1_1random__trackgen.xml +++ /dev/null @@ -1,204 +0,0 @@ - - - - f110_gym::unittest::random_trackgen - - - - f110_gym::unittest::random_trackgen.parser - - parser - = argparse.ArgumentParser() - - - - - - - - - - - f110_gym::unittest::random_trackgen.type - - type - - - - - - - - - - - f110_gym::unittest::random_trackgen.int - - int - - - - - - - - - - - f110_gym::unittest::random_trackgen.default - - default - - - - - - - - - - - f110_gym::unittest::random_trackgen.help - - help - - - - - - - - - - - f110_gym::unittest::random_trackgen.args - - args - = parser.parse_args() - - - - - - - - - - - f110_gym::unittest::random_trackgen.NUM_MAPS - - NUM_MAPS - = args.num_maps - - - - - - - - - - float - float f110_gym::unittest::random_trackgen.WIDTH - - WIDTH - = 10.0 - - - - - - - - - - - f110_gym::unittest::random_trackgen.track - - track - - - - - - - - - - - f110_gym::unittest::random_trackgen.track_int - - track_int - - - - - - - - - - - f110_gym::unittest::random_trackgen.track_ext - - track_ext - - - - - - - - - - - - def - def f110_gym.unittest.random_trackgen.create_track - () - create_track - - - - - - - - - - def - def f110_gym.unittest.random_trackgen.convert_track - (track, track_int, track_ext, iter) - convert_track - - track - track - - - track_int - track_int - - - track_ext - track_ext - - - iter - iter - - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacef110__gym_1_1unittest_1_1scan__sim.xml b/docs/xml/namespacef110__gym_1_1unittest_1_1scan__sim.xml deleted file mode 100644 index 0802d054..00000000 --- a/docs/xml/namespacef110__gym_1_1unittest_1_1scan__sim.xml +++ /dev/null @@ -1,363 +0,0 @@ - - - - f110_gym::unittest::scan_sim - f110_gym::unittest::scan_sim::ScanSimulator2D - f110_gym::unittest::scan_sim::ScanTests - - - def - def f110_gym.unittest.scan_sim.get_dt - (bitmap, resolution) - get_dt - - bitmap - bitmap - - - resolution - resolution - - - - -Distance transformation, returns the distance matrix from the input bitmap. -Uses scipy.ndimage, cannot be JITted. - - Args: - bitmap (numpy.ndarray, (n, m)): input binary bitmap of the environment, where 0 is obstacles, and 255 (or anything > 0) is freespace - resolution (float): resolution of the input bitmap (m/cell) - - Returns: - dt (numpy.ndarray, (n, m)): output distance matrix, where each cell has the corresponding distance (in meters) to the closest obstacle - - - - - - - - def - def f110_gym.unittest.scan_sim.xy_2_rc - (x, y, orig_x, orig_y, orig_c, orig_s, height, width, resolution) - xy_2_rc - - x - x - - - y - y - - - orig_x - orig_x - - - orig_y - orig_y - - - orig_c - orig_c - - - orig_s - orig_s - - - height - height - - - width - width - - - resolution - resolution - - - - -Translate (x, y) coordinate into (r, c) in the matrix - - Args: - x (float): coordinate in x (m) - y (float): coordinate in y (m) - orig_x (float): x coordinate of the map origin (m) - orig_y (float): y coordinate of the map origin (m) - - Returns: - r (int): row number in the transform matrix of the given point - c (int): column number in the transform matrix of the given point - - - - - - - - def - def f110_gym.unittest.scan_sim.distance_transform - (x, y, orig_x, orig_y, orig_c, orig_s, height, width, resolution, dt) - distance_transform - - x - x - - - y - y - - - orig_x - orig_x - - - orig_y - orig_y - - - orig_c - orig_c - - - orig_s - orig_s - - - height - height - - - width - width - - - resolution - resolution - - - dt - dt - - - - -Look up corresponding distance in the distance matrix - - Args: - x (float): x coordinate of the lookup point - y (float): y coordinate of the lookup point - orig_x (float): x coordinate of the map origin (m) - orig_y (float): y coordinate of the map origin (m) - - Returns: - distance (float): corresponding shortest distance to obstacle in meters - - - - - - - - def - def f110_gym.unittest.scan_sim.trace_ray - (x, y, theta_index, sines, cosines, eps, orig_x, orig_y, orig_c, orig_s, height, width, resolution, dt, max_range) - trace_ray - - x - x - - - y - y - - - theta_index - theta_index - - - sines - sines - - - cosines - cosines - - - eps - eps - - - orig_x - orig_x - - - orig_y - orig_y - - - orig_c - orig_c - - - orig_s - orig_s - - - height - height - - - width - width - - - resolution - resolution - - - dt - dt - - - max_range - max_range - - - - -Find the length of a specific ray at a specific scan angle theta -Purely math calculation and loops, should be JITted. - - Args: - x (float): current x coordinate of the ego (scan) frame - y (float): current y coordinate of the ego (scan) frame - theta_index(int): current index of the scan beam in the scan range - sines (numpy.ndarray (n, )): pre-calculated sines of the angle array - cosines (numpy.ndarray (n, )): pre-calculated cosines ... - - Returns: - total_distance (float): the distance to first obstacle on the current scan beam - - - - - - - - def - def f110_gym.unittest.scan_sim.get_scan - (pose, theta_dis, fov, num_beams, theta_index_increment, sines, cosines, eps, orig_x, orig_y, orig_c, orig_s, height, width, resolution, dt, max_range) - get_scan - - pose - pose - - - theta_dis - theta_dis - - - fov - fov - - - num_beams - num_beams - - - theta_index_increment - theta_index_increment - - - sines - sines - - - cosines - cosines - - - eps - eps - - - orig_x - orig_x - - - orig_y - orig_y - - - orig_c - orig_c - - - orig_s - orig_s - - - height - height - - - width - width - - - resolution - resolution - - - dt - dt - - - max_range - max_range - - - - -Perform the scan for each discretized angle of each beam of the laser, loop heavy, should be JITted - - Args: - pose (numpy.ndarray(3, )): current pose of the scan frame in the map - theta_dis (int): number of steps to discretize the angles between 0 and 2pi for look up - fov (float): field of view of the laser scan - num_beams (int): number of beams in the scan - theta_index_increment (float): increment between angle indices after discretization - - Returns: - scan (numpy.ndarray(n, )): resulting laser scan at the pose, n=num_beams - - - - - - - - def - def f110_gym.unittest.scan_sim.main - () - main - - - - - - - - - - - - - - - - diff --git a/docs/xml/namespacegym.xml b/docs/xml/namespacegym.xml deleted file mode 100644 index 57202419..00000000 --- a/docs/xml/namespacegym.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - gym - - - - - - - diff --git a/docs/xml/namespacegym_1_1envs_1_1unittest_1_1scan__sim.xml b/docs/xml/namespacegym_1_1envs_1_1unittest_1_1scan__sim.xml deleted file mode 100644 index 5004a69c..00000000 --- a/docs/xml/namespacegym_1_1envs_1_1unittest_1_1scan__sim.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - gym::envs::unittest::scan_sim - - - - - - - diff --git a/docs/xml/namespacepyglet_1_1gl.xml b/docs/xml/namespacepyglet_1_1gl.xml deleted file mode 100644 index 5ffbead9..00000000 --- a/docs/xml/namespacepyglet_1_1gl.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - pyglet::gl - - - - - - - diff --git a/docs/xml/namespaceunittest.xml b/docs/xml/namespaceunittest.xml deleted file mode 100644 index 2dbf26e1..00000000 --- a/docs/xml/namespaceunittest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - unittest - - - - - - - diff --git a/docs/xml/namespaceutils.xml b/docs/xml/namespaceutils.xml deleted file mode 100644 index 5e257bc9..00000000 --- a/docs/xml/namespaceutils.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - utils - - - - - - - diff --git a/docs/xml/pyglet__test_8py.xml b/docs/xml/pyglet__test_8py.xml deleted file mode 100644 index a43b1935..00000000 --- a/docs/xml/pyglet__test_8py.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - pyglet_test.py - f110_gym::unittest::pyglet_test::Camera - f110_gym::unittest::pyglet_test::CenteredCamera - f110_gym::unittest::pyglet_test - - - - - -importnumpyasnp -fromPILimportImage -importyaml - -frompyglet.glimport* -importpyglet -frompygletimportfont,graphics,window - -importargparse - -classCamera: -"""Asimple2Dcamerathatcontainsthespeedandoffset.""" - -def__init__(self,window:pyglet.window.Window,scroll_speed=1,min_zoom=1,max_zoom=4): -assertmin_zoom<=max_zoom,"Minimumzoommustnotbegreaterthanmaximumzoom" -self._window=window -self.scroll_speed=scroll_speed -self.max_zoom=max_zoom -self.min_zoom=min_zoom -self.offset_x=0 -self.offset_y=0 -self._zoom=max(min(1,self.max_zoom),self.min_zoom) - -@property -defzoom(self): -returnself._zoom - -@zoom.setter -defzoom(self,value): -"""Herewesetzoom,clampvaluetominimumofmin_zoomandmaxofmax_zoom.""" -self._zoom=max(min(value,self.max_zoom),self.min_zoom) - -@property -defposition(self): -"""Querythecurrentoffset.""" -returnself.offset_x,self.offset_y - -@position.setter -defposition(self,value): -"""Setthescrolloffsetdirectly.""" -self.offset_x,self.offset_y=value - -defmove(self,axis_x,axis_y): -"""Moveaxisdirectionwithscroll_speed. -Example:Moveleft->move(-1,0) -""" -self.offset_x+=self.scroll_speed*axis_x -self.offset_y+=self.scroll_speed*axis_y - -defbegin(self): -#Setthecurrentcameraoffsetsoyoucandrawyourscene. - -#Translateusingtheoffset. -view_matrix=self._window.view.translate(-self.offset_x*self._zoom,-self.offset_y*self._zoom,0) -#Scalebyzoomlevel. -view_matrix=view_matrix.scale(self._zoom,self._zoom,1) - -self._window.view=view_matrix - -defend(self): -#Sincethisisamatrix,youwillneedtoreversethetranslateafterrenderingotherwise -#itwillmultiplythecurrentoffseteverydrawupdatepushingitfurtherandfurtheraway. - -#Reversescale,sincethatwasthelasttransform. -view_matrix=self._window.view.scale(1/self._zoom,1/self._zoom,1) -#Reversetranslate. -view_matrix=view_matrix.translate(self.offset_x*self._zoom,self.offset_y*self._zoom,0) - -self._window.view=view_matrix - -def__enter__(self): -self.begin() - -def__exit__(self,exception_type,exception_value,traceback): -self.end() - - -classCenteredCamera(Camera): -"""Asimple2Dcameraclass.0,0willbethecenterofthescreen,asopposedtothebottomleft.""" - -defbegin(self): -x=-self._window.width//2/self._zoom+self.offset_x -y=-self._window.height//2/self._zoom+self.offset_y - -view_matrix=self._window.view.translate(-x*self._zoom,-y*self._zoom,0) -view_matrix=view_matrix.scale(self._zoom,self._zoom,1) -self._window.view=view_matrix - -defend(self): -x=-self._window.width//2/self._zoom+self.offset_x -y=-self._window.height//2/self._zoom+self.offset_y - -view_matrix=self._window.view.scale(1/self._zoom,1/self._zoom,1) -view_matrix=view_matrix.translate(x*self._zoom,y*self._zoom,0) -self._window.view=view_matrix - - - -parser=argparse.ArgumentParser() -parser.add_argument('--map_path',type=str,required=True,help='Pathtothemapwithoutextensions') -parser.add_argument('--map_ext',type=str,required=True,help='Extensionofthemapimagefile') -args=parser.parse_args() - -#loadmapyaml -withopen(args.map_path+'.yaml','r')asyaml_stream: -try: -map_metada=yaml.safe_load(yaml_stream) -map_resolution=map_metada['resolution'] -origin=map_metada['origin'] -origin_x=origin[0] -origin_y=origin[1] -exceptyaml.YAMLErrorasex: -print(ex) - -#loadmapimage -map_img=np.array(Image.open(args.map_path+args.map_ext).transpose(Image.FLIP_TOP_BOTTOM)).astype(np.float64) -map_height=map_img.shape[0] -map_width=map_img.shape[1] - -#convertmappixelstocoordinates -range_x=np.arange(map_width) -range_y=np.arange(map_height) -map_x,map_y=np.meshgrid(range_x,range_y) -map_x=(map_x*map_resolution+origin_x).flatten() -map_y=(map_y*map_resolution+origin_y).flatten() -map_z=np.zeros(map_y.shape) -map_coords=np.vstack((map_x,map_y,map_z)) - -#maskandonlyleavetheobstaclepoints -map_mask=map_img==0.0 -map_mask_flat=map_mask.flatten() -map_points=map_coords[:,map_mask_flat].T - -#prepopengl -try: -#Tryandcreateawindowwithmultisampling(antialiasing) -config=Config(sample_buffers=1,samples=4, -depth_size=16,double_buffer=True,) -window=window.Window(resizable=True,config=config) -exceptwindow.NoSuchConfigException: -#Fallbacktonomultisamplingforoldhardware -window=window.Window(resizable=True) - -glClearColor(18/255,4/255,88/255,1.) -glEnable(GL_DEPTH_TEST) -glTranslatef(25,-5,-60) - -cam=Camera(window) - -@window.event -defon_resize(width,height): -#Overridethedefaulton_resizehandlertocreatea3Dprojection -glViewport(0,0,width,height) -glMatrixMode(GL_PROJECTION) -glLoadIdentity() -gluPerspective(60.,width/float(height),.1,1000.) -glMatrixMode(GL_MODELVIEW) -returnpyglet.event.EVENT_HANDLED - -batch=graphics.Batch() - -points=[] -foriinrange(map_points.shape[0]): -particle=batch.add(1,GL_POINTS,None,('v3f/stream',[map_points[i,0],map_points[i,1],map_points[i,2]])) -points.append(particle) - -defloop(dt): -print(pyglet.clock.get_fps()) -pass - -@window.event -defon_draw(): -glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT) -glColor3f(254/255,117/255,254/255) -cam.begin() -batch.draw() -cam.end() - -pyglet.clock.schedule(loop) -pyglet.app.run() - - - - diff --git a/docs/xml/pyglet__test__camera_8py.xml b/docs/xml/pyglet__test__camera_8py.xml deleted file mode 100644 index 89cad37e..00000000 --- a/docs/xml/pyglet__test__camera_8py.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - pyglet_test_camera.py - f110_gym::unittest::pyglet_test_camera::App - f110_gym::unittest::pyglet_test_camera - - - - - -importpyglet -frompyglet.glimport* - -#Zoomingconstants -ZOOM_IN_FACTOR=1.2 -ZOOM_OUT_FACTOR=1/ZOOM_IN_FACTOR - -classApp(pyglet.window.Window): - -def__init__(self,width,height,*args,**kwargs): -conf=Config(sample_buffers=1, -samples=4, -depth_size=16, -double_buffer=True) -super().__init__(width,height,config=conf,*args,**kwargs) - -#Initializecameravalues -self.left=0 -self.right=width -self.bottom=0 -self.top=height -self.zoom_level=1 -self.zoomed_width=width -self.zoomed_height=height - -definit_gl(self,width,height): -#Setclearcolor -glClearColor(0/255,0/255,0/255,0/255) - -#Setantialiasing -glEnable(GL_LINE_SMOOTH) -glEnable(GL_POLYGON_SMOOTH) -glHint(GL_LINE_SMOOTH_HINT,GL_NICEST) - -#Setalphablending -glEnable(GL_BLEND) -glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) - -#Setviewport -glViewport(0,0,width,height) - -defon_resize(self,width,height): -super().on_resize(width,height) -size=self.get_size() -self.left=0 -self.right=size[0] -self.bottom=0 -self.top=size[1] -self.zoomed_width=size[0] -self.zoomed_height=size[1] - -##Setwindowvalues -#self.width=width -#self.height=height -##InitializeOpenGLcontext -#self.init_gl(width,height) -#self.width=width -#self.height=height -#pass - -defon_mouse_drag(self,x,y,dx,dy,buttons,modifiers): -#Movecamera -self.left-=dx*self.zoom_level -self.right-=dx*self.zoom_level -self.bottom-=dy*self.zoom_level -self.top-=dy*self.zoom_level - -defon_mouse_scroll(self,x,y,dx,dy): -#Getscalefactor -f=ZOOM_IN_FACTORifdy>0elseZOOM_OUT_FACTORifdy<0else1 -#Ifzoom_levelisintheproperrange -if.2<self.zoom_level*f<5: - -self.zoom_level*=f - -size=self.get_size() - -mouse_x=x/size[0] -mouse_y=y/size[1] - -mouse_x_in_world=self.left+mouse_x*self.zoomed_width -mouse_y_in_world=self.bottom+mouse_y*self.zoomed_height - -self.zoomed_width*=f -self.zoomed_height*=f - -self.left=mouse_x_in_world-mouse_x*self.zoomed_width -self.right=mouse_x_in_world+(1-mouse_x)*self.zoomed_width -self.bottom=mouse_y_in_world-mouse_y*self.zoomed_height -self.top=mouse_y_in_world+(1-mouse_y)*self.zoomed_height - -defon_draw(self): -#InitializeProjectionmatrix -glMatrixMode(GL_PROJECTION) -glLoadIdentity() - -#InitializeModelviewmatrix -glMatrixMode(GL_MODELVIEW) -glLoadIdentity() -#Savethedefaultmodelviewmatrix -glPushMatrix() - -#ClearwindowwithClearColor -glClear(GL_COLOR_BUFFER_BIT) - -#Setorthographicprojectionmatrix -glOrtho(self.left,self.right,self.bottom,self.top,1,-1) - -#Drawquad -glBegin(GL_QUADS) -glColor3ub(0xFF,0,0) -glVertex2i(10,10) - -glColor3ub(0xFF,0xFF,0) -glVertex2i(110,10) - -glColor3ub(0,0xFF,0) -glVertex2i(110,110) - -glColor3ub(0,0,0xFF) -glVertex2i(10,110) -glEnd() - -#Removedefaultmodelviewmatrix -glPopMatrix() - -defrun(self): -pyglet.app.run() - - -App(800,800,resizable=True).run() - - - - diff --git a/docs/xml/random__trackgen_8py.xml b/docs/xml/random__trackgen_8py.xml deleted file mode 100644 index 72b46a45..00000000 --- a/docs/xml/random__trackgen_8py.xml +++ /dev/null @@ -1,248 +0,0 @@ - - - - random_trackgen.py - f110_gym::unittest::random_trackgen - - - - - -#MITLicense - -#Copyright(c)2020JosephAuckley,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy -#ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal -#intheSoftwarewithoutrestriction,includingwithoutlimitationtherights -#touse,copy,modify,merge,publish,distribute,sublicense,and/orsell -#copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis -#furnishedtodoso,subjecttothefollowingconditions: - -#Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall -#copiesorsubstantialportionsoftheSoftware. - -#THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR -#IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY, -#FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE -#AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER -#LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM, -#OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE -#SOFTWARE. - - -""" -Generatesrandomtracks. -Adaptedfromhttps://gym.openai.com/envs/CarRacing-v0 -Author:HongruiZheng -""" - -importcv2 -importos -importmath -importnumpyasnp -importshapely.geometryasshp -importmatplotlib.pyplotasplt -frommatplotlib.patchesimportPolygon -frommatplotlib.collectionsimportPatchCollection -importargparse - -parser=argparse.ArgumentParser() -parser.add_argument('--seed',type=int,default=123,help='Seedforthenumpyrng.') -parser.add_argument('--num_maps',type=int,default=1,help='Numberofmapstogenerate.') -args=parser.parse_args() - -np.random.seed(args.seed) - -ifnotos.path.exists('maps'): -print('Creatingmaps/directory.') -os.makedirs('maps') -ifnotos.path.exists('centerline'): -print('Creatingcenterline/directory.') -os.makedirs('centerline') - -NUM_MAPS=args.num_maps -WIDTH=10.0 -defcreate_track(): -CHECKPOINTS=16 -SCALE=6.0 -TRACK_RAD=900/SCALE -TRACK_DETAIL_STEP=21/SCALE -TRACK_TURN_RATE=0.31 - -start_alpha=0. - -#Createcheckpoints -checkpoints=[] -forcinrange(CHECKPOINTS): -alpha=2*math.pi*c/CHECKPOINTS+np.random.uniform(0,2*math.pi*1/CHECKPOINTS) -rad=np.random.uniform(TRACK_RAD/3,TRACK_RAD) -ifc==0: -alpha=0 -rad=1.5*TRACK_RAD -ifc==CHECKPOINTS-1: -alpha=2*math.pi*c/CHECKPOINTS -start_alpha=2*math.pi*(-0.5)/CHECKPOINTS -rad=1.5*TRACK_RAD -checkpoints.append((alpha,rad*math.cos(alpha),rad*math.sin(alpha))) -road=[] - -#Gofromonecheckpointtoanothertocreatetrack -x,y,beta=1.5*TRACK_RAD,0,0 -dest_i=0 -laps=0 -track=[] -no_freeze=2500 -visited_other_side=False -whileTrue: -alpha=math.atan2(y,x) -ifvisited_other_sideandalpha>0: -laps+=1 -visited_other_side=False -ifalpha<0: -visited_other_side=True -alpha+=2*math.pi -whileTrue: -failed=True -whileTrue: -dest_alpha,dest_x,dest_y=checkpoints[dest_i%len(checkpoints)] -ifalpha<=dest_alpha: -failed=False -break -dest_i+=1 -ifdest_i%len(checkpoints)==0: -break -ifnotfailed: -break -alpha-=2*math.pi -continue -r1x=math.cos(beta) -r1y=math.sin(beta) -p1x=-r1y -p1y=r1x -dest_dx=dest_x-x -dest_dy=dest_y-y -proj=r1x*dest_dx+r1y*dest_dy -whilebeta-alpha>1.5*math.pi: -beta-=2*math.pi -whilebeta-alpha<-1.5*math.pi: -beta+=2*math.pi -prev_beta=beta -proj*=SCALE -ifproj>0.3: -beta-=min(TRACK_TURN_RATE,abs(0.001*proj)) -ifproj<-0.3: -beta+=min(TRACK_TURN_RATE,abs(0.001*proj)) -x+=p1x*TRACK_DETAIL_STEP -y+=p1y*TRACK_DETAIL_STEP -track.append((alpha,prev_beta*0.5+beta*0.5,x,y)) -iflaps>4: -break -no_freeze-=1 -ifno_freeze==0: -break - -#Findclosedloop -i1,i2=-1,-1 -i=len(track) -whileTrue: -i-=1 -ifi==0: -returnFalse -pass_through_start=track[i][0]>start_alphaandtrack[i-1][0]<=start_alpha -ifpass_through_startandi2==-1: -i2=i -elifpass_through_startandi1==-1: -i1=i -break -print("Trackgeneration:%i..%i->%i-tilestrack"%(i1,i2,i2-i1)) -asserti1!=-1 -asserti2!=-1 - -track=track[i1:i2-1] -first_beta=track[0][1] -first_perp_x=math.cos(first_beta) -first_perp_y=math.sin(first_beta) - -#Lengthofperpendicularjumptoputtogetherheadandtail -well_glued_together=np.sqrt( -np.square(first_perp_x*(track[0][2]-track[-1][2]))+ -np.square(first_perp_y*(track[0][3]-track[-1][3]))) -ifwell_glued_together>TRACK_DETAIL_STEP: -returnFalse - -#postprocessing,convertingtonumpy,findingexteriorandinteriorwalls -track_xy=[(x,y)for(a1,b1,x,y)intrack] -track_xy=np.asarray(track_xy) -track_poly=shp.Polygon(track_xy) -track_xy_offset_in=track_poly.buffer(WIDTH) -track_xy_offset_out=track_poly.buffer(-WIDTH) -track_xy_offset_in_np=np.array(track_xy_offset_in.exterior) -track_xy_offset_out_np=np.array(track_xy_offset_out.exterior) -returntrack_xy,track_xy_offset_in_np,track_xy_offset_out_np - - -defconvert_track(track,track_int,track_ext,iter): - -#convertstracktoimageandsavesthecenterlineaswaypoints -fig,ax=plt.subplots() -fig.set_size_inches(20,20) -ax.plot(*track_int.T,color='black',linewidth=3) -ax.plot(*track_ext.T,color='black',linewidth=3) -plt.tight_layout() -ax.set_aspect('equal') -ax.set_xlim(-180,300) -ax.set_ylim(-300,300) -plt.axis('off') -plt.savefig('maps/map'+str(iter)+'.png',dpi=80) - -map_width,map_height=fig.canvas.get_width_height() -print('mapsize:',map_width,map_height) - -#transformthetrackcenterlineintopixelcoordinates -xy_pixels=ax.transData.transform(track) -origin_x_pix=xy_pixels[0,0] -origin_y_pix=xy_pixels[0,1] - -xy_pixels=xy_pixels-np.array([[origin_x_pix,origin_y_pix]]) - -map_origin_x=-origin_x_pix*0.05 -map_origin_y=-origin_y_pix*0.05 - -#convertimageusingcv2 -cv_img=cv2.imread('maps/map'+str(iter)+'.png',-1) -#converttobw -cv_img_bw=cv2.cvtColor(cv_img,cv2.COLOR_BGR2GRAY) -#savingtoimg -cv2.imwrite('maps/map'+str(iter)+'.png',cv_img_bw) -cv2.imwrite('maps/map'+str(iter)+'.pgm',cv_img_bw) - -#createyamlfile -yaml=open('maps/map'+str(iter)+'.yaml','w') -yaml.write('image:map'+str(iter)+'.pgm\n') -yaml.write('resolution:0.062500\n') -yaml.write('origin:['+str(map_origin_x)+','+str(map_origin_y)+',0.000000]\n') -yaml.write('negate:0\noccupied_thresh:0.45\nfree_thresh:0.196') -yaml.close() -plt.close() - -#savingtrackcenterlineasacsvinroscoords -waypoints_csv=open('centerline/map'+str(iter)+'.csv','w') -forrowinxy_pixels: -waypoints_csv.write(str(0.05*row[0])+','+str(0.05*row[1])+'\n') -waypoints_csv.close() - - - -if__name__=='__main__': -foriinrange(NUM_MAPS): -try: -track,track_int,track_ext=create_track() -except: -print('Randomgeneratorfailed,retrying') -continue -convert_track(track,track_int,track_ext,i) - - - - diff --git a/docs/xml/rendering_8py.xml b/docs/xml/rendering_8py.xml deleted file mode 100644 index fca16f6f..00000000 --- a/docs/xml/rendering_8py.xml +++ /dev/null @@ -1,352 +0,0 @@ - - - - rendering.py - f110_gym::envs::rendering::EnvRenderer - f110_gym::envs::rendering - pyglet::gl - - - - - -#MITLicense - -#Copyright(c)2020JosephAuckley,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy -#ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal -#intheSoftwarewithoutrestriction,includingwithoutlimitationtherights -#touse,copy,modify,merge,publish,distribute,sublicense,and/orsell -#copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis -#furnishedtodoso,subjecttothefollowingconditions: - -#Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall -#copiesorsubstantialportionsoftheSoftware. - -#THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR -#IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY, -#FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE -#AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER -#LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM, -#OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE -#SOFTWARE. - - - -""" -Renderingengineforf1tenthgymenvbasedonpygletandOpenGL -Author:HongruiZheng -""" - -#openglstuff -importpyglet -frompyglet.glimport* - -#other -importnumpyasnp -fromPILimportImage -importyaml - -#helpers -fromf110_gym.envs.collision_modelsimportget_vertices - -#zoomingconstants -ZOOM_IN_FACTOR=1.2 -ZOOM_OUT_FACTOR=1/ZOOM_IN_FACTOR - -#vehicleshapeconstants -CAR_LENGTH=0.58 -CAR_WIDTH=0.31 - -classEnvRenderer(pyglet.window.Window): -""" -Awindowclassinheritedfrompyglet.window.Window,handlesthecamera/projectioninteraction,resizingwindow,andrenderingtheenvironment -""" -def__init__(self,width,height,*args,**kwargs): -""" -Classconstructor - -Args: -width(int):widthofthewindow -height(int):heightofthewindow - -Returns: -None -""" -conf=Config(sample_buffers=1, -samples=4, -depth_size=16, -double_buffer=True) -super().__init__(width,height,config=conf,resizable=True,vsync=False,*args,**kwargs) - -#glinit -glClearColor(9/255,32/255,87/255,1.) - -#initializecameravalues -self.left=-width/2 -self.right=width/2 -self.bottom=-height/2 -self.top=height/2 -self.zoom_level=1.2 -self.zoomed_width=width -self.zoomed_height=height - -#currentbatchthatkeepstrackofallgraphics -self.batch=pyglet.graphics.Batch() - -#currentenvmap -self.map_points=None - -#currentenvagentposes,(num_agents,3),columnsare(x,y,theta) -self.poses=None - -#currentenvagentvertices,(num_agents,4,2),2ndand3rddimensionsarethe4cornersin2D -self.vertices=None - -#currentscorelabel -self.score_label=pyglet.text.Label( -'LapTime:{laptime:.2f},EgoLapCount:{count:.0f}'.format( -laptime=0.0,count=0.0), -font_size=36, -x=0, -y=-800, -anchor_x='center', -anchor_y='center', -#width=0.01, -#height=0.01, -color=(255,255,255,255), -batch=self.batch) - -self.fps_display=pyglet.window.FPSDisplay(self) - -defupdate_map(self,map_path,map_ext): -""" -Updatethemapbeingdrawnbytherenderer.Convertsimagetoalistof3Dpointsrepresentingeachobstaclepixelinthemap. - -Args: -map_path(str):absolutepathtothemapwithoutextensions -map_ext(str):extensionforthemapimagefile - -Returns: -None -""" - -#loadmapmetadata -withopen(map_path+'.yaml','r')asyaml_stream: -try: -map_metadata=yaml.safe_load(yaml_stream) -map_resolution=map_metadata['resolution'] -origin=map_metadata['origin'] -origin_x=origin[0] -origin_y=origin[1] -exceptyaml.YAMLErrorasex: -print(ex) - -#loadmapimage -map_img=np.array(Image.open(map_path+map_ext).transpose(Image.FLIP_TOP_BOTTOM)).astype(np.float64) -map_height=map_img.shape[0] -map_width=map_img.shape[1] - -#convertmappixelstocoordinates -range_x=np.arange(map_width) -range_y=np.arange(map_height) -map_x,map_y=np.meshgrid(range_x,range_y) -map_x=(map_x*map_resolution+origin_x).flatten() -map_y=(map_y*map_resolution+origin_y).flatten() -map_z=np.zeros(map_y.shape) -map_coords=np.vstack((map_x,map_y,map_z)) - -#maskandonlyleavetheobstaclepoints -map_mask=map_img==0.0 -map_mask_flat=map_mask.flatten() -map_points=50.*map_coords[:,map_mask_flat].T -foriinrange(map_points.shape[0]): -self.batch.add(1,GL_POINTS,None,('v3f/stream',[map_points[i,0],map_points[i,1],map_points[i,2]]),('c3B/stream',[183,193,222])) -self.map_points=map_points - -defon_resize(self,width,height): -""" -Callbackfunctiononwindowresize,overridesinheritedmethod,andupdatescameravaluesontopoftheinheritedon_resize()method. - -Potentialimprovementsoncurrentbehavior:zoom/panresetsonwindowresize. - -Args: -width(int):newwidthofwindow -height(int):newheightofwindow - -Returns: -None -""" - -#calloverridedfunction -super().on_resize(width,height) - -#updatecameravalue -(width,height)=self.get_size() -self.left=-self.zoom_level*width/2 -self.right=self.zoom_level*width/2 -self.bottom=-self.zoom_level*height/2 -self.top=self.zoom_level*height/2 -self.zoomed_width=self.zoom_level*width -self.zoomed_height=self.zoom_level*height - -defon_mouse_drag(self,x,y,dx,dy,buttons,modifiers): -""" -Callbackfunctiononmousedrag,overridesinheritedmethod. - -Args: -x(int):Distanceinpixelsfromtheleftedgeofthewindow. -y(int):Distanceinpixelsfromthebottomedgeofthewindow. -dx(int):RelativeXpositionfromthepreviousmouseposition. -dy(int):RelativeYpositionfromthepreviousmouseposition. -buttons(int):Bitwisecombinationofthemousebuttonscurrentlypressed. -modifiers(int):Bitwisecombinationofanykeyboardmodifierscurrentlyactive. - -Returns: -None -""" - -#pancamera -self.left-=dx*self.zoom_level -self.right-=dx*self.zoom_level -self.bottom-=dy*self.zoom_level -self.top-=dy*self.zoom_level - -defon_mouse_scroll(self,x,y,dx,dy): -""" -Callbackfunctiononmousescroll,overridesinheritedmethod. - -Args: -x(int):Distanceinpixelsfromtheleftedgeofthewindow. -y(int):Distanceinpixelsfromthebottomedgeofthewindow. -scroll_x(float):Amountofmovementonthehorizontalaxis. -scroll_y(float):Amountofmovementontheverticalaxis. - -Returns: -None -""" - -#Getscalefactor -f=ZOOM_IN_FACTORifdy>0elseZOOM_OUT_FACTORifdy<0else1 - -#Ifzoom_levelisintheproperrange -if.01<self.zoom_level*f<10: - -self.zoom_level*=f - -(width,height)=self.get_size() - -mouse_x=x/width -mouse_y=y/height - -mouse_x_in_world=self.left+mouse_x*self.zoomed_width -mouse_y_in_world=self.bottom+mouse_y*self.zoomed_height - -self.zoomed_width*=f -self.zoomed_height*=f - -self.left=mouse_x_in_world-mouse_x*self.zoomed_width -self.right=mouse_x_in_world+(1-mouse_x)*self.zoomed_width -self.bottom=mouse_y_in_world-mouse_y*self.zoomed_height -self.top=mouse_y_in_world+(1-mouse_y)*self.zoomed_height - -defon_close(self): -""" -Callbackfunctionwhenthe'x'isclickedonthewindow,overridesinheritedmethod.Alsothrowsexceptiontoendthepythonprogramwheninaloop. - -Args: -None - -Returns: -None - -Raises: -Exception:withamessagethatindicatestherenderingwindowwasclosed -""" - -super().on_close() -raiseException('Renderingwindowwasclosed.') - -defon_draw(self): -""" -Functionwhenthepygletisdrawing.Thefunctiondrawsthebatchcreatedthatincludesthemappoints,theagentpolygons,andtheinformationtext,andthefpsdisplay. - -Args: -None - -Returns: -None -""" - -#ifmapandposesdoesn'texist,raiseexception -ifself.map_pointsisNone: -raiseException('Mapnotsetforrenderer.') -ifself.posesisNone: -raiseException('Agentposesnotupdatedforrenderer.') - -#InitializeProjectionmatrix -glMatrixMode(GL_PROJECTION) -glLoadIdentity() - -#InitializeModelviewmatrix -glMatrixMode(GL_MODELVIEW) -glLoadIdentity() -#Savethedefaultmodelviewmatrix -glPushMatrix() - -#ClearwindowwithClearColor -glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT) - -#Setorthographicprojectionmatrix -glOrtho(self.left,self.right,self.bottom,self.top,1,-1) - -#Drawallbatches -self.batch.draw() -self.fps_display.draw() -#Removedefaultmodelviewmatrix -glPopMatrix() - -defupdate_obs(self,obs): -""" -Updatestherendererwiththelatestobservationfromthegymenvironment,includingtheagentposes,andtheinformationtext. - -Args: -obs(dict):observationdictfromthegymenv - -Returns: -None -""" - -self.ego_idx=obs['ego_idx'] -poses_x=obs['poses_x'] -poses_y=obs['poses_y'] -poses_theta=obs['poses_theta'] - -num_agents=len(poses_x) -ifself.posesisNone: -self.cars=[] -foriinrange(num_agents): -ifi==self.ego_idx: -vertices_np=get_vertices(np.array([0.,0.,0.]),CAR_LENGTH,CAR_WIDTH) -vertices=list(vertices_np.flatten()) -car=self.batch.add(4,GL_QUADS,None,('v2f',vertices),('c3B',[172,97,185,172,97,185,172,97,185,172,97,185])) -self.cars.append(car) -else: -vertices_np=get_vertices(np.array([0.,0.,0.]),CAR_LENGTH,CAR_WIDTH) -vertices=list(vertices_np.flatten()) -car=self.batch.add(4,GL_QUADS,None,('v2f',vertices),('c3B',[99,52,94,99,52,94,99,52,94,99,52,94])) -self.cars.append(car) - -poses=np.stack((poses_x,poses_y,poses_theta)).T -forjinrange(poses.shape[0]): -vertices_np=50.*get_vertices(poses[j,:],CAR_LENGTH,CAR_WIDTH) -vertices=list(vertices_np.flatten()) -self.cars[j].vertices=vertices -self.poses=poses - -self.score_label.text='LapTime:{laptime:.2f},EgoLapCount:{count:.0f}'.format(laptime=obs['lap_times'][0],count=obs['lap_counts'][obs['ego_idx']]) - - - - diff --git a/docs/xml/scan__sim_8py.xml b/docs/xml/scan__sim_8py.xml deleted file mode 100644 index 0ad301d7..00000000 --- a/docs/xml/scan__sim_8py.xml +++ /dev/null @@ -1,446 +0,0 @@ - - - - scan_sim.py - f110_gym::unittest::scan_sim::ScanSimulator2D - f110_gym::unittest::scan_sim::ScanTests - f110_gym::unittest::scan_sim - - - - - -#MITLicense - -#Copyright(c)2020JosephAuckley,MatthewO'Kelly,AmanSinha,HongruiZheng - -#Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy -#ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal -#intheSoftwarewithoutrestriction,includingwithoutlimitationtherights -#touse,copy,modify,merge,publish,distribute,sublicense,and/orsell -#copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis -#furnishedtodoso,subjecttothefollowingconditions: - -#Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall -#copiesorsubstantialportionsoftheSoftware. - -#THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR -#IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY, -#FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE -#AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER -#LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM, -#OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE -#SOFTWARE. - - - -""" -PrototypeofUtilityfunctionsandclassesforsimulating2DLIDARscans -Author:HongruiZheng -""" - -importnumpyasnp -fromnumbaimportnjit -fromscipy.ndimageimportdistance_transform_edtasedt -fromPILimportImage -importos -importyaml - -importunittest -importtimeit - -defget_dt(bitmap,resolution): -""" -Distancetransformation,returnsthedistancematrixfromtheinputbitmap. -Usesscipy.ndimage,cannotbeJITted. - -Args: -bitmap(numpy.ndarray,(n,m)):inputbinarybitmapoftheenvironment,where0isobstacles,and255(oranything>0)isfreespace -resolution(float):resolutionoftheinputbitmap(m/cell) - -Returns: -dt(numpy.ndarray,(n,m)):outputdistancematrix,whereeachcellhasthecorrespondingdistance(inmeters)totheclosestobstacle -""" -dt=resolution*edt(bitmap) -returndt - -@njit(cache=True) -defxy_2_rc(x,y,orig_x,orig_y,orig_c,orig_s,height,width,resolution): -""" -Translate(x,y)coordinateinto(r,c)inthematrix - -Args: -x(float):coordinateinx(m) -y(float):coordinateiny(m) -orig_x(float):xcoordinateofthemaporigin(m) -orig_y(float):ycoordinateofthemaporigin(m) - -Returns: -r(int):rownumberinthetransformmatrixofthegivenpoint -c(int):columnnumberinthetransformmatrixofthegivenpoint -""" -#translation -x_trans=x-orig_x -y_trans=y-orig_y - -#rotation -x_rot=x_trans*orig_c+y_trans*orig_s -y_rot=-x_trans*orig_s+y_trans*orig_c - -#clipthestatetobeacell -ifx_rot<0orx_rot>=width*resolutionory_rot<0ory_rot>=height*resolution: -c=-1 -r=-1 -else: -c=int(x_rot/resolution) -r=int(y_rot/resolution) - -returnr,c - -@njit(cache=True) -defdistance_transform(x,y,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt): -""" -Lookupcorrespondingdistanceinthedistancematrix - -Args: -x(float):xcoordinateofthelookuppoint -y(float):ycoordinateofthelookuppoint -orig_x(float):xcoordinateofthemaporigin(m) -orig_y(float):ycoordinateofthemaporigin(m) - -Returns: -distance(float):correspondingshortestdistancetoobstacleinmeters -""" -r,c=xy_2_rc(x,y,orig_x,orig_y,orig_c,orig_s,height,width,resolution) -distance=dt[r,c] -returndistance - -@njit(cache=True) -deftrace_ray(x,y,theta_index,sines,cosines,eps,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt,max_range): -""" -Findthelengthofaspecificrayataspecificscanangletheta -Purelymathcalculationandloops,shouldbeJITted. - -Args: -x(float):currentxcoordinateoftheego(scan)frame -y(float):currentycoordinateoftheego(scan)frame -theta_index(int):currentindexofthescanbeaminthescanrange -sines(numpy.ndarray(n,)):pre-calculatedsinesoftheanglearray -cosines(numpy.ndarray(n,)):pre-calculatedcosines... - -Returns: -total_distance(float):thedistancetofirstobstacleonthecurrentscanbeam -""" - -#intcasting,andindexprecaltrigs -theta_index_=int(theta_index) -s=sines[theta_index_] -c=cosines[theta_index_] - -#distancetonearestinitialization -dist_to_nearest=distance_transform(x,y,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt) -total_dist=dist_to_nearest - -#raytracingiterations -whiledist_to_nearest>epsandtotal_dist<=max_range: -#moveinthedirectionoftheraybydist_to_nearest -x+=dist_to_nearest*c -y+=dist_to_nearest*s - -#updatedist_to_nearestforcurrentpointonray -#alsokeepstrackoftotalraylength -dist_to_nearest=distance_transform(x,y,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt) -total_dist+=dist_to_nearest - -returntotal_dist - -@njit(cache=True) -defget_scan(pose,theta_dis,fov,num_beams,theta_index_increment,sines,cosines,eps,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt,max_range): -""" -Performthescanforeachdiscretizedangleofeachbeamofthelaser,loopheavy,shouldbeJITted - -Args: -pose(numpy.ndarray(3,)):currentposeofthescanframeinthemap -theta_dis(int):numberofstepstodiscretizetheanglesbetween0and2piforlookup -fov(float):fieldofviewofthelaserscan -num_beams(int):numberofbeamsinthescan -theta_index_increment(float):incrementbetweenangleindicesafterdiscretization - -Returns: -scan(numpy.ndarray(n,)):resultinglaserscanatthepose,n=num_beams -""" -#emptyscanarrayinit -scan=np.empty((num_beams,)) - -#makethetadiscretebymappingtherange[-pi,pi]onto[0,theta_dis] -theta_index=theta_dis*(pose[2]-fov/2.)/(2.*np.pi) - -#makesureit'swrappedproperly -theta_index=np.fmod(theta_index,theta_dis) -while(theta_index<0): -theta_index+=theta_dis - -#sweepthrougheachbeam -foriinrange(0,num_beams): -#tracethecurrentbeam -scan[i]=trace_ray(pose[0],pose[1],theta_index,sines,cosines,eps,orig_x,orig_y,orig_c,orig_s,height,width,resolution,dt,max_range) - -#incrementthebeamindex -theta_index+=theta_index_increment - -#makesureitstaysintherange[0,theta_dis) -whiletheta_index>=theta_dis: -theta_index-=theta_dis - -returnscan - -classScanSimulator2D(object): -""" -2DLIDARscansimulatorclass - -Initparams: -num_beams(int):numberofbeamsinthescan -fov(float):fieldofviewofthelaserscan -std_dev(float,default=0.01):standarddeviationofthegeneratedwhitenoiseinthescan -eps(float,default=0.0001):raytracingiterationterminationcondition -theta_dis(int,default=2000):numberofstepstodiscretizetheanglesbetween0and2piforlookup -max_range(float,default=30.0):maximumrangeofthelaser -seed(int,default=123):seedforrandomnumbergeneratorforthewhitenoiseinscan -""" - -def__init__(self,num_beams,fov,std_dev=0.01,eps=0.0001,theta_dis=2000,max_range=30.0,seed=123): -#initialization -self.num_beams=num_beams -self.fov=fov -self.std_dev=std_dev -self.eps=eps -self.theta_dis=theta_dis -self.max_range=max_range -self.angle_increment=self.fov/(self.num_beams-1) -self.theta_index_increment=theta_dis*self.angle_increment/(2.*np.pi) -self.orig_c=None -self.orig_s=None -self.orig_x=None -self.orig_y=None -self.map_height=None -self.map_width=None -self.map_resolution=None -self.dt=None - -#whitenoisegenerator -self.rng=np.random.default_rng(seed=seed) - -#precomputingcorrespondingcosinesandsinesoftheanglearray -theta_arr=np.linspace(0.0,2*np.pi,num=theta_dis) -self.sines=np.sin(theta_arr) -self.cosines=np.cos(theta_arr) - -defset_map(self,map_path,map_ext): -""" -Setthebitmapofthescansimulatorbypath - -Args: -map_path(str):pathtothemapyamlfile -map_ext(str):extension(imagetype)ofthemapimage - -Returns: -flag(bool):ifimagereadingandloadingissuccessful -""" -#TODO:doweopentheoptiontofliptheimages,andturnrgbintograyscale?orspecifytheexactrequirementsindocumentation. -#TODO:throwerrorifimagespecificationisn'tmet - -#loadmapimage -map_img_path=os.path.splitext(map_path)[0]+map_ext -self.map_img=np.array(Image.open(map_img_path).transpose(Image.FLIP_TOP_BOTTOM)) -self.map_img=self.map_img.astype(np.float64) - -#grayscale->binary -self.map_img[self.map_img<=128.]=0. -self.map_img[self.map_img>128.]=255. - -self.map_height=self.map_img.shape[0] -self.map_width=self.map_img.shape[1] - -#loadmapyaml -withopen(map_path,'r')asyaml_stream: -try: -map_metadata=yaml.safe_load(yaml_stream) -self.map_resolution=map_metadata['resolution'] -self.origin=map_metadata['origin'] -exceptyaml.YAMLErrorasex: -print(ex) - -#calculatemapparameters -self.orig_x=self.origin[0] -self.orig_y=self.origin[1] -self.orig_s=np.sin(self.origin[2]) -self.orig_c=np.cos(self.origin[2]) - -#getthedistancetransform -self.dt=get_dt(self.map_img,self.map_resolution) - -returnTrue - -defscan(self,pose): -""" -Performsimulated2Dscanbyposeonthegivenmap - -Args: -pose(numpy.ndarray(3,)):poseofthescanframe(x,y,theta) - -Returns: -scan(numpy.ndarray(n,)):dataarrayofthelaserscan,n=num_beams - -Raises: -ValueError:whenscaniscalledbeforeamapisset -""" -ifself.map_heightisNone: -raiseValueError('Mapisnotsetforscansimulator.') -scan=get_scan(pose,self.theta_dis,self.fov,self.num_beams,self.theta_index_increment,self.sines,self.cosines,self.eps,self.orig_x,self.orig_y,self.orig_c,self.orig_s,self.map_height,self.map_width,self.map_resolution,self.dt,self.max_range) -noise=self.rng.normal(0.,self.std_dev,size=self.num_beams) -final_scan=scan+noise -returnfinal_scan - -defget_increment(self): -returnself.angle_increment - - -""" -Unittestsforthe2Dscansimulatorclass -Author:HongruiZheng - -Testcases: -1,2:ComparisonbetweengeneratedscanarrayofthenewsimulatorandthelegacyC++simulator,generateddataused,MSEisusedasthemetric -2.FPStest,shouldbegreaterthan500 -""" - - -classScanTests(unittest.TestCase): -defsetUp(self): -#testparams -self.num_beams=1080 -self.fov=4.7 - -self.num_test=10 -self.test_poses=np.zeros((self.num_test,3)) -self.test_poses[:,2]=np.linspace(-1.,1.,num=self.num_test) - -#legacygymdata -sample_scan=np.load('legacy_scan.npz') -self.berlin_scan=sample_scan['berlin'] -self.skirk_scan=sample_scan['skirk'] - -deftest_map_berlin(self): -scan_sim=ScanSimulator2D(self.num_beams,self.fov) -new_berlin=np.empty((self.num_test,self.num_beams)) -map_path='../../../maps/berlin.yaml' -map_ext='.png' -scan_sim.set_map(map_path,map_ext) -#scangenloop -foriinrange(self.num_test): -test_pose=self.test_poses[i] -new_berlin[i,:]=scan_sim.scan(test_pose) -diff=self.berlin_scan-new_berlin -mse=np.mean(diff**2) -#print('Levinedistancetest,norm:'+str(norm)) - -#plotting -importmatplotlib.pyplotasplt -theta=np.linspace(-self.fov/2.,self.fov/2.,num=self.num_beams) -plt.polar(theta,new_berlin[1,:],'.',lw=0) -plt.polar(theta,self.berlin_scan[1,:],'.',lw=0) -plt.show() - -self.assertLess(mse,2.) - -deftest_map_skirk(self): -scan_sim=ScanSimulator2D(self.num_beams,self.fov) -new_skirk=np.empty((self.num_test,self.num_beams)) -map_path='../../../maps/skirk.yaml' -map_ext='.png' -scan_sim.set_map(map_path,map_ext) -print('mapset') -#scangenloop -foriinrange(self.num_test): -test_pose=self.test_poses[i] -new_skirk[i,:]=scan_sim.scan(test_pose) -diff=self.skirk_scan-new_skirk -mse=np.mean(diff**2) -print('skirkdistancetest,mse:'+str(mse)) - -#plotting -importmatplotlib.pyplotasplt -theta=np.linspace(-self.fov/2.,self.fov/2.,num=self.num_beams) -plt.polar(theta,new_skirk[1,:],'.',lw=0) -plt.polar(theta,self.skirk_scan[1,:],'.',lw=0) -plt.show() - -self.assertLess(mse,2.) - -deftest_fps(self): -#scanfpsshouldbegreaterthan500 -scan_sim=ScanSimulator2D(self.num_beams,self.fov) -map_path='../../../maps/skirk.yaml' -map_ext='.png' -scan_sim.set_map(map_path,map_ext) - -importtime -start=time.time() -foriinrange(10000): -x_test=i/10000 -scan=scan_sim.scan(np.array([x_test,0.,0.])) -end=time.time() -fps=10000/(end-start) -#print('FPStest') -#print('Elapsedtime:'+str(end-start)+',FPS:'+str(1/fps)) -self.assertGreater(fps,500.) - - -defmain(): -num_beams=1080 -fov=4.7 -#map_path='../envs/maps/berlin.yaml' -map_path='/home/f1tenth-eval/tunercar/es/maps/map0.yaml' -map_ext='.png' -scan_sim=ScanSimulator2D(num_beams,fov) -scan_sim.set_map(map_path,map_ext) -scan=scan_sim.scan(np.array([0.,0.,0.])) - -#fpstest -importtime -start=time.time() -foriinrange(10000): -x_test=i/10000 -scan=scan_sim.scan(np.array([x_test,0.,0.])) -end=time.time() -fps=(end-start)/10000 -print('FPStest') -print('Elapsedtime:'+str(end-start)+',FPS:'+str(1/fps)) - -#visualization -importmatplotlib.pyplotasplt -frommatplotlib.animationimportFuncAnimation -num_iter=100 -theta=np.linspace(-fov/2.,fov/2.,num=num_beams) -fig=plt.figure() -ax=fig.add_subplot(111,projection='polar') -ax.set_ylim(0,70) -line,=ax.plot([],[],'.',lw=0) -defupdate(i): -#x_ani=i*3./num_iter -theta_ani=-i*2*np.pi/num_iter -x_ani=0. -current_scan=scan_sim.scan(np.array([x_ani,0.,theta_ani])) -print(np.max(current_scan)) -line.set_data(theta,current_scan) -returnline, -ani=FuncAnimation(fig,update,frames=num_iter,blit=True) -plt.show() - -if__name__=='__main__': -#unittest.main() -main() - - - - diff --git a/docs/xml/unittest_2____init_____8py.xml b/docs/xml/unittest_2____init_____8py.xml deleted file mode 100644 index 4c762804..00000000 --- a/docs/xml/unittest_2____init_____8py.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - __init__.py - f110_gym::unittest - gym::envs::unittest::scan_sim - - - - - -fromgym.envs.unittest.scan_simimport* - - - - diff --git a/docs/xml/xml.xsd b/docs/xml/xml.xsd deleted file mode 100644 index 9f80fe15..00000000 --- a/docs/xml/xml.xsd +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/example_custom_reward.py b/examples/example_custom_reward.py new file mode 100644 index 00000000..2edad2ff --- /dev/null +++ b/examples/example_custom_reward.py @@ -0,0 +1,68 @@ +import gymnasium +from gymnasium import Wrapper + + +class RacingRewardWrapper(Wrapper): + """ + Example of custom reward which encourage speed and penalize crashes. + + reward(state) = w_{speed} * state_{speed} + w_{crash} * state_{crash} + """ + + def __init__( + self, + env: gymnasium.Env, + agent_id: str, + reward_speed_weight: float, + reward_crash_weight: float, + ): + super().__init__(env) + self.agent_id = agent_id + self.reward_speed_weight = reward_speed_weight + self.reward_crash_weight = reward_crash_weight + + # sanity checks on the observation space + if agent_id not in env.observation_space.spaces: + raise ValueError(f"Agent {agent_id} not found in observation space") + for feature in ["linear_vel_x", "collision"]: + if feature not in env.observation_space.spaces[agent_id].spaces: + raise ValueError(f"{feature} not found in observation space") + + def step(self, action): + obs, _, terminated, truncated, info = self.env.step(action) + speed = obs[self.agent_id]["linear_vel_x"] + crash = obs[self.agent_id]["collision"] + reward = self.reward_speed_weight * speed + self.reward_crash_weight * crash + return obs, reward, terminated, truncated, info + + +env = gymnasium.make( + "f110_gym:f110-v0", + config={ + "num_agents": 1, + "observation_config": { + "type": "features", + "features": ["scan", "linear_vel_x", "collision"], + }, + }, + render_mode="human", +) +env = RacingRewardWrapper( + env, agent_id="agent_0", reward_speed_weight=1.0, reward_crash_weight=-1.0 +) + +obs, info = env.reset() +done = False + +tot_reward = 0.0 +while not done: + action = env.action_space.sample() + obs, reward, done, truncated, info = env.step(action) + + print("step reward: ", reward) + tot_reward += reward + + env.render() + +print("total reward: ", tot_reward) +env.close() diff --git a/f1tenth_gym/envs/action.py b/f1tenth_gym/envs/action.py index c9eb7a6f..40b77099 100644 --- a/f1tenth_gym/envs/action.py +++ b/f1tenth_gym/envs/action.py @@ -9,19 +9,51 @@ class LongitudinalActionEnum(Enum): + """Logitudinal car action enum + + Acceleration: 1 + + Speed: 2 + + Raises + ------ + ValueError + Unknown action type + """ + Accl = 1 Speed = 2 @staticmethod def from_string(action: str): + """Set longitudinal action type from string + + Parameters + ---------- + action : str + longitudinal action type + + Returns + ------- + AcclAction | SpeedAction + Specified longitudinal action type + + Raises + ------ + ValueError + Unknown action type + """ if action == "accl": return AcclAction elif action == "speed": return SpeedAction else: raise ValueError(f"Unknown action type {action}") - + + class LongitudinalAction: + """Longitudinal Action abstract class""" + def __init__(self) -> None: self._type = None @@ -30,26 +62,91 @@ def __init__(self) -> None: @abstractmethod def act(self, longitudinal_action: Any, **kwargs) -> float: + """Convert longitudinal action + + Parameters + ---------- + longitudinal_action : input longitudinal action + + Returns + ------- + float + converted longitudinal action + + Raises + ------ + NotImplementedError + """ raise NotImplementedError("longitudinal act method not implemented") @property def type(self) -> str: + """property, type of action + + Returns + ------- + str + type + """ return self._type @property def space(self) -> gym.Space: - return gym.spaces.Box(low=self.lower_limit, high=self.upper_limit, dtype=np.float32) + """property, action space + + Returns + ------- + gym.Space + action space + """ + return gym.spaces.Box( + low=self.lower_limit, high=self.upper_limit, dtype=np.float32 + ) + class AcclAction(LongitudinalAction): + """Acceleration action type + + Parameters + ---------- + params : Dict + parameter dictionary + """ + def __init__(self, params: Dict) -> None: super().__init__() self._type = "accl" self.lower_limit, self.upper_limit = -params["a_max"], params["a_max"] def act(self, action: Tuple[float, float], state, params) -> float: + """Return action + + Parameters + ---------- + action : Tuple[float, float] + input before conversion + state : np.ndarray + current dynamical state + params : dict + parameter dictionary + + Returns + ------- + float + converted acceleration + """ return action + class SpeedAction(LongitudinalAction): + """Speed action type + + Parameters + ---------- + params : Dict + parameter dictionary + """ + def __init__(self, params: Dict) -> None: super().__init__() self._type = "speed" @@ -58,6 +155,22 @@ def __init__(self, params: Dict) -> None: def act( self, action: Tuple[float, float], state: np.ndarray, params: Dict ) -> float: + """Return action + + Parameters + ---------- + action : Tuple[float, float] + input before conversion + state : np.ndarray + current dynamical state + params : dict + parameter dictionary + + Returns + ------- + float + converted speed + """ accl = pid_accl( action, state[3], @@ -68,7 +181,10 @@ def act( return accl + class SteerAction: + """Steering Action abstract class""" + def __init__(self) -> None: self._type = None @@ -77,17 +193,58 @@ def __init__(self) -> None: @abstractmethod def act(self, steer_action: Any, **kwargs) -> float: + """Convert steering action + + Parameters + ---------- + steer_action : Any + input steering action + + Returns + ------- + float + converted steering action + + Raises + ------ + NotImplementedError + """ raise NotImplementedError("steer act method not implemented") @property def type(self) -> str: + """steering action type + + Returns + ------- + str + type + """ return self._type - + @property def space(self) -> gym.Space: - return gym.spaces.Box(low=self.lower_limit, high=self.upper_limit, dtype=np.float32) + """action space + + Returns + ------- + gym.Space + action space + """ + return gym.spaces.Box( + low=self.lower_limit, high=self.upper_limit, dtype=np.float32 + ) + class SteeringAngleAction(SteerAction): + """Steering angle action type + + Parameters + ---------- + params : Dict + parameter dictionary + """ + def __init__(self, params: Dict) -> None: super().__init__() self._type = "steering_angle" @@ -95,15 +252,40 @@ def __init__(self, params: Dict) -> None: def act( self, action: Tuple[float, float], state: np.ndarray, params: Dict - ) -> float: + ) -> float: + """Return action + + Parameters + ---------- + action : Tuple[float, float] + input before conversion + state : np.ndarray + current dynamical state + params : dict + parameter dictionary + + Returns + ------- + float + converted steering angle + """ sv = pid_steer( action, state[2], params["sv_max"], ) return sv - + + class SteeringSpeedAction(SteerAction): + """Steering angle velocity action type + + Parameters + ---------- + params : Dict + parameter dictionary + """ + def __init__(self, params: Dict) -> None: super().__init__() self._type = "steering_speed" @@ -111,15 +293,61 @@ def __init__(self, params: Dict) -> None: def act( self, action: Tuple[float, float], state: np.ndarray, params: Dict - ) -> float: + ) -> float: + """Return action + + Parameters + ---------- + action : Tuple[float, float] + input before conversion + state : np.ndarray + current dynamical state + params : dict + parameter dictionary + + Returns + ------- + float + converted steering velocity angle + """ return action + class SteerActionEnum(Enum): + """Logitudinal car action enum + + Acceleration: 1 + + Speed: 2 + + Raises + ------ + ValueError + Unknown action type + """ + Steering_Angle = 1 Steering_Speed = 2 @staticmethod def from_string(action: str): + """Set steering action type from string + + Parameters + ---------- + action : str + steering action type + + Returns + ------- + SteeringAngleAction | SteeringSpeedAction + Specified steering action type + + Raises + ------ + ValueError + Unknown action type + """ if action == "steering_angle": return SteeringAngleAction elif action == "steering_speed": @@ -127,11 +355,25 @@ def from_string(action: str): else: raise ValueError(f"Unknown action type {action}") + class CarAction: - def __init__(self, control_mode : list[str, str], params: Dict) -> None: + """Car actions + + Parameters + ---------- + control_mode : list[str, str] + control mode requested + params : Dict + parameter dictionary + + Raises + ------ + ValueError + """ + def __init__(self, control_mode: list[str, str], params: Dict) -> None: long_act_type_fn = None steer_act_type_fn = None - if type(control_mode) == str: # only one control mode specified + if type(control_mode) == str: # only one control mode specified try: long_act_type_fn = LongitudinalActionEnum.from_string(control_mode) except ValueError: @@ -141,24 +383,24 @@ def __init__(self, control_mode : list[str, str], params: Dict) -> None: raise ValueError(f"Unknown control mode {control_mode}") if control_mode == "steering_speed": warnings.warn( - f'Only one control mode specified, using {control_mode} for steering and defaulting to acceleration for longitudinal control' + f"Only one control mode specified, using {control_mode} for steering and defaulting to acceleration for longitudinal control" ) long_act_type_fn = LongitudinalActionEnum.from_string("accl") else: warnings.warn( - f'Only one control mode specified, using {control_mode} for steering and defaulting to speed for longitudinal control' + f"Only one control mode specified, using {control_mode} for steering and defaulting to speed for longitudinal control" ) long_act_type_fn = LongitudinalActionEnum.from_string("speed") else: if control_mode == "accl": warnings.warn( - f'Only one control mode specified, using {control_mode} for longitudinal control and defaulting to steering speed for steering' + f"Only one control mode specified, using {control_mode} for longitudinal control and defaulting to steering speed for steering" ) steer_act_type_fn = SteerActionEnum.from_string("steering_speed") else: warnings.warn( - f'Only one control mode specified, using {control_mode} for longitudinal control and defaulting to steering angle for steering' + f"Only one control mode specified, using {control_mode} for longitudinal control and defaulting to steering angle for steering" ) steer_act_type_fn = SteerActionEnum.from_string("steering_angle") @@ -167,24 +409,54 @@ def __init__(self, control_mode : list[str, str], params: Dict) -> None: steer_act_type_fn = SteerActionEnum.from_string(control_mode[1]) else: raise ValueError(f"Unknown control mode {control_mode}") - - self._longitudinal_action : LongitudinalAction = long_act_type_fn(params) - self._steer_action : SteerAction = steer_act_type_fn(params) + + self._longitudinal_action: LongitudinalAction = long_act_type_fn(params) + self._steer_action: SteerAction = steer_act_type_fn(params) @abstractmethod def act(self, action: Any, **kwargs) -> Tuple[float, float]: + """Return action + + Parameters + ---------- + action : Any + input control actions + + Returns + ------- + Tuple[float, float] + converted control actions + """ longitudinal_action = self._longitudinal_action.act(action[0], **kwargs) steer_action = self._steer_action.act(action[1], **kwargs) return longitudinal_action, steer_action @property def type(self) -> Tuple[str, str]: + """property, car action type + + Returns + ------- + Tuple[str, str] + type + """ return (self._steer_action.type, self._longitudinal_action.type) @property def space(self) -> gym.Space: - low = np.array([self._steer_action.lower_limit, self._longitudinal_action.lower_limit]).astype(np.float32) - high = np.array([self._steer_action.upper_limit, self._longitudinal_action.upper_limit]).astype(np.float32) + """property, car action space + + Returns + ------- + gym.Space + action space + """ + low = np.array( + [self._steer_action.lower_limit, self._longitudinal_action.lower_limit] + ).astype(np.float32) + high = np.array( + [self._steer_action.upper_limit, self._longitudinal_action.upper_limit] + ).astype(np.float32) return gym.spaces.Box(low=low, high=high, shape=(2,), dtype=np.float32) @@ -192,6 +464,20 @@ def space(self) -> gym.Space: def from_single_to_multi_action_space( single_agent_action_space: gym.spaces.Box, num_agents: int ) -> gym.spaces.Box: + """Convert single agent action spaces to multi agent action spaces + + Parameters + ---------- + single_agent_action_space : gym.spaces.Box + action space of a single aget + num_agents : int + number of agents in the simulation + + Returns + ------- + gym.spaces.Box + action spaces of multiple agents + """ return gym.spaces.Box( low=single_agent_action_space.low[None].repeat(num_agents, 0), high=single_agent_action_space.high[None].repeat(num_agents, 0), diff --git a/f1tenth_gym/envs/base_classes.py b/f1tenth_gym/envs/base_classes.py index f5990dc6..911754dd 100644 --- a/f1tenth_gym/envs/base_classes.py +++ b/f1tenth_gym/envs/base_classes.py @@ -1,31 +1,3 @@ -# MIT License - -# Copyright (c) 2020 Joseph Auckley, Matthew O'Kelly, Aman Sinha, Hongrui Zheng - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - - -""" -Prototype of base classes -Replacement of the old RaceCar, Simulator classes in C++ -Author: Hongrui Zheng -""" from __future__ import annotations import numpy as np from .dynamic_models import DynamicModel @@ -37,20 +9,34 @@ class RaceCar(object): - """ - Base level race car class, handles the physics and laser scan of a single vehicle - - Data Members: - params (dict): vehicle parameters dictionary - is_ego (bool): ego identifier - time_step (float): physics timestep - num_beams (int): number of beams in laser - fov (float): field of view of laser - state (np.ndarray (7, )): state vector [x, y, theta, vel, steer_angle, ang_vel, slip_angle] - odom (np.ndarray(13, )): odometry vector [x, y, z, qx, qy, qz, qw, linear_x, linear_y, linear_z, angular_x, angular_y, angular_z] - accel (float): current acceleration input - steer_angle_vel (float): current steering velocity input - in_collision (bool): collision indicator + """Base level race car class, handles the physics and laser scan of a single vehicle + + Parameters + ---------- + params : _type_ + vehicle parameters dictionary + seed : _type_ + random seed + action_type : CarAction + action type for the cars + integrator : _type_, optional + integrator type, by default EulerIntegrator() + model : _type_, optional + vehicle model type, by default DynamicModel.ST + is_ego : bool, optional + ego identifier, by default False + time_step : float, optional + physics sim time step, by default 0.01 + num_beams : int, optional + number of beams in the laser scan, by default 1080 + fov : float, optional + field of view of the laser, by default 4.7 + + + Raises + ------ + ValueError + No Control Action Type Specified. """ # static objects that don't need to be stored in class instances @@ -71,25 +57,6 @@ def __init__( num_beams=1080, fov=4.7, ): - """ - TODO rewrite it - - Init function - - Args: - params (dict): vehicle parameters dictionary - seed (int): random seed - is_ego (bool, default=False): ego identifier - time_step (float, default=0.01): physics sim time step - num_beams (int, default=1080): number of beams in the laser scan - fov (float, default=4.7): field of view of the laser - integrator (Integrator, default=EulerIntegrator()): integrator type - model (Model, default=Model.ST): vehicle model type - action_type (Action, default=SpeedAction()): action type - - Returns: - None - """ # initialization self.params = params @@ -166,36 +133,32 @@ def __init__( RaceCar.side_distances[i] = min(to_side, to_fr) def update_params(self, params): - """ - Updates the physical parameters of the vehicle - Note that does not need to be called at initialization of class anymore - - Args: - params (dict): new parameters for the vehicle + """Updates the physical parameters of the vehicle - Returns: - None + Parameters + ---------- + params : dict + new parameters for the vehicle """ self.params = params def set_map(self, map: str | Track): - """ - Sets the map for scan simulator + """Sets the map for scan simulator - Args: - map (str | Track): name of the map, or Track object + Parameters + ---------- + map : str | Track + name of the map, or Track object """ RaceCar.scan_simulator.set_map(map) def reset(self, pose): - """ - Resets the vehicle to a pose - - Args: - pose (np.ndarray (3, )): pose to reset the vehicle to + """Resets the vehicle to a pose - Returns: - None + Parameters + ---------- + pose : np.ndarray + pose to reset the vehicle to """ # clear control inputs self.accel = 0.0 @@ -210,16 +173,18 @@ def reset(self, pose): self.scan_rng = np.random.default_rng(seed=self.seed) def ray_cast_agents(self, scan): - """ - Ray cast onto other agents in the env, modify original scan + """Ray cast onto other agents in the env, modify original scan - Args: - scan (np.ndarray, (n, )): original scan range array + Parameters + ---------- + scan : np.ndarray + original scan range array - Returns: - new_scan (np.ndarray, (n, )): modified scan + Returns + ------- + np.ndarray + modified scan """ - # starting from original scan new_scan = scan @@ -240,19 +205,19 @@ def ray_cast_agents(self, scan): return new_scan def check_ttc(self, current_scan): - """ - Check iTTC against the environment, sets vehicle states accordingly if collision occurs. + """Check iTTC against the environment, sets vehicle states accordingly if collision occurs. Note that this does NOT check collision with other agents. - state is [x, y, steer_angle, vel, yaw_angle, yaw_rate, slip_angle] - - Args: - current_scan + Parameters + ---------- + current_scan : np.ndarray + current laser scan - Returns: - None + Returns + ------- + bool + whether the scan given indicates the vehicle is in collision with environment """ - in_collision = check_ttc_jit( current_scan, self.state[3], @@ -274,17 +239,25 @@ def check_ttc(self, current_scan): return in_collision def update_pose(self, raw_steer, vel): + """Steps the vehicle's physical simulation + + Parameters + ---------- + raw_steer : float + desired steering angle, or desired steering velocity + vel : float + desired longitudinal velocity, or desired longitudinal acceleration + + Returns + ------- + np.ndarray + current laser scan + + Raises + ------ + ValueError + No Control Action Type Specified. """ - Steps the vehicle's physical simulation - - Args: - steer (float): desired steering angle, or desired steering velocity - vel (float): desired longitudinal velocity, or desired longitudinal acceleration - - Returns: - current_scan - """ - # steering delay steer = 0.0 if self.steer_buffer.shape[0] < self.steer_buffer_size: @@ -323,30 +296,26 @@ def update_pose(self, raw_steer, vel): return current_scan def update_opp_poses(self, opp_poses): - """ - Updates the vehicle's information on other vehicles - - Args: - opp_poses (np.ndarray(num_other_agents, 3)): updated poses of other agents + """Updates the vehicle's information on other vehicles - Returns: - None + Parameters + ---------- + opp_poses : np.ndarray + updated poses of other agents """ self.opp_poses = opp_poses def update_scan(self, agent_scans, agent_index): - """ - Steps the vehicle's laser scan simulation + """Steps the vehicle's laser scan simulation Separated from update_pose because needs to update scan based on NEW poses of agents in the environment - Args: - agent scans list (modified in-place), - agent index (int) - - Returns: - None + Parameters + ---------- + agent_scans : list[np.ndarray] + list of scans of each agent + agent_index : int + index of agent """ - current_scan = agent_scans[agent_index] # check ttc @@ -359,21 +328,33 @@ def update_scan(self, agent_scans, agent_index): class Simulator(object): - """ - Simulator class, handles the interaction and update of all vehicles in the environment - - TODO check description - - Data Members: - num_agents (int): number of agents in the environment - time_step (float): physics time step - agent_poses (np.ndarray(num_agents, 3)): all poses of all agents - agents (list[RaceCar]): container for RaceCar objects - collisions (np.ndarray(num_agents, )): array of collision indicator for each agent - collision_idx (np.ndarray(num_agents, )): which agent is each agent in collision with - integrator (Integrator): integrator to use for vehicle dynamics - model (Model): model to use for vehicle dynamics - action_type (Action): action type to use for vehicle dynamics + """Simulator class, handles the interaction and update of all vehicles in the environment + + Parameters + ---------- + params : dict + vehicle parameter dictionary + num_agents : int + number of agents in the environment + seed : int + seed of the rng in scan simulation + action_type : CarAction + action type to use for controlling the vehicles + integrator : Integrator, optional + integrator to use for vehicle dynamics, by default IntegratorType.RK4 + model : Model, optional + vehicle dynamics model to use, by default DynamicModel.ST + time_step : float, optional + physics time step, by default 0.01 + ego_idx : int, optional + ego vehicle's index in list of agents, by default 0 + + Raises + ------ + IndexError + Index given is out of bounds for list of agents. + ValueError + Number of poses for reset does not match number of agents. """ def __init__( @@ -387,21 +368,6 @@ def __init__( time_step=0.01, ego_idx=0, ): - """ - Init function - - Args: - params (dict): vehicle parameter dictionary, includes {'mu', 'C_Sf', 'C_Sr', 'lf', 'lr', 'h', 'm', 'I', 's_min', 's_max', 'sv_min', 'sv_max', 'v_switch', 'a_max', 'v_min', 'v_max', 'length', 'width'} - num_agents (int): number of agents in the environment - seed (int): seed of the rng in scan simulation - time_step (float, default=0.01): physics time step - ego_idx (int, default=0): ego vehicle's index in list of agents - integrator (Integrator, default=Integrator.RK4): integrator to use for vehicle dynamics - model (Model, default=Model.ST): vehicle dynamics model to use - action_type (Action, default=SpeedAction()): action type to use for controlling the vehicle - Returns: - None - """ self.num_agents = num_agents self.seed = seed self.time_step = time_step @@ -432,28 +398,30 @@ def __init__( self.agent_scans = np.empty((self.num_agents, num_beams)) def set_map(self, map: str | Track): - """ - Sets the map of the environment and sets the map for scan simulator of each agent - - Args: - map (str | Track): name of the map, or Track object + """Sets the map of the environment and sets the map for scan simulator of each agent - Returns: - None + Parameters + ---------- + map : str | Track + name of the map, or Track object """ for agent in self.agents: agent.set_map(map) def update_params(self, params, agent_idx=-1): - """ - Updates the params of agents, if an index of an agent is given, update only that agent's params - - Args: - params (dict): dictionary of params, see details in docstring of __init__ - agent_idx (int, default=-1): index for agent that needs param update, if negative, update all agents - - Returns: - None + """Updates the params of agents, if an index of an agent is given, update only that agent's params + + Parameters + ---------- + params : dict + dictionary of params + agent_idx : int, optional + index for agent that needs param update, if negative, update all agents, by default -1 + + Raises + ------ + IndexError + Index given is out of bounds for list of agents. """ self.params = params if agent_idx < 0: @@ -468,15 +436,7 @@ def update_params(self, params, agent_idx=-1): raise IndexError("Index given is out of bounds for list of agents.") def check_collision(self): - """ - Checks for collision between agents using GJK and agents' body vertices - - Args: - None - - Returns: - None - """ + """Checks for collision between agents using GJK and agents' body vertices""" # get vertices of all agents all_vertices = np.empty((self.num_agents, 4, 2)) for i in range(self.num_agents): @@ -488,14 +448,12 @@ def check_collision(self): self.collisions, self.collision_idx = collision_multiple(all_vertices) def step(self, control_inputs): - """ - Steps the simulation environment - - Args: - control_inputs (np.ndarray (num_agents, 2)): control inputs of all agents, first column is desired steering angle, second column is desired velocity + """Steps the simulation environment - Returns: - observations (dict): dictionary for observations: poses of agents, current laser scan of each agent, collision indicators, etc. + Parameters + ---------- + control_inputs : np.ndarray + control inputs of all agents, first column is desired steering angle, second column is desired velocity """ # looping over agents @@ -526,16 +484,18 @@ def step(self, control_inputs): self.collisions[i] = 1.0 def reset(self, poses): - """ - Resets the simulation environment by given poses + """Resets the simulation environment by given poses - Arges: - poses (np.ndarray (num_agents, 3)): poses to reset agents to + Parameters + ---------- + poses : np.ndarray + poses to reset agents to - Returns: - None + Raises + ------ + ValueError + Number of poses for reset does not match number of agents. """ - if poses.shape[0] != self.num_agents: raise ValueError( "Number of poses for reset does not match number of agents." diff --git a/f1tenth_gym/envs/collision_models.py b/f1tenth_gym/envs/collision_models.py index 87547ab6..bd6cec8d 100644 --- a/f1tenth_gym/envs/collision_models.py +++ b/f1tenth_gym/envs/collision_models.py @@ -1,46 +1,20 @@ -# MIT License - -# Copyright (c) 2020 Joseph Auckley, Matthew O'Kelly, Aman Sinha, Hongrui Zheng - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - - -""" -Prototype of Utility functions and GJK algorithm for Collision checks between vehicles -Originally from https://github.com/kroitor/gjk.c -Author: Hongrui Zheng -""" - import numpy as np from numba import njit @njit(cache=True) def perpendicular(pt): - """ - Return a 2-vector's perpendicular vector + """Return a 2-vector's perpendicular vector - Args: - pt (np.ndarray, (2,)): input vector + Parameters + ---------- + pt : np.ndarray + input vector - Returns: - pt (np.ndarray, (2,)): perpendicular vector + Returns + ------- + np.ndarray + perpendicular vector """ temp = pt[0] pt[0] = pt[1] @@ -50,14 +24,21 @@ def perpendicular(pt): @njit(cache=True) def tripleProduct(a, b, c): - """ - Return triple product of three vectors - - Args: - a, b, c (np.ndarray, (2,)): input vectors - - Returns: - (np.ndarray, (2,)): triple product + """Return triple product of three vectors + + Parameters + ---------- + a : np.ndarray + input vector + b : np.ndarray + input vector + c : np.ndarray + input vector + + Returns + ------- + np.ndarray + triple product """ ac = a.dot(c) bc = b.dot(c) @@ -66,44 +47,57 @@ def tripleProduct(a, b, c): @njit(cache=True) def avgPoint(vertices): - """ - Return the average point of multiple vertices + """Return the average point of multiple vertices - Args: - vertices (np.ndarray, (n, 2)): the vertices we want to find avg on + Parameters + ---------- + vertices : np.ndarray + the vertices we want to find avg on - Returns: - avg (np.ndarray, (2,)): average point of the vertices + Returns + ------- + np.ndarray + average point of the vertices """ return np.sum(vertices, axis=0) / vertices.shape[0] @njit(cache=True) def indexOfFurthestPoint(vertices, d): - """ - Return the index of the vertex furthest away along a direction in the list of vertices - - Args: - vertices (np.ndarray, (n, 2)): the vertices we want to find avg on - - Returns: - idx (int): index of the furthest point + """Return the index of the vertex furthest away along a direction in the list of vertices + + Parameters + ---------- + vertices : np.ndarray + the vertices we want to find index on + d : np.ndarray + direction + + Returns + ------- + int + index of the furthest point """ return np.argmax(vertices.dot(d)) @njit(cache=True) def support(vertices1, vertices2, d): - """ - Minkowski sum support function for GJK - - Args: - vertices1 (np.ndarray, (n, 2)): vertices of the first body - vertices2 (np.ndarray, (n, 2)): vertices of the second body - d (np.ndarray, (2, )): direction to find the support along - - Returns: - support (np.ndarray, (n, 2)): Minkowski sum + """Minkowski sum support function for GJK + + Parameters + ---------- + vertices1 : np.ndarray + vertices of the first body + vertices2 : np.ndarray + vertices of the second body + d : np.ndarray + direction to find the support along + + Returns + ------- + np.ndarray + Minkowski sum """ i = indexOfFurthestPoint(vertices1, d) j = indexOfFurthestPoint(vertices2, -d) @@ -112,15 +106,19 @@ def support(vertices1, vertices2, d): @njit(cache=True) def collision(vertices1, vertices2): - """ - GJK test to see whether two bodies overlap - - Args: - vertices1 (np.ndarray, (n, 2)): vertices of the first body - vertices2 (np.ndarray, (n, 2)): vertices of the second body - - Returns: - overlap (boolean): True if two bodies collide + """GJK test to see whether two bodies overlap + + Parameters + ---------- + vertices1 : np.ndarray + vertices of the first body + vertices2 : np.ndarray + vertices of the second body + + Returns + ------- + boolean + True if two bodies collide """ index = 0 simplex = np.empty((3, 2)) @@ -184,15 +182,19 @@ def collision(vertices1, vertices2): @njit(cache=True) def collision_multiple(vertices): - """ - Check pair-wise collisions for all provided vertices - - Args: - vertices (np.ndarray (num_bodies, 4, 2)): all vertices for checking pair-wise collision - - Returns: - collisions (np.ndarray (num_vertices, )): whether each body is in collision - collision_idx (np.ndarray (num_vertices, )): which index of other body is each index's body is in collision, -1 if not in collision + """Check pair-wise collisions for all provided vertices + + Parameters + ---------- + vertices : np.ndarray + all vertices for checking pair-wise collision + + Returns + ------- + collisions : np.ndarray + whether each body is in collision + collision_idx : np.ndarray + which index of other body is each index's body is in collision, -1 if not in collision """ collisions = np.zeros((vertices.shape[0],)) collision_idx = -1 * np.ones((vertices.shape[0],)) @@ -213,21 +215,19 @@ def collision_multiple(vertices): return collisions, collision_idx -""" -Utility functions for getting vertices by pose and shape -""" - - @njit(cache=True) def get_trmtx(pose): - """ - Get transformation matrix of vehicle frame -> global frame + """Get transformation matrix of vehicle frame -> global frame - Args: - pose (np.ndarray (3, )): current pose of the vehicle + Parameters + ---------- + pose : np.ndarray + current pose of the vehicle - return: - H (np.ndarray (4, 4)): transformation matrix + Returns + ------- + np.ndarray + transformation matrix """ x = pose[0] y = pose[1] @@ -247,16 +247,21 @@ def get_trmtx(pose): @njit(cache=True) def get_vertices(pose, length, width): - """ - Utility function to return vertices of the car body given pose and size - - Args: - pose (np.ndarray, (3, )): current world coordinate pose of the vehicle - length (float): car length - width (float): car width - - Returns: - vertices (np.ndarray, (4, 2)): corner vertices of the vehicle body + """Utility function to return vertices of the car body given pose and size + + Parameters + ---------- + pose : np.ndarray + current world coordinate pose of the vehicle + length : float + car length + width : float + car width + + Returns + ------- + np.ndarray + corner vertices of the vehicle body """ H = get_trmtx(pose) rl = H.dot(np.asarray([[-length / 2], [width / 2], [0.0], [1.0]])).flatten() diff --git a/f1tenth_gym/envs/dynamic_models.py b/f1tenth_gym/envs/dynamic_models.py index 790de252..57ac1b42 100644 --- a/f1tenth_gym/envs/dynamic_models.py +++ b/f1tenth_gym/envs/dynamic_models.py @@ -1,31 +1,3 @@ -# Copyright 2020 Technical University of Munich, Professorship of Cyber-Physical Systems, Matthew O'Kelly, Aman Sinha, Hongrui Zheng - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - - -""" -Prototype of vehicle dynamics functions and classes for simulating 2D Single -Track dynamic model -Following the implementation of commanroad's Single Track Dynamics model -Original implementation: https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/ -Author: Hongrui Zheng, Renukanandan Tumu -""" import warnings from enum import Enum @@ -34,11 +6,37 @@ class DynamicModel(Enum): + """Enum for specifying dynamic models + + KS: 1 (kinematic single track) + + ST: 2 (single track) + + """ + KS = 1 # Kinematic Single Track ST = 2 # Single Track @staticmethod def from_string(model: str): + """Set dynamic models from string. + + Parameters + ---------- + model : str + dynamic model type + + Returns + ------- + int + dynamic model type + + + Raises + ------ + ValueError + Unknown model type + """ if model == "ks": warnings.warn( "Chosen model is KS. This is different from previous versions of the gym." @@ -50,6 +48,23 @@ def from_string(model: str): raise ValueError(f"Unknown model type {model}") def get_initial_state(self, pose=None): + """Set initial dynamic state based on model + + Parameters + ---------- + pose : np.ndarray, optional + initial pose, by default None + + Returns + ------- + np.ndarray + initial state + + Raises + ------ + ValueError + Unknown model type + """ # initialize zero state if self == DynamicModel.KS: # state is [x, y, steer_angle, vel, yaw_angle] @@ -69,6 +84,18 @@ def get_initial_state(self, pose=None): @property def f_dynamics(self): + """property, returns dynamics function + + Returns + ------- + Callable + dynamic function + + Raises + ------ + ValueError + Unknown model type + """ if self == DynamicModel.KS: return vehicle_dynamics_ks elif self == DynamicModel.ST: @@ -79,16 +106,21 @@ def f_dynamics(self): @njit(cache=True) def upper_accel_limit(vel, a_max, v_switch): - """ - Upper acceleration limit, adjusts the acceleration based on constraints - - Args: - vel (float): current velocity of the vehicle - a_max (float): maximum allowed acceleration, symmetrical - v_switch (float): switching velocity (velocity at which the acceleration is no longer able to create wheel spin) - - Returns: - positive_accel_limit (float): adjusted acceleration + """Upper acceleration limit, adjusts the acceleration based on constraints + + Parameters + ---------- + vel : float + current velocity of the vehicle + a_max : float + maximum allowed acceleration, symmetrical + v_switch : float + switching velocity (velocity at which the acceleration is no longer able to create wheel spin) + + Returns + ------- + float + adjusted acceleration """ if vel > v_switch: pos_limit = a_max * (v_switch / vel) @@ -100,21 +132,28 @@ def upper_accel_limit(vel, a_max, v_switch): @njit(cache=True) def accl_constraints(vel, a_long_d, v_switch, a_max, v_min, v_max): + """Acceleration constraints, adjusts the acceleration based on constraints + + Parameters + ---------- + vel : float + current velocity of the vehicle + a_long_d : float + unconstrained desired acceleration in the direction of travel. + v_switch : float + switching velocity (velocity at which the acceleration is no longer able to create wheel spin) + a_max : float + maximum allowed acceleration, symmetrical + v_min : float + minimum allowed velocity + v_max : float + maximum allowed velocity + + Returns + ------- + float + adjusted acceleration """ - Acceleration constraints, adjusts the acceleration based on constraints - - Args: - vel (float): current velocity of the vehicle - a_long_d (float): unconstrained desired acceleration in the direction of travel. - v_switch (float): switching velocity (velocity at which the acceleration is no longer able to create wheel spin) - a_max (float): maximum allowed acceleration, symmetrical - v_min (float): minimum allowed velocity - v_max (float): maximum allowed velocity - - Returns: - accl (float): adjusted acceleration - """ - uac = upper_accel_limit(vel, a_max, v_switch) if (vel <= v_min and a_long_d <= 0) or (vel >= v_max and a_long_d >= 0): @@ -133,21 +172,28 @@ def accl_constraints(vel, a_long_d, v_switch, a_max, v_min, v_max): def steering_constraint( steering_angle, steering_velocity, s_min, s_max, sv_min, sv_max ): + """Steering constraints, adjusts the steering velocity based on constraints + + Parameters + ---------- + steering_angle : float + current steering_angle of the vehicle + steering_velocity : float + unconstraint desired steering_velocity + s_min : float + minimum steering angle + s_max : float + maximum steering angle + sv_min : float + minimum steering velocity + sv_max : float + maximum steering velocity + + Returns + ------- + float + adjusted steering velocity """ - Steering constraints, adjusts the steering velocity based on constraints - - Args: - steering_angle (float): current steering_angle of the vehicle - steering_velocity (float): unconstraint desired steering_velocity - s_min (float): minimum steering angle - s_max (float): maximum steering angle - sv_min (float): minimum steering velocity - sv_max (float): maximum steering velocity - - Returns: - steering_velocity (float): adjusted steering velocity - """ - # constraint steering velocity if (steering_angle <= s_min and steering_velocity <= 0) or ( steering_angle >= s_max and steering_velocity >= 0 @@ -182,39 +228,59 @@ def vehicle_dynamics_ks( v_min, v_max, ): - """ - Single Track Kinematic Vehicle Dynamics. + """Kinematic Single Track Vehicle Dynamics. Follows https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/-/blob/master/vehicleModels_commonRoad.pdf, section 5 - Args: - x (numpy.ndarray (5, )): vehicle state vector (x0, x1, x2, x3, x4) - x0: x position in global coordinates - x1: y position in global coordinates - x2: steering angle of front wheels - x3: velocity in x direction - x4: yaw angle - u (numpy.ndarray (2, )): control input vector (u1, u2) - u1: steering angle velocity of front wheels - u2: longitudinal acceleration - mu (float): friction coefficient - C_Sf (float): cornering stiffness of front wheels - C_Sr (float): cornering stiffness of rear wheels - lf (float): distance from center of gravity to front axle - lr (float): distance from center of gravity to rear axle - h (float): height of center of gravity - m (float): mass of vehicle - I (float): moment of inertia of vehicle, about Z axis - s_min (float): minimum steering angle - s_max (float): maximum steering angle - sv_min (float): minimum steering velocity - sv_max (float): maximum steering velocity - v_switch (float): velocity above which the acceleration is no longer able to create wheel slip - a_max (float): maximum allowed acceleration - v_min (float): minimum allowed velocity - v_max (float): maximum allowed velocity - - Returns: - f (numpy.ndarray): right hand side of differential equations + Parameters + ---------- + x : np.ndarray + vehicle state vector (x0, x1, x2, x3, x4) + x0: x position in global coordinates + x1: y position in global coordinates + x2: steering angle of front wheels + x3: velocity in x direction + x4: yaw angle + u_init : np.ndarray + control input vector (u1, u2) + u1: steering angle velocity of front wheels + u2: longitudinal acceleration + mu : float + friction coefficient + C_Sf : float + cornering stiffness of front wheels + C_Sr : float + cornering stiffness of rear wheels + lf : float + distance from center of gravity to front axle + lr : float + distance from center of gravity to rear axle + h : float + height of center of gravity + m : float + mass of vehicle + I : float + moment of inertia of vehicle, about Z axis + s_min : float + minimum steering angle + s_max : float + maximum steering angle + sv_min : float + minimum steering velocity + sv_max : float + maximum steering velocity + v_switch : float + velocity above which the acceleration is no longer able to create wheel slip + a_max : float + maximum allowed acceleration + v_min : float + minimum allowed velocity + v_max : float + maximum allowed velocity + + Returns + ------- + np.ndarray + right hand side of differential equations """ # Controls X = x[0] @@ -273,41 +339,61 @@ def vehicle_dynamics_st( v_min, v_max, ): - """ - Single Track Vehicle Dynamics. + """Single Track Vehicle Dynamics. From https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/-/blob/master/vehicleModels_commonRoad.pdf, section 7 - Args: - x (numpy.ndarray (7, )): vehicle state vector (x0, x1, x2, x3, x4, x5, x6) - x0: x position in global coordinates - x1: y position in global coordinates - x2: steering angle of front wheels - x3: velocity in x direction - x4:yaw angle - x5: yaw rate - x6: slip angle at vehicle center - u (numpy.ndarray (2, )): control input vector (u1, u2) - u1: steering angle velocity of front wheels - u2: longitudinal acceleration - mu (float): friction coefficient - C_Sf (float): cornering stiffness of front wheels - C_Sr (float): cornering stiffness of rear wheels - lf (float): distance from center of gravity to front axle - lr (float): distance from center of gravity to rear axle - h (float): height of center of gravity - m (float): mass of vehicle - I (float): moment of inertia of vehicle, about Z axis - s_min (float): minimum steering angle - s_max (float): maximum steering angle - sv_min (float): minimum steering velocity - sv_max (float): maximum steering velocity - v_switch (float): velocity above which the acceleration is no longer able to create wheel spin - a_max (float): maximum allowed acceleration - v_min (float): minimum allowed velocity - v_max (float): maximum allowed velocity - - Returns: - f (numpy.ndarray): right hand side of differential equations + Parameters + ---------- + x : np.ndarray + vehicle state vector (x0, x1, x2, x3, x4, x5, x6) + x0: x position in global coordinates + x1: y position in global coordinates + x2: steering angle of front wheels + x3: velocity in x direction + x4:yaw angle + x5: yaw rate + x6: slip angle at vehicle center + u_init : np.ndarray + control input vector (u1, u2) + u1: steering angle velocity of front wheels + u2: longitudinal acceleration + mu : float + friction coefficient + C_Sf : float + cornering stiffness of front wheels + C_Sr : float + cornering stiffness of rear wheels + lf : float + distance from center of gravity to front axle + lr : float + distance from center of gravity to rear axle + h : float + height of center of gravity + m : float + mass of vehicle + I : float + moment of inertia of vehicle, about Z axis + s_min : float + minimum steering angle + s_max : float + maximum steering angle + sv_min : float + minimum steering velocity + sv_max : float + maximum steering velocity + v_switch : float + velocity above which the acceleration is no longer able to create wheel slip + a_max : float + maximum allowed acceleration + v_min : float + minimum allowed velocity + v_max : float + maximum allowed velocity + + Returns + ------- + np.ndarray + right hand side of differential equations """ # States X = x[0] @@ -402,6 +488,22 @@ def vehicle_dynamics_st( @njit(cache=True) def pid_steer(steer, current_steer, max_sv): + """PID control for steering angle to steering velocity + + Parameters + ---------- + steer : float + requested steering angle + current_steer : float + current steering angle + max_sv : float + maximum steering velocity + + Returns + ------- + float + steering velocity + """ # steering steer_diff = steer - current_steer if np.fabs(steer_diff) > 1e-4: @@ -414,16 +516,25 @@ def pid_steer(steer, current_steer, max_sv): @njit(cache=True) def pid_accl(speed, current_speed, max_a, max_v, min_v): - """ - Basic controller for speed/steer -> accl./steer vel. - - Args: - speed (float): desired input speed - steer (float): desired input steering angle - - Returns: - accl (float): desired input acceleration - sv (float): desired input steering velocity + """PID control for speed to acceleration + + Parameters + ---------- + speed : float + requested speed + current_speed : float + current speed + max_a : float + maximum acceleration + max_v : float + maximum velocity + min_v : float + minimum velocity + + Returns + ------- + float + acceleration """ # accl vel_diff = speed - current_speed diff --git a/f1tenth_gym/envs/integrator.py b/f1tenth_gym/envs/integrator.py index bfc796be..a597a010 100644 --- a/f1tenth_gym/envs/integrator.py +++ b/f1tenth_gym/envs/integrator.py @@ -3,11 +3,35 @@ class IntegratorType(Enum): + """Integrator enum + + RK4: 1 + + Euler: 2 + """ + RK4 = 1 Euler = 2 @staticmethod def from_string(integrator: str): + """Set integrator by string + + Parameters + ---------- + integrator : str + integrator type + + Returns + ------- + RK4Integrator | EulerIntegrator + integrator object + + Raises + ------ + ValueError + Unknown integrator type + """ if integrator == "rk4": return RK4Integrator() elif integrator == "euler": @@ -17,24 +41,74 @@ def from_string(integrator: str): class Integrator: + """Integrator abstract class""" + def __init__(self) -> None: self._integrator_type = None @abstractmethod def integrate(self, f, x, u, dt, params): + """Integrate dynamics + + Parameters + ---------- + f : np.ndarray + RHS of ODE + x : np.ndarray + state + u : np.ndarray + control input + dt : float + sampling time + params : dict + parameter dictionary + + Raises + ------ + NotImplementedError + """ raise NotImplementedError("integrate method not implemented") @property def type(self) -> str: + """property, integrator type + + Returns + ------- + str + type + """ return self._integrator_type class RK4Integrator(Integrator): + """Runge Kutta fourth order integrator""" + def __init__(self) -> None: super().__init__() self._integrator_type = "rk4" def integrate(self, f, x, u, dt, params): + """Integrate dynamics + + Parameters + ---------- + f : np.ndarray + RHS of ODE + x : np.ndarray + state + u : np.ndarray + control input + dt : float + sampling time + params : dict + parameter dictionary + + Returns + ------- + np.ndarray: + integrated state + """ k1 = f( x, u, @@ -131,11 +205,33 @@ def integrate(self, f, x, u, dt, params): class EulerIntegrator(Integrator): + """Euler integrator""" + def __init__(self) -> None: super().__init__() self._integrator_type = "euler" def integrate(self, f, x, u, dt, params): + """Integrate dynamics + + Parameters + ---------- + f : np.ndarray + RHS of ODE + x : np.ndarray + state + u : np.ndarray + control input + dt : float + sampling time + params : dict + parameter dictionary + + Returns + ------- + np.ndarray: + integrated state + """ dstate = f( x, u, diff --git a/f1tenth_gym/envs/laser_models.py b/f1tenth_gym/envs/laser_models.py index 8d3c2e9b..b72bdd1f 100644 --- a/f1tenth_gym/envs/laser_models.py +++ b/f1tenth_gym/envs/laser_models.py @@ -1,30 +1,3 @@ -# MIT License - -# Copyright (c) 2020 Joseph Auckley, Matthew O'Kelly, Aman Sinha, Hongrui Zheng - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - - -""" -Prototype of Utility functions and classes for simulating 2D LIDAR scans -Author: Hongrui Zheng -""" from __future__ import annotations import unittest @@ -35,16 +8,20 @@ def get_dt(bitmap, resolution): - """ - Distance transformation, returns the distance matrix from the input bitmap. + """Distance transformation, returns the distance matrix from the input bitmap. Uses scipy.ndimage, cannot be JITted. - Args: - bitmap (numpy.ndarray, (n, m)): input binary bitmap of the environment, where 0 is obstacles, and 255 (or anything > 0) is freespace - resolution (float): resolution of the input bitmap (m/cell) - - Returns: - dt (numpy.ndarray, (n, m)): output distance matrix, where each cell has the corresponding distance (in meters) to the closest obstacle + Parameters + ---------- + bitmap : np.ndarray + input binary bitmap of the environment, where 0 is obstacles, and 255 (or anything > 0) is freespace + resolution : float + resolution of the input bitmap (m/cell) + + Returns + ------- + np.ndarray + output distance matrix, where each cell has the corresponding distance (in meters) to the closest obstacle """ dt = resolution * edt(bitmap) return dt @@ -52,18 +29,35 @@ def get_dt(bitmap, resolution): @njit(cache=True) def xy_2_rc(x, y, orig_x, orig_y, orig_c, orig_s, height, width, resolution): - """ - Translate (x, y) coordinate into (r, c) in the matrix - - Args: - x (float): coordinate in x (m) - y (float): coordinate in y (m) - orig_x (float): x coordinate of the map origin (m) - orig_y (float): y coordinate of the map origin (m) - - Returns: - r (int): row number in the transform matrix of the given point - c (int): column number in the transform matrix of the given point + """Translate (x, y) coordinate into (r, c) in the matrix + + Parameters + ---------- + x : float + coordinate in x (m) + y : float + coordinate in y (m) + orig_x : float + x coordinate of the map origin (m) + orig_y : float + y coordinate of the map origin (m) + orig_c : float + cosine of the map origin rotation + orig_s : float + sine of the map origin rotation + height : int + height of map (pixel) + width : int + width of map (pixel) + resolution : float + resolution of the input bitmap (m/cell) + + Returns + ------- + r : int + row index + c : int + column index """ # translation x_trans = x - orig_x @@ -93,17 +87,35 @@ def xy_2_rc(x, y, orig_x, orig_y, orig_c, orig_s, height, width, resolution): def distance_transform( x, y, orig_x, orig_y, orig_c, orig_s, height, width, resolution, dt ): - """ - Look up corresponding distance in the distance matrix - - Args: - x (float): x coordinate of the lookup point - y (float): y coordinate of the lookup point - orig_x (float): x coordinate of the map origin (m) - orig_y (float): y coordinate of the map origin (m) - - Returns: - distance (float): corresponding shortest distance to obstacle in meters + """Look up corresponding distance in the distance transform matrix + + Parameters + ---------- + x : _type_ + x coordinate of the lookup point + y : _type_ + y coordinate of the lookup point + orig_x : _type_ + x coordinate of the map origin (m) + orig_y : _type_ + y coordinate of the map origin (m) + orig_c : _type_ + cosine of the map origin rotation + orig_s : _type_ + sine of the map origin rotation + height : _type_ + map height + width : _type_ + map width + resolution : _type_ + resolution of the input bitmap (m/cell) + dt : _type_ + distance transform matrix + + Returns + ------- + float + distance to closest obstacle from the look up point """ r, c = xy_2_rc(x, y, orig_x, orig_y, orig_c, orig_s, height, width, resolution) distance = dt[r, c] @@ -128,21 +140,46 @@ def trace_ray( dt, max_range, ): + """Find the length of a specific ray at a specific scan angle theta. + + Parameters + ---------- + x : float + current x coordinate of the ego (scan) frame + y : float + current y coordinate of the ego (scan) frame + theta_index : int + current index of the scan beam in the scan range + sines : np.ndarray + pre-calculated sines of the angle array + cosines : np.ndarray + pre-calculated cosines of the angle array + eps : float + tolerance to stop ray tracing + orig_x : _type_ + x coordinate of the map origin (m) + orig_y : _type_ + y coordinate of the map origin (m) + orig_c : _type_ + cosine of the map origin rotation + orig_s : _type_ + sine of the map origin rotation + height : _type_ + map height + width : _type_ + map width + resolution : _type_ + resolution of the input bitmap (m/cell) + dt : _type_ + distance transform matrix + max_range : float + maximum range for laser scan rays + + Returns + ------- + float + ray distance """ - Find the length of a specific ray at a specific scan angle theta - Purely math calculation and loops, should be JITted. - - Args: - x (float): current x coordinate of the ego (scan) frame - y (float): current y coordinate of the ego (scan) frame - theta_index(int): current index of the scan beam in the scan range - sines (numpy.ndarray (n, )): pre-calculated sines of the angle array - cosines (numpy.ndarray (n, )): pre-calculated cosines ... - - Returns: - total_distance (float): the distance to first obstacle on the current scan beam - """ - # int casting, and index precal trigs theta_index_ = int(theta_index) s = sines[theta_index_] @@ -193,18 +230,49 @@ def get_scan( dt, max_range, ): - """ - Perform the scan for each discretized angle of each beam of the laser, loop heavy, should be JITted - - Args: - pose (numpy.ndarray(3, )): current pose of the scan frame in the map - theta_dis (int): number of steps to discretize the angles between 0 and 2pi for look up - fov (float): field of view of the laser scan - num_beams (int): number of beams in the scan - theta_index_increment (float): increment between angle indices after discretization - - Returns: - scan (numpy.ndarray(n, )): resulting laser scan at the pose, n=num_beams + """Perform the scan for each discretized angle of each beam of the laser + + Parameters + ---------- + pose : np.ndarray + current pose of the scan frame in the map + theta_dis : int + number of steps to discretize the angles between 0 and 2pi for look up + fov : float + field of view of the laser scan + num_beams : int + number of beams in the scan + theta_index_increment : float + increment between angle indices after discretization + sines : np.ndarray + pre-calculated sines of the angle array + cosines : np.ndarray + pre-calculated cosines of the angle array + eps : float + tolerance to stop ray tracing + orig_x : _type_ + x coordinate of the map origin (m) + orig_y : _type_ + y coordinate of the map origin (m) + orig_c : _type_ + cosine of the map origin rotation + orig_s : _type_ + sine of the map origin rotation + height : _type_ + map height + width : _type_ + map width + resolution : _type_ + resolution of the input bitmap (m/cell) + dt : _type_ + distance transform matrix + max_range : float + maximum range for laser scan rays + + Returns + ------- + np.ndarray + resulting laser scan at the pose """ # empty scan array init scan = np.empty((num_beams,)) @@ -250,20 +318,27 @@ def get_scan( @njit(cache=True, error_model="numpy") def check_ttc_jit(scan, vel, scan_angles, cosines, side_distances, ttc_thresh): - """ - Checks the iTTC of each beam in a scan for collision with environment - - Args: - scan (np.ndarray(num_beams, )): current scan to check - vel (float): current velocity - scan_angles (np.ndarray(num_beams, )): precomped angles of each beam - cosines (np.ndarray(num_beams, )): precomped cosines of the scan angles - side_distances (np.ndarray(num_beams, )): precomped distances at each beam from the laser to the sides of the car - ttc_thresh (float): threshold for iTTC for collision - - Returns: - in_collision (bool): whether vehicle is in collision with environment - collision_angle (float): at which angle the collision happened + """Checks the iTTC of each beam in a scan for collision with environment + + Parameters + ---------- + scan : np.ndarray + current scan to check + vel : float + current velocity + scan_angles : np.ndarray + precomped angles of each beam + cosines : np.ndarray + precomped cosines of the scan angles + side_distances : np.ndarray + precomped distances at each beam from the laser to the sides of the car + ttc_thresh : float + threshold for iTTC for collision + + Returns + ------- + bool + if scan indicates collision """ in_collision = False if vel != 0.0: @@ -282,28 +357,40 @@ def check_ttc_jit(scan, vel, scan_angles, cosines, side_distances, ttc_thresh): @njit(cache=True) def cross(v1, v2): - """ - Cross product of two 2-vectors - - Args: - v1, v2 (np.ndarray(2, )): input vectors - - Returns: - crossproduct (float): cross product + """Cross product of two 2-vectors + + Parameters + ---------- + v1 : np.ndarray + input vector 1 + v2 : np.ndarray + input vector 2 + + Returns + ------- + float + cross product """ return v1[0] * v2[1] - v1[1] * v2[0] @njit(cache=True) def are_collinear(pt_a, pt_b, pt_c): - """ - Checks if three points are collinear in 2D - - Args: - pt_a, pt_b, pt_c (np.ndarray(2, )): points to check in 2D - - Returns: - col (bool): whether three points are collinear + """Checks if three points are collinear in 2D + + Parameters + ---------- + pt_a : np.ndarray + point to check in 2D + pt_b : np.ndarray + point to check in 2D + pt_c : np.ndarray + point to check in 2D + + Returns + ------- + bool + whether three points are collinear """ tol = 1e-8 ba = pt_b - pt_a @@ -314,16 +401,23 @@ def are_collinear(pt_a, pt_b, pt_c): @njit(cache=True) def get_range(pose, beam_theta, va, vb): - """ - Get the distance at a beam angle to the vector formed by two of the four vertices of a vehicle - - Args: - pose (np.ndarray(3, )): pose of the scanning vehicle - beam_theta (float): angle of the current beam (world frame) - va, vb (np.ndarray(2, )): the two vertices forming an edge - - Returns: - distance (float): smallest distance at beam theta from scanning pose to edge + """Get the distance at a beam angle to the vector formed by two of the four vertices of a vehicle + + Parameters + ---------- + pose : np.ndarray + pose of the scanning vehicle + beam_theta : float + angle of the current beam (world frame) + va : np.ndarray + the two vertices forming an edge + vb : np.ndarray + the two vertices forming an edge + + Returns + ------- + float + smallest distance at beam theta from scanning pose to edge """ o = pose[0:2] v1 = o - va @@ -348,13 +442,23 @@ def get_range(pose, beam_theta, va, vb): @njit(cache=True) def get_blocked_view_indices(pose, vertices, scan_angles): - """ - Get the indices of the start and end of blocked fov in scans by another vehicle - - Args: - pose (np.ndarray(3, )): pose of the scanning vehicle - vertices (np.ndarray(4, 2)): four vertices of a vehicle pose - scan_angles (np.ndarray(num_beams, )): corresponding beam angles + """Get the indices of the start and end of blocked fov in scans by another vehicle + + Parameters + ---------- + pose : np.ndarray + pose of the scanning vehicle + vertices : np.ndarray + four vertices of a vehicle pose + scan_angles : np.ndarray + corresponding beam angles + + Returns + ------- + min_ind : int + smaller index of blocked portion of laser scan array + max_ind : int + larger index of blocked portion of laser scan array """ # find four vectors formed by pose and 4 vertices: vecs = vertices - pose[:2] @@ -386,17 +490,23 @@ def get_blocked_view_indices(pose, vertices, scan_angles): @njit(cache=True) def ray_cast(pose, scan, scan_angles, vertices): - """ - Modify a scan by ray casting onto another agent's four vertices - - Args: - pose (np.ndarray(3, )): pose of the vehicle performing scan - scan (np.ndarray(num_beams, )): original scan to modify - scan_angles (np.ndarray(num_beams, )): corresponding beam angles - vertices (np.ndarray(4, 2)): four vertices of a vehicle pose - - Returns: - new_scan (np.ndarray(num_beams, )): modified scan + """Modify a scan by ray casting onto another agent's four vertices + + Parameters + ---------- + pose : np.ndarray + pose of the vehicle performing scan + scan : np.ndarray + original scan to modify + scan_angles : np.ndarray + corresponding beam angles + vertices : np.ndarray + four vertices of a vehicle pose + + Returns + ------- + np.ndarray + modified scan """ # pad vertices so loops around looped_vertices = np.empty((5, 2)) @@ -421,15 +531,20 @@ def ray_cast(pose, scan, scan_angles, vertices): class ScanSimulator2D(object): - """ - 2D LIDAR scan simulator class - - Init params: - num_beams (int): number of beams in the scan - fov (float): field of view of the laser scan - eps (float, default=0.0001): ray tracing iteration termination condition - theta_dis (int, default=2000): number of steps to discretize the angles between 0 and 2pi for look up - max_range (float, default=30.0): maximum range of the laser + """2D LIDAR scan simulator class + + Parameters + ---------- + num_beams : int + number of beams in the scan + fov : float + field of view of the laser scan + eps : float, optional + ray tracing iteration termination condition, by default 0.0001 + theta_dis : int, optional + number of steps to discretize the angles between 0 and 2pi for look up, by default 2000 + max_range : float, optional + maximum range of the laser, by default 30.0 """ def __init__(self, num_beams, fov, eps=0.0001, theta_dis=2000, max_range=30.0): @@ -459,14 +574,17 @@ def __init__(self, num_beams, fov, eps=0.0001, theta_dis=2000, max_range=30.0): self.cosines = np.cos(theta_arr) def set_map(self, map: str | Track): - """ - Set the bitmap of the scan simulator by path + """Set the bitmap of the scan simulator by path - Args: - map (str | Track): path to the map file, or Track object + Parameters + ---------- + map : str | Track + path to the map file, or Track object - Returns: - flag (bool): if image reading and loading is successful + Returns + ------- + bool + if image reading and loading is successful """ if isinstance(map, str): self.track = Track.from_track_name(map) @@ -493,21 +611,27 @@ def set_map(self, map: str | Track): return True def scan(self, pose, rng, std_dev=0.01): + """Perform simulated 2D scan by pose on the given map + + Parameters + ---------- + pose : np.ndarray + pose of the scan frame (x, y, theta) + rng : np.random.Generator + random number generator to use for whitenoise in scan + std_dev : float, optional + standard deviation of the generated whitenoise in the scan, by default 0.01 + + Returns + ------- + np.ndarray + data array of the laserscan + + Raises + ------ + ValueError + Map is not set for scan simulator. """ - Perform simulated 2D scan by pose on the given map - - Args: - pose (numpy.ndarray (3, )): pose of the scan frame (x, y, theta) - rng (numpy.random.Generator): random number generator to use for whitenoise in scan, or None - std_dev (float, default=0.01): standard deviation of the generated whitenoise in the scan - - Returns: - scan (numpy.ndarray (n, )): data array of the laserscan, n=num_beams - - Raises: - ValueError: when scan is called before a map is set - """ - if self.map_height is None: raise ValueError("Map is not set for scan simulator.") @@ -538,12 +662,20 @@ def scan(self, pose, rng, std_dev=0.01): return scan def get_increment(self): + """Return angle increment between scans + + Returns + ------- + float + angle increment + """ return self.angle_increment """ Unit test for the 2D scan simulator class Author: Hongrui Zheng +TODO: do we still need these? Test cases: 1, 2: Comparison between generated scan array of the new simulator and the legacy C++ simulator, generated data used, MSE is used as the metric diff --git a/f1tenth_gym/envs/observation.py b/f1tenth_gym/envs/observation.py index 263f8260..ae3a706a 100644 --- a/f1tenth_gym/envs/observation.py +++ b/f1tenth_gym/envs/observation.py @@ -7,31 +7,62 @@ class Observation: - """ - Abstract class for observations. Each observation must implement the space and observe methods. + """Observation abstract class - :param env: The environment. - :param vehicle_id: The id of the observer vehicle. - :param kwargs: Additional arguments. + Parameters + ---------- + env : gym.Env + Gymnasium environment """ - def __init__(self, env): self.env = env @abstractmethod def space(self): + """Observation space + + Raises + ------ + NotImplementedError + """ raise NotImplementedError() @abstractmethod def observe(self): + """Observe + + Raises + ------ + NotImplementedError + """ raise NotImplementedError() class OriginalObservation(Observation): + """Original Observation class + + Parameters + ---------- + env : gym.Env + Gymnasium environment + """ def __init__(self, env): super().__init__(env) def space(self): + """Return observation space + + Original Observations is a dict with keys: + + >>> [ego_idx, scans, poses_x, poses_y, poses_theta, linear_vels_x, linear_vels_y, ang_vels_z, collisions, lap_times, lap_counts] + + Each value is a list of observations corresponding to the agents. + + Returns + ------- + gym.spaces.Space + observation space + """ num_agents = self.env.num_agents scan_size = self.env.sim.agents[0].scan_simulator.num_beams scan_range = ( @@ -99,6 +130,13 @@ def space(self): return obs_space def observe(self): + """Observe function + + Returns + ------- + dict + Current observation + """ # state indices xi, yi, deltai, vxi, yawi, yaw_ratei, slipi = range( 7 @@ -152,11 +190,31 @@ def observe(self): class FeaturesObservation(Observation): + """Feature Observation class + + Parameters + ---------- + env : gym.Env + Gymnasium environment + """ def __init__(self, env, features: List[str]): super().__init__(env) self.features = features def space(self): + """Return observation space + + Feature Observations is a dict with agent_ids as keys + + And each value is a dict with keys: + + >>> [scan, pose_x, pose_y, pose_theta, linear_vel_x, linear_vel_y, ang_vel_z, delta, beta, collision, lap_time, lap_count] + + Returns + ------- + gym.spaces.Space + observation space + """ scan_size = self.env.sim.agents[0].scan_simulator.num_beams scan_range = self.env.sim.agents[0].scan_simulator.max_range large_num = 1e30 # large number to avoid unbounded obs space (ie., low=-inf or high=inf) @@ -209,6 +267,13 @@ def space(self): return obs_space def observe(self): + """Observe function + + Returns + ------- + dict + Current observation + """ # state indices xi, yi, deltai, vxi, yawi, yaw_ratei, slipi = range( 7 @@ -264,6 +329,25 @@ def observe(self): def observation_factory(env, type: str | None, **kwargs) -> Observation: + """Decides which observation type and keys to include based on type string + + Parameters + ---------- + env : gym.Env + Gymnasium environment + type : str | None + Observation type + + Returns + ------- + Observation + Observation type + + Raises + ------ + ValueError + Invalid observation type + """ type = type or "original" if type == "original": diff --git a/f1tenth_gym/envs/utils.py b/f1tenth_gym/envs/utils.py index 4bed0ca9..cd82e3aa 100644 --- a/f1tenth_gym/envs/utils.py +++ b/f1tenth_gym/envs/utils.py @@ -6,9 +6,17 @@ def deep_update( mapping: Dict[KeyType, Any], *updating_mappings: Dict[KeyType, Any] ) -> Dict[KeyType, Any]: - """ - Dictionary deep update for nested dictionaries from pydantic: - https://github.com/pydantic/pydantic/blob/fd2991fe6a73819b48c906e3c3274e8e47d0f761/pydantic/utils.py#L200 + """Recursive update of dict from pydantic: https://github.com/pydantic/pydantic/blob/fd2991fe6a73819b48c906e3c3274e8e47d0f761/pydantic/utils.py#L200 + + Parameters + ---------- + mapping : Dict[KeyType, Any] + mapping of original dict + + Returns + ------- + Dict[KeyType, Any] + updated dict """ updated_mapping = mapping.copy() for updating_mapping in updating_mappings: diff --git a/poetry.lock b/poetry.lock index c6f66176..22bd2500 100644 --- a/poetry.lock +++ b/poetry.lock @@ -44,6 +44,41 @@ files = [ pyflakes = ">=3.0.0" tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} +[[package]] +name = "babel" +version = "2.14.0" +description = "Internationalization utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "Babel-2.14.0-py3-none-any.whl", hash = "sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287"}, + {file = "Babel-2.14.0.tar.gz", hash = "sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363"}, +] + +[package.extras] +dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] + +[[package]] +name = "beautifulsoup4" +version = "4.12.3" +description = "Screen-scraping library" +optional = false +python-versions = ">=3.6.0" +files = [ + {file = "beautifulsoup4-4.12.3-py3-none-any.whl", hash = "sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed"}, + {file = "beautifulsoup4-4.12.3.tar.gz", hash = "sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051"}, +] + +[package.dependencies] +soupsieve = ">1.2" + +[package.extras] +cchardet = ["cchardet"] +chardet = ["chardet"] +charset-normalizer = ["charset-normalizer"] +html5lib = ["html5lib"] +lxml = ["lxml"] + [[package]] name = "black" version = "23.12.1" @@ -452,6 +487,17 @@ files = [ {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] +[[package]] +name = "docutils" +version = "0.20.1" +description = "Docutils -- Python Documentation Utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, + {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, +] + [[package]] name = "exceptiongroup" version = "1.2.0" @@ -614,6 +660,17 @@ files = [ {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] +[[package]] +name = "imagesize" +version = "1.4.1" +description = "Getting image size from png/jpeg/jpeg2000/gif file" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] + [[package]] name = "importlib-metadata" version = "7.0.1" @@ -765,6 +822,23 @@ docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alab qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] testing = ["Django", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] +[[package]] +name = "jinja2" +version = "3.1.3" +description = "A very fast and expressive template engine." +optional = false +python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, + {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + [[package]] name = "jupyter-client" version = "8.6.0" @@ -951,6 +1025,75 @@ files = [ {file = "llvmlite-0.42.0.tar.gz", hash = "sha256:f92b09243c0cc3f457da8b983f67bd8e1295d0f5b3746c7a1861d7a99403854a"}, ] +[[package]] +name = "markupsafe" +version = "2.1.5" +description = "Safely add untrusted strings to HTML/XML markup." +optional = false +python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, + {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, +] + [[package]] name = "marshmallow" version = "3.21.0" @@ -1134,6 +1277,28 @@ files = [ {file = "numpy-1.25.0.tar.gz", hash = "sha256:f1accae9a28dc3cda46a91de86acf69de0d1b5f4edd44a9b0c3ceb8036dfff19"}, ] +[[package]] +name = "numpydoc" +version = "1.6.0" +description = "Sphinx extension to support docstrings in Numpy format" +optional = false +python-versions = ">=3.8" +files = [ + {file = "numpydoc-1.6.0-py3-none-any.whl", hash = "sha256:b6ddaa654a52bdf967763c1e773be41f1c3ae3da39ee0de973f2680048acafaa"}, + {file = "numpydoc-1.6.0.tar.gz", hash = "sha256:ae7a5380f0a06373c3afe16ccd15bd79bc6b07f2704cbc6f1e7ecc94b4f5fc0d"}, +] + +[package.dependencies] +Jinja2 = ">=2.10" +sphinx = ">=5" +tabulate = ">=0.8.10" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} + +[package.extras] +developer = ["pre-commit (>=3.3)", "tomli"] +doc = ["matplotlib (>=3.5)", "numpy (>=1.22)", "pydata-sphinx-theme (>=0.13.3)", "sphinx (>=7)"] +test = ["matplotlib", "pytest", "pytest-cov"] + [[package]] name = "opencv-python" version = "4.9.0.80" @@ -1414,6 +1579,33 @@ files = [ {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] +[[package]] +name = "pydata-sphinx-theme" +version = "0.15.2" +description = "Bootstrap-based Sphinx theme from the PyData community" +optional = false +python-versions = ">=3.9" +files = [ + {file = "pydata_sphinx_theme-0.15.2-py3-none-any.whl", hash = "sha256:0c5fa1fa98a9b26dae590666ff576f27e26c7ba708fee754ecb9e07359ed4588"}, + {file = "pydata_sphinx_theme-0.15.2.tar.gz", hash = "sha256:4243fee85b3afcfae9df64f83210a04e7182e53bc3db8841ffff6d21d95ae320"}, +] + +[package.dependencies] +accessible-pygments = "*" +Babel = "*" +beautifulsoup4 = "*" +docutils = "!=0.17.0" +packaging = "*" +pygments = ">=2.7" +sphinx = ">=5.0" +typing-extensions = "*" + +[package.extras] +a11y = ["pytest-playwright"] +dev = ["nox", "pre-commit", "pydata-sphinx-theme[doc,test]", "pyyaml"] +doc = ["ablog (>=0.11.0rc2)", "colorama", "ipykernel", "ipyleaflet", "jupyter_sphinx", "jupyterlite-sphinx", "linkify-it-py", "matplotlib", "myst-parser", "nbsphinx", "numpy", "numpydoc", "pandas", "plotly", "rich", "sphinx-autoapi (>=3.0.0)", "sphinx-copybutton", "sphinx-design", "sphinx-favicon (>=1.0.1)", "sphinx-sitemap", "sphinx-togglebutton", "sphinxcontrib-youtube (<1.4)", "sphinxext-rediraffe", "xarray"] +test = ["pytest", "pytest-cov", "pytest-regressions"] + [[package]] name = "pyflakes" version = "3.2.0" @@ -1875,6 +2067,157 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +[[package]] +name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +optional = false +python-versions = "*" +files = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] + +[[package]] +name = "soupsieve" +version = "2.5" +description = "A modern CSS selector implementation for Beautiful Soup." +optional = false +python-versions = ">=3.8" +files = [ + {file = "soupsieve-2.5-py3-none-any.whl", hash = "sha256:eaa337ff55a1579b6549dc679565eac1e3d000563bcb1c8ab0d0fefbc0c2cdc7"}, + {file = "soupsieve-2.5.tar.gz", hash = "sha256:5663d5a7b3bfaeee0bc4372e7fc48f9cff4940b3eec54a6451cc5299f1097690"}, +] + +[[package]] +name = "sphinx" +version = "7.2.6" +description = "Python documentation generator" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinx-7.2.6-py3-none-any.whl", hash = "sha256:1e09160a40b956dc623c910118fa636da93bd3ca0b9876a7b3df90f07d691560"}, + {file = "sphinx-7.2.6.tar.gz", hash = "sha256:9a5160e1ea90688d5963ba09a2dcd8bdd526620edbb65c328728f1b2228d5ab5"}, +] + +[package.dependencies] +alabaster = ">=0.7,<0.8" +babel = ">=2.9" +colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} +docutils = ">=0.18.1,<0.21" +imagesize = ">=1.3" +importlib-metadata = {version = ">=4.8", markers = "python_version < \"3.10\""} +Jinja2 = ">=3.0" +packaging = ">=21.0" +Pygments = ">=2.14" +requests = ">=2.25.0" +snowballstemmer = ">=2.0" +sphinxcontrib-applehelp = "*" +sphinxcontrib-devhelp = "*" +sphinxcontrib-htmlhelp = ">=2.0.0" +sphinxcontrib-jsmath = "*" +sphinxcontrib-qthelp = "*" +sphinxcontrib-serializinghtml = ">=1.1.9" + +[package.extras] +docs = ["sphinxcontrib-websupport"] +lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"] +test = ["cython (>=3.0)", "filelock", "html5lib", "pytest (>=4.6)", "setuptools (>=67.0)"] + +[[package]] +name = "sphinxcontrib-applehelp" +version = "1.0.8" +description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinxcontrib_applehelp-1.0.8-py3-none-any.whl", hash = "sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4"}, + {file = "sphinxcontrib_applehelp-1.0.8.tar.gz", hash = "sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "1.0.6" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinxcontrib_devhelp-1.0.6-py3-none-any.whl", hash = "sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f"}, + {file = "sphinxcontrib_devhelp-1.0.6.tar.gz", hash = "sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.0.5" +description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl", hash = "sha256:393f04f112b4d2f53d93448d4bce35842f62b307ccdc549ec1585e950bc35e04"}, + {file = "sphinxcontrib_htmlhelp-2.0.5.tar.gz", hash = "sha256:0dc87637d5de53dd5eec3a6a01753b1ccf99494bd756aafecd74b4fa9e729015"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] +test = ["html5lib", "pytest"] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +description = "A sphinx extension which renders display math in HTML via JavaScript" +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] + +[package.extras] +test = ["flake8", "mypy", "pytest"] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "1.0.7" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinxcontrib_qthelp-1.0.7-py3-none-any.whl", hash = "sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182"}, + {file = "sphinxcontrib_qthelp-1.0.7.tar.gz", hash = "sha256:053dedc38823a80a7209a80860b16b722e9e0209e32fea98c90e4e6624588ed6"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "1.1.10" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl", hash = "sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7"}, + {file = "sphinxcontrib_serializinghtml-1.1.10.tar.gz", hash = "sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] +test = ["pytest"] + [[package]] name = "stack-data" version = "0.6.3" @@ -1894,6 +2237,20 @@ pure-eval = "*" [package.extras] tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] +[[package]] +name = "tabulate" +version = "0.9.0" +description = "Pretty-print tabular data" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f"}, + {file = "tabulate-0.9.0.tar.gz", hash = "sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c"}, +] + +[package.extras] +widechars = ["wcwidth"] + [[package]] name = "tomli" version = "2.0.1" diff --git a/pyproject.toml b/pyproject.toml index 6263a8a3..003aefeb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,9 @@ opencv-python = "^4.9.0.80" yamldataclassconfig = "^1.5.0" requests = "^2.31.0" shapely = "^2.0.2" +sphinx = "^7.2.6" +numpydoc = "^1.6.0" +pydata-sphinx-theme = "^0.15.2" [tool.poetry.group.dev.dependencies] pytest = "^7.4.4"