diff --git a/.DS_Store b/.DS_Store index 5e11757..808661c 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/docs/code_of_conduct.rst b/docs/code_of_conduct.rst new file mode 100644 index 0000000..63606e6 --- /dev/null +++ b/docs/code_of_conduct.rst @@ -0,0 +1,4 @@ +Code of Conduct +=============== +.. include:: ../CODE_OF_CONDUCT.md + :parser: myst_parser.sphinx_ diff --git a/docs/conf.py b/docs/conf.py index bfd540c..843af38 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# shasta documentation build configuration file, created by +# SHaSTA documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # This file is execfile()d with the current directory set to its @@ -20,9 +20,8 @@ import os import sys -sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath("..")) -import shasta # noqa # -- General configuration --------------------------------------------- @@ -33,33 +32,34 @@ # 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.napoleon', - 'sphinx.ext.viewcode', - 'sphinx.ext.autodoc', - 'autoapi.extension', - 'sphinx.ext.inheritance_diagram', - 'sphinx.ext.githubpages', + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", + "sphinx.ext.autodoc", + "autoapi.extension", + "sphinx.ext.inheritance_diagram", + "sphinx.ext.githubpages", "sphinx.ext.graphviz", + "myst_parser", ] # AutoAPI setting -autoapi_type = 'python' -autoapi_dirs = ['../shasta'] +autoapi_type = "python" +autoapi_dirs = ["../shasta"] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' +source_suffix = [".rst", ".md"] +# source_suffix = ".rst" # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = 'shasta' +project = "SHaSTA" copyright = "2020, Hemanth Manjunatha" author = "Hemanth Manjunatha" @@ -68,9 +68,9 @@ # the built documents. # # The short X.Y version. -version = '0.1.0' +version = "0.1.0" # The full version, including alpha/beta/rc tags. -release = '0.1.0' +release = "0.1.0" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -81,7 +81,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # If true, the current module name will be prepended to all description # unit titles (such as .. function::). @@ -102,7 +102,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "sphinx_rtd_theme" +html_theme = "furo" # Theme options are theme-specific and customize the look and feel of a # theme further. For a list of options available for each theme, see the @@ -114,12 +114,12 @@ # 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'] -html_style = 'css/custom.css' +# html_style = 'css/custom.css' # -- Options for HTMLHelp output --------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = 'shastadoc' +htmlhelp_basename = "SHaSTAdoc" # -- Options for LaTeX output ------------------------------------------ @@ -142,14 +142,14 @@ # (source start file, target name, title, author, documentclass # [howto, manual, or own class]). latex_documents = [ - (master_doc, 'shasta.tex', 'shasta Documentation', 'Hemanth Manjunatha', 'manual'), + (master_doc, "SHaSTA.tex", "SHaSTA Documentation", "Hemanth Manjunatha", "manual"), ] # -- Options for manual page output ------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, 'shasta', 'shasta Documentation', [author], 1)] +man_pages = [(master_doc, "SHaSTA", "SHaSTA Documentation", [author], 1)] # -- Options for Texinfo output ---------------------------------------- @@ -159,12 +159,12 @@ texinfo_documents = [ ( master_doc, - 'shasta', - 'shasta Documentation', + "SHaSTA", + "SHaSTA Documentation", author, - 'shasta', - 'One line description of project.', - 'Miscellaneous', + "SHaSTA", + "One line description of project.", + "Miscellaneous", ), ] diff --git a/docs/contributing.rst b/docs/contributing.rst index e582053..66c365e 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -1 +1,4 @@ -.. include:: ../CONTRIBUTING.rst +Contributing +=========== +.. include:: ../CONTRIBUTING.md + :parser: myst_parser.sphinx_ diff --git a/docs/html/.buildinfo b/docs/html/.buildinfo index 3646b93..7d46604 100644 --- a/docs/html/.buildinfo +++ b/docs/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 0f3f600e895ccc60e1d591663fb015d5 +config: 9679b8f1632111510dea9e63e8ea6a5a tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/html/.doctrees/autoapi/index.doctree b/docs/html/.doctrees/autoapi/index.doctree index 355b5c0..7b582f8 100644 Binary files a/docs/html/.doctrees/autoapi/index.doctree and b/docs/html/.doctrees/autoapi/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/actor/index.doctree b/docs/html/.doctrees/autoapi/shasta/actor/index.doctree new file mode 100644 index 0000000..d4a96d9 Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/actor/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/base_experiment/index.doctree b/docs/html/.doctrees/autoapi/shasta/base_experiment/index.doctree new file mode 100644 index 0000000..a62ef82 Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/base_experiment/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/core/index.doctree b/docs/html/.doctrees/autoapi/shasta/core/index.doctree new file mode 100644 index 0000000..9f448a5 Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/core/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/index.doctree b/docs/html/.doctrees/autoapi/shasta/index.doctree new file mode 100644 index 0000000..78b7e2b Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/map/index.doctree b/docs/html/.doctrees/autoapi/shasta/map/index.doctree new file mode 100644 index 0000000..be89be4 Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/map/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/preprocessing/bake_texture/index.doctree b/docs/html/.doctrees/autoapi/shasta/preprocessing/bake_texture/index.doctree new file mode 100644 index 0000000..4099596 Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/preprocessing/bake_texture/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/preprocessing/index.doctree b/docs/html/.doctrees/autoapi/shasta/preprocessing/index.doctree new file mode 100644 index 0000000..ca77051 Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/preprocessing/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/preprocessing/preprocess/index.doctree b/docs/html/.doctrees/autoapi/shasta/preprocessing/preprocess/index.doctree new file mode 100644 index 0000000..f24a3d5 Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/preprocessing/preprocess/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/preprocessing/utils/index.doctree b/docs/html/.doctrees/autoapi/shasta/preprocessing/utils/index.doctree new file mode 100644 index 0000000..bf5babe Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/preprocessing/utils/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/primitives/formation/index.doctree b/docs/html/.doctrees/autoapi/shasta/primitives/formation/index.doctree new file mode 100644 index 0000000..d677cd2 Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/primitives/formation/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/primitives/index.doctree b/docs/html/.doctrees/autoapi/shasta/primitives/index.doctree new file mode 100644 index 0000000..d9f0c7c Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/primitives/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/primitives/path_planning/index.doctree b/docs/html/.doctrees/autoapi/shasta/primitives/path_planning/index.doctree new file mode 100644 index 0000000..a27490b Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/primitives/path_planning/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/utils/index.doctree b/docs/html/.doctrees/autoapi/shasta/utils/index.doctree new file mode 100644 index 0000000..764d1d0 Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/utils/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/visualize/index.doctree b/docs/html/.doctrees/autoapi/shasta/visualize/index.doctree new file mode 100644 index 0000000..af9d26b Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/visualize/index.doctree differ diff --git a/docs/html/.doctrees/autoapi/shasta/world/index.doctree b/docs/html/.doctrees/autoapi/shasta/world/index.doctree new file mode 100644 index 0000000..a9c01da Binary files /dev/null and b/docs/html/.doctrees/autoapi/shasta/world/index.doctree differ diff --git a/docs/html/.doctrees/code_of_conduct.doctree b/docs/html/.doctrees/code_of_conduct.doctree new file mode 100644 index 0000000..7a4b4bf Binary files /dev/null and b/docs/html/.doctrees/code_of_conduct.doctree differ diff --git a/docs/html/.doctrees/contributing.doctree b/docs/html/.doctrees/contributing.doctree index 773e5c7..3107632 100644 Binary files a/docs/html/.doctrees/contributing.doctree and b/docs/html/.doctrees/contributing.doctree differ diff --git a/docs/html/.doctrees/environment.pickle b/docs/html/.doctrees/environment.pickle index a2e20fb..229ef32 100644 Binary files a/docs/html/.doctrees/environment.pickle and b/docs/html/.doctrees/environment.pickle differ diff --git a/docs/html/.doctrees/history.doctree b/docs/html/.doctrees/history.doctree index 44a4062..f00eeed 100644 Binary files a/docs/html/.doctrees/history.doctree and b/docs/html/.doctrees/history.doctree differ diff --git a/docs/html/.doctrees/index.doctree b/docs/html/.doctrees/index.doctree index 32502cf..2a11968 100644 Binary files a/docs/html/.doctrees/index.doctree and b/docs/html/.doctrees/index.doctree differ diff --git a/docs/html/.doctrees/installation.doctree b/docs/html/.doctrees/installation.doctree index 206d4ce..6cba13a 100644 Binary files a/docs/html/.doctrees/installation.doctree and b/docs/html/.doctrees/installation.doctree differ diff --git a/docs/html/.doctrees/readme.doctree b/docs/html/.doctrees/readme.doctree index 6ee6b82..6a5e678 100644 Binary files a/docs/html/.doctrees/readme.doctree and b/docs/html/.doctrees/readme.doctree differ diff --git a/docs/html/.doctrees/usage.doctree b/docs/html/.doctrees/usage.doctree index 8e22f1c..cdd21b5 100644 Binary files a/docs/html/.doctrees/usage.doctree and b/docs/html/.doctrees/usage.doctree differ diff --git a/docs/html/_modules/index.html b/docs/html/_modules/index.html index dc297f7..a16c9d8 100644 --- a/docs/html/_modules/index.html +++ b/docs/html/_modules/index.html @@ -1,235 +1,273 @@ + + + + + + + + Overview: module code - SHaSTA 0.1.0 documentation + + + + + + - - - - + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+ +
+ +
+
- - - - - - - - - - +
+ + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/actor.html b/docs/html/_modules/shasta/actor.html new file mode 100644 index 0000000..217fe6c --- /dev/null +++ b/docs/html/_modules/shasta/actor.html @@ -0,0 +1,343 @@ + + + + + + + + shasta.actor - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.actor

+from abc import ABCMeta, abstractmethod
+from future.utils import with_metaclass
+
+
+
[docs]class BaseActor(with_metaclass(ABCMeta, object)): + """This the base class for single UGV robot""" + +
[docs] physics_client = None
+
[docs] _loaded = False
+ + def __init__(self): + self.states = {} + self._actor_id = None + self.init_pos = None + self.init_orientation = None + +
[docs] def _load(self): + """Load object into pybullet and return list of loaded body ids.""" + if self._loaded: + raise ValueError("Cannot load an actor multiple times.") + self._loaded = True + actor_ids = self.load_asset() + + if not isinstance(actor_ids, list): + actor_ids = [actor_ids] + + self._actor_id = actor_ids[0] + return actor_ids
+ +
[docs] def get_actor_id(self): + """Get the actor id + + Returns + ------- + int + The actor id in the simulation + """ + return self._actor_id
+ + @abstractmethod +
[docs] def load_asset(self, *args, **kwargs): + """Load the assests of the actor.""" + raise NotImplementedError
+ + @abstractmethod +
[docs] def reset(self, *args, **kwargs): + """Reset the actor + + Raises + ------ + NotImplementedError + """ + raise NotImplementedError
+ + @abstractmethod +
[docs] def get_observation(self, *args, **kwargs): + """Get the observation from the actor. + + Raises + ------ + NotImplementedError + """ + raise NotImplementedError
+ + @abstractmethod +
[docs] def apply_action(self, *args, **kwargs): + """Apply the action to the actor + + Raises + ------ + NotImplementedError + """ + raise NotImplementedError
+ + @abstractmethod +
[docs] def destroy(self, *args, **kwargs): + """Destroy the actor + + Raises + ------ + NotImplementedError + """ + raise NotImplementedError
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/base_experiment.html b/docs/html/_modules/shasta/base_experiment.html new file mode 100644 index 0000000..d28a892 --- /dev/null +++ b/docs/html/_modules/shasta/base_experiment.html @@ -0,0 +1,334 @@ + + + + + + + + shasta.base_experiment - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.base_experiment

+#!/usr/bin/env python
+
+# This work is licensed under the terms of the MIT license.
+# For a copy, see <https://opensource.org/licenses/MIT>.
+from abc import ABCMeta, abstractmethod
+from future.utils import with_metaclass
+
+
+
[docs]class BaseExperiment(with_metaclass(ABCMeta, object)): + def __init__(self, config, core, experiment_config=None, *args, **kargs): + """The base experiment which other experiments should inherit + + Parameters + ---------- + config : yaml + The experiment configuration file + core : object + The SHASTA core object + + Returns + ------- + None + """ + self.config = config + self.core = core + self.exp_config = experiment_config + + return None + +
[docs] def reset(self): + """Called at the beginning and each time the simulation is reset""" + pass
+ + @abstractmethod +
[docs] def get_action_space(self): + """Returns the action space""" + raise NotImplementedError
+ + @abstractmethod +
[docs] def get_observation_space(self): + """Returns the observation space""" + raise NotImplementedError
+ +
[docs] def get_actions(self): + """Returns the actions""" + raise NotImplementedError
+ + @abstractmethod +
[docs] def apply_actions(self, actions, core): + """Given the action, applies the action to group or individual actor + + :param action: value outputted by the policy + """ + raise NotImplementedError
+ + @abstractmethod +
[docs] def get_observation(self, observation, core): + """Function to do all the post processing of observations (sensor data). + + :param sensor_data: dictionary {sensor_name: sensor_data} + + Should return a tuple or list with two items, the processed observations, + as well as a variable with additional information about such observation. + The information variable can be empty + """ + return NotImplementedError
+ +
[docs] def get_done_status(self, observation, core): + """Returns whether or not the experiment has to end""" + return NotImplementedError
+ +
[docs] def compute_reward(self, observation, core): + """Computes the reward""" + return NotImplementedError
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/core.html b/docs/html/_modules/shasta/core.html new file mode 100644 index 0000000..731ba80 --- /dev/null +++ b/docs/html/_modules/shasta/core.html @@ -0,0 +1,478 @@ + + + + + + + + shasta.core - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.core

+import os
+import psutil
+import signal
+
+import pybullet as p
+from pybullet_utils import bullet_client as bc
+
+from .world import World
+from .map import Map
+
+from .utils import get_initial_positions
+
+
+
[docs]def kill_all_servers(): + """Kill all PIDs that start with Carla""" + processes = [p for p in psutil.process_iter() if "carla" in p.name().lower()] + for process in processes: + os.kill(process.pid, signal.SIGKILL)
+ + +
[docs]class ShastaCore: + """ + Class responsible of handling all the different CARLA functionalities, + such as server-client connecting, actor spawning, + and getting the sensors data. + """ + + def __init__(self, config, actor_groups: dict = None): + """Initialize the server and client""" + self.config = config + self.actor_groups = actor_groups + + # Verify if the actor groups is a dictionary + if not isinstance(self.actor_groups, dict): + raise TypeError('Actor groups should be of type dict') + + # Setup world and map + self.world = World(config) + self.map = Map() + + self.init_server() + self._setup_physics_client() + +
[docs] def _setup_physics_client(self): + """Setup the physics client + + Returns + ------- + None + """ + # Usage mode + if self.config['headless']: + self.physics_client = bc.BulletClient(connection_mode=p.DIRECT) + else: + options = '--background_color_red=0.85 --background_color_green=0.85 --background_color_blue=0.85' # noqa + self.physics_client = bc.BulletClient( + connection_mode=p.GUI, options=options + ) + + # Set the camera parameters + self.camer_distance = 150.0 + self.camera_yaw = 0.0 + self.camera_pitch = -89.999 + self.camera_target_position = [0, 30, 0] + self.physics_client.resetDebugVisualizerCamera( + cameraDistance=self.camer_distance, + cameraYaw=self.camera_yaw, + cameraPitch=self.camera_pitch, + cameraTargetPosition=self.camera_target_position, + ) + + self.physics_client.configureDebugVisualizer( + self.physics_client.COV_ENABLE_GUI, 0 + ) + + # Set gravity + self.physics_client.setGravity(0, 0, -9.81) + + # Set parameters for simulation + self.physics_client.setPhysicsEngineParameter( + fixedTimeStep=self.config['time_step'] / 10, + numSubSteps=1, + numSolverIterations=5, + ) + + # Inject physics client + if self.world.physics_client is None: + self.world.physics_client = self.physics_client + + return None
+ +
[docs] def get_physics_client(self): + """Ge the physics client + + Returns + ------- + object + The bullet physics client + """ + return self.physics_client
+ +
[docs] def init_server(self): + """Start a server on a random port""" + pass
+ +
[docs] def setup_experiment(self, experiment_config): + """Initialize the hero and sensors""" + + # Load the environment and setup the map + self.map.setup(experiment_config) + read_path = self.map.asset_path + '/environment_collision_free.urdf' + self.world.load_world_model(read_path) + + # Spawn the actors in the physics client + self.spawn_actors()
+ +
[docs] def get_world(self): + """Get the World object from the simulation + + Returns + ------- + object + The world object + """ + return self.world
+ +
[docs] def get_map(self): + """Get the Map object from the simulation + + Returns + ------- + object + The map object + """ + return self.map
+ +
[docs] def reset(self): + """This function resets / spawns the hero vehicle and its sensors""" + + # Reset all the actors + for group_id in self.actor_groups: + # Check if the entry is a list or not + if not isinstance(self.actor_groups[group_id], list): + self.actor_groups[group_id] = [self.actor_groups[group_id]] + + for actor in self.actor_groups[group_id]: + # Reset the actor and collect the observation + print(actor.init_pos) + actor.reset() + + return None
+ +
[docs] def spawn_actors(self): + """Spawns vehicles and walkers, also setting up the Traffic Manager and its parameters""" + for group_id in self.actor_groups: + # Check if the entry is a list or not + if not isinstance(self.actor_groups[group_id], list): + self.actor_groups[group_id] = [self.actor_groups[group_id]] + + # Spawn the actors + spawn_point = self.map.get_cartesian_spawn_points() + positions = get_initial_positions( + spawn_point, 10, len(self.actor_groups[group_id]) + ) + for actor, position in zip(self.actor_groups[group_id], positions): + if actor.init_pos is None: + actor.init_pos = position + else: + actor.init_pos = self.map.convert_to_cartesian(actor.init_pos) + + self.world.spawn_actor(actor, position)
+ +
[docs] def get_actor_groups(self): + """Get the actor groups + + Returns + ------- + dict + The actor groups as a dict with group id as the key + list of actors as the value + """ + return self.actor_groups
+ +
[docs] def get_actors_by_group_id(self, group_id): + """Get a list of actor given by group id + + Parameters + ---------- + group_id : int + Group id to be returned + + Returns + ------- + list + A list of actor given the group id + """ + return self.actor_groups[group_id]
+ +
[docs] def tick(self): + """Performs one tick of the simulation, moving all actors, and getting the sensor data""" + observations = {} + + # Tick once the simulation + self.physics_client.stepSimulation() + + # Collect the raw observation from all the actors in each actor group + for group in self.actor_groups: + obs_from_each_actor = [ + actor.get_observation() for actor in self.actor_groups[group] + ] + + observations[group] = obs_from_each_actor + + return observations
+ +
[docs] def close_simulation(self): + """Close the simulation""" + p.disconnect(self.physics_client._client)
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/env.html b/docs/html/_modules/shasta/env.html new file mode 100644 index 0000000..ce27bdf --- /dev/null +++ b/docs/html/_modules/shasta/env.html @@ -0,0 +1,341 @@ + + + + + + + + shasta.env - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.env

+#!/usr/bin/env python
+
+# This work is licensed under the terms of the MIT license.
+# For a copy, see <https://opensource.org/licenses/MIT>.
+
+from __future__ import print_function
+
+import gym
+
+from .core import ShastaCore
+
+
+
[docs]class ShastaEnv(gym.Env): + """ + This is a shasta environment, responsible of handling all the SHASTA related steps of the training. + """ + + def __init__(self, config, actor_groups: dict = None): + """Initializes the environment""" + self.config = config + + # Check if experiment config is present + if not self.config["experiment"]: + raise Exception("The config should have experiment configuration") + + # Setup the core + self.core = ShastaCore(self.config, actor_groups=actor_groups) + self.core.setup_experiment(self.config["experiment"]) + + # Setup the experiment + try: + experiment_config = self.config["experiment"]["config"] + except KeyError: + experiment_config = None + self.experiment = self.config["experiment"]["type"]( + self.config["experiment"], self.core, experiment_config + ) + + if not self.experiment: + raise Exception( + "The experiment type cannot be empty. Please provide an experiment class" + ) + + self.action_space = self.experiment.get_action_space() + self.observation_space = self.experiment.get_observation_space() + + self.reset() + +
[docs] def reset(self): + """Reset the simulation + + Returns + ------- + [type] + [description] + """ + self.experiment.reset() + self.core.reset() + + # Tick once and get the observations + raw_data = self.core.tick() + observation, _ = self.experiment.get_observation(raw_data, self.core) + print('-' * 32) + + return observation
+ +
[docs] def step(self, action): + """Computes one tick of the environment in order to return the new observation, + as well as the rewards""" + + self.experiment.apply_actions(action, self.core) + raw_data = self.core.tick() + + observation, info = self.experiment.get_observation(raw_data, self.core) + done = self.experiment.get_done_status(observation, self.core) + reward = self.experiment.compute_reward(observation, self.core) + + return observation, reward, done, info
+ +
[docs] def close(self): + self.core.close_simulation()
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/map.html b/docs/html/_modules/shasta/map.html new file mode 100644 index 0000000..364923b --- /dev/null +++ b/docs/html/_modules/shasta/map.html @@ -0,0 +1,529 @@ + + + + + + + + shasta.map - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.map

+import warnings
+
+from pathlib import Path
+
+import numpy as np
+import osmnx as ox
+import pandas as pd
+import networkx as nx
+
+import os
+
+from shasta.preprocessing.utils import extract_building_info
+
+# Import assests
+
[docs]directories = list(filter(os.path.isdir, os.listdir(os.getcwd())))
+if 'assets' in directories: +
[docs] assets_root = os.path.join('.', 'assets')
+else: + raise FileNotFoundError("Assests folder is not found under root directory") + + +
[docs]class Map: + def __init__(self) -> None: + return None + +
[docs] def _affine_transformation_and_graph(self): + """Performs initial conversion of the lat lon to cartesian""" + # Graph + read_path = self.asset_path + '/map.osm' + G = ox.graph_from_xml(read_path, simplify=True, bidirectional='walk') + self.node_graph = nx.convert_node_labels_to_integers(G) + + # Transformation matrix + read_path = self.asset_path + '/coordinates.csv' + points = pd.read_csv(read_path) + target = points[['x', 'z']].values + source = points[['lat', 'lon']].values + + # Pad the points with ones + X = np.hstack((source, np.ones((source.shape[0], 1)))) + Y = np.hstack((target, np.ones((target.shape[0], 1)))) + self.A, res, rank, s = np.linalg.lstsq(X, Y, rcond=None) + + return None
+ +
[docs] def _setup_building_info(self): + read_path = self.asset_path + '/map.osm' + self.buildings = extract_building_info(read_path, save_fig=False)
+ +
[docs] def setup(self, experiment_config): + """Perform the initial experiment setup e.g., loading the map + + Parameters + ---------- + experiment_config : yaml + A yaml file providing the map configuration + + Returns + ------- + None + + Raises + ------ + FileNotFoundError + If the experiment config is none, raises a file not found error + """ + self.experiment_config = experiment_config + + # Read path for ths assets + try: + self.asset_path = '/'.join( + [assets_root, self.experiment_config['map_to_use']] + ) + except FileNotFoundError: + try: + self.asset_path = '/'.join( + [assets_root, self.experiment_config['map_to_use']] + ) + except FileNotFoundError: + raise FileNotFoundError( + f"Please verify the {self.experiment_config['map_to_use']} is available in asset folder" + ) + + # Initialize the assests + self._affine_transformation_and_graph() + self._setup_building_info() + return None
+ +
[docs] def get_affine_transformation_and_graph(self): + """Get the transformation matrix and the node graph of the map + + Returns + ------- + array, node graph + The transformation matrix and the node graph + """ + return self.A, self.node_graph
+ +
[docs] def get_node_graph(self): + """Get the node graph of the world + + Returns + ------- + networkx graph + A node graph of the world map + """ + return self.node_graph
+ +
[docs] def get_node_info(self, node_index): + """Get the information about a node. + + Parameters + ---------- + id : int + Node ID + + Returns + ------- + dict + A dictionary containing all the information about the node. + """ + + return self.node_graph.nodes[node_index]
+ +
[docs] def convert_to_lat_lon(self, point): + """Convert a given point to lat lon co-ordinates + + Parameters + ---------- + point : array + A numpy array in pybullet cartesian co-ordinates + + Returns + ------- + lat_lon : array + The lat lon co-ordinates + """ + point[2] = 1 + lat_lon = np.dot(point, np.linalg.inv(self.A)) + return lat_lon
+ +
[docs] def convert_to_cartesian(self, point): + """Convert a lat lon co-ordinates to cartesian coordinates + + Parameters + ---------- + point : array + A numpy array in lat lon co-ordinates co-ordinates + + Returns + ------- + lat_lon : array + The cartesian coordinates + """ + return np.dot([point[0], point[1], 1], self.A)
+ +
[docs] def get_building_info(self, building_index): + """Get the information about a building such as perimeter, + position, number of floors. + + Parameters + ---------- + id : int + Building ID + + Returns + ------- + dict + A dictionary containing all the information about the building. + """ + return self.buildings.loc[self.buildings['id'] == building_index]
+ +
[docs] def get_lat_lon_spawn_points(self, n_points=5): + """Get the latitude and longitude spawn points + + Parameters + ---------- + n_points : int, optional + Number of points to random latitude and longitude points, by default 5 + + Returns + ------- + array + An array of cartesian spawn points + """ + # TODO: Verify if the projection is correct and the warning is not + # affecting the values + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + gdf = ox.utils_geo.sample_points(self.node_graph, n_points) + points = np.vstack([gdf.centroid.y, gdf.centroid.x]).T + return points
+ +
[docs] def get_cartesian_node_position(self, node_index): + """Get the cartesian co-ordinates given the node index + + Parameters + ---------- + node_index : int + The node index in the map + + Returns + ------- + array + The cartesian co-ordinates + """ + node_info = self.get_node_info(node_index=node_index) + lat = node_info['y'] + lon = node_info['x'] + cartesian_pos = np.dot([lat, lon, 1], self.A) + return cartesian_pos
+ +
[docs] def get_lat_lon_node_position(self, node_index): + """Get the lat and lon given the node index + + Parameters + ---------- + node_index : int + The node index in the map + + Returns + ------- + array + The cartesian co-ordinates + """ + node_info = self.get_node_info(node_index=node_index) + lat = node_info['y'] + lon = node_info['x'] + return [lat, lon]
+ +
[docs] def get_cartesian_spawn_points(self, n_points=5): + """Get the cartesian spawn points + + Parameters + ---------- + n_points : int, optional + Number of points to random cartesian co-ordinates, by default 5 + + Returns + ------- + array + An array of cartesian spawn points + """ + lat_lon_points = self.get_lat_lon_spawn_points(n_points) + + cartesian_spawn_points = [] + for point in lat_lon_points: + cartesian_spawn_points.append(np.dot([point[0], point[1], 1], self.A)) + return cartesian_spawn_points[0]
+ +
[docs] def get_all_buildings(self): + """Get all the buildings + + Returns + ------- + dataframe + A dataframe with all the building information + """ + return self.buildings
+ +
[docs] def get_transformation_matrix(self): + """Get the transformation matrix to convert lat lon to cartesian + + Returns + ------- + array + The transformation matrix + """ + return self.A
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/preprocessing/bake_texture.html b/docs/html/_modules/shasta/preprocessing/bake_texture.html new file mode 100644 index 0000000..6911675 --- /dev/null +++ b/docs/html/_modules/shasta/preprocessing/bake_texture.html @@ -0,0 +1,344 @@ + + + + + + + + shasta.preprocessing.bake_texture - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.preprocessing.bake_texture

+import bpy
+
+
[docs]ops = bpy.ops
+scene = bpy.context.scene +
[docs]mesh = bpy.ops.mesh
+ +# Delete default scene objects +ops.object.select_all() +ops.object.select_all() +ops.object.delete() + +bpy.context.scene.render.engine = 'BLENDER_RENDER' + +# Import the model from our Three scene +ops.import_scene.obj(filepath="map.obj") + +# Join the obj file +
[docs]scene = bpy.context.scene
+
[docs]obs = []
+for ob in scene.objects: + # whatever objects you want to join... + if ob.type == 'MESH': + obs.append(ob) +
[docs]ctx = bpy.context.copy()
+# one of the objects to join +ctx['active_object'] = obs[0] +ctx['selected_objects'] = obs +bpy.ops.object.join(ctx) + +# Smake UV project +for obj in bpy.context.selected_objects: + if obj.type == 'MESH': + bpy.context.scene.objects.active = obj + bpy.ops.object.editmode_toggle() + bpy.ops.mesh.select_all(action='SELECT') + bpy.ops.uv.smart_project(stretch_to_bounds=0) + bpy.ops.object.editmode_toggle() + +# Set it to active and go into edit mode +ops.object.mode_set(mode='EDIT') + +# Mesh cleanup step, since what's coming out of Three is mostly cubes laying side by side. +# Unwrap the mesh +bpy.ops.mesh.uv_texture_add() +mesh.select_all() +ops.uv.lightmap_pack(PREF_IMG_PX_SIZE=4096) + +# Create a new image to bake the lighting in to +bpy.ops.image.new(name="AO Map", width=4096, height=4096, alpha=0) +
[docs]image = bpy.data.images['AO Map']
+ +# Bake the lightmap +bpy.ops.mesh.select_all(action='SELECT') +for area in bpy.data.screens['UV Editing'].areas: + if area.type == 'IMAGE_EDITOR': + area.spaces.active.image = image +bpy.context.scene.render.bake_type = 'TEXTURE' +bpy.ops.object.bake_image() + +# Save the baked image +image.filepath_raw = "map.png" +image.file_format = "PNG" +image.save() + +ops.object.mode_set(mode='OBJECT') +# Delete all the texture and apply from image +for ob in bpy.data.objects: + if ob.type != 'MESH' or len(ob.material_slots) == 0: + continue + ob.select = True + bpy.context.scene.objects.active = ob +
[docs] matslots = len(ob.material_slots)
+ for i in range(0, matslots): + bpy.context.object.active_material_index = i + bpy.ops.object.material_slot_remove() + +# Add new material +
[docs]mat = bpy.data.materials['Material']
+
[docs]tex = bpy.data.textures.new("SomeName", 'IMAGE')
+
[docs]slot = mat.texture_slots.add()
+slot.texture = tex + +# Save the obj file +bpy.ops.export_scene.obj(filepath='map.obj') +
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/preprocessing/preprocess.html b/docs/html/_modules/shasta/preprocessing/preprocess.html new file mode 100644 index 0000000..8263e4a --- /dev/null +++ b/docs/html/_modules/shasta/preprocessing/preprocess.html @@ -0,0 +1,335 @@ + + + + + + + + shasta.preprocessing.preprocess - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.preprocessing.preprocess

+import os
+from pathlib import Path
+import shutil
+
+
+import networkx as nx
+import osmnx as ox
+
+
+
[docs]class PreProcess: + def __init__(self, osm_map_path=None, blender_path=None) -> None: + self.osm_map_path = osm_map_path + self.blender_path = blender_path + +
[docs] def _save_building_info(self): + raise NotImplementedError
+ +
[docs] def _save_graph_info(self): + raise NotImplementedError
+ +
[docs] def run_processing(): + + # Create the 3D world from the map.osm file + os.system( + "java -jar OSM2World.jar --config texture_config.properties -i map.osm -o map.obj" # noqa + ) + + # Save OSMNX graph + G = ox.graph_from_xml('map.osm', simplify=True, bidirectional='walk') + G = nx.convert_node_labels_to_integers(G) + + # Use the blender to bake the texture + blender_path = "/Applications/blender.app/Contents/MacOS/blender" + os.system(blender_path + " --background --python bake_texture.py") + + # Tidy up things and move the files to respective folders + print('-' * 32) + print('Preprocessing completed successfully') + print('-' * 32) + + name = input("Please provide a name for the new asset: ") + + # Create a directory + parent_folder = name + meshes_folder = name + '/meshes' + Path(parent_folder).mkdir(parents=True, exist_ok=True) + Path(meshes_folder).mkdir(parents=True, exist_ok=True) + + # Move map.osm and coordinates inside the parent folder + def move_files(file_name, directory): + try: + shutil.copy(file_name, directory + '/' + file_name) + except FileNotFoundError: + pass + + files = [ + 'map.osm', + 'coordinates.csv', + 'environment.urdf', + 'environment_collision_free.urdf', + ] + for file in files: + move_files(file, parent_folder) + + files = ['map.obj', 'map.png', 'map.mtl'] + for file in files: + move_files(file, meshes_folder) + + # Finaly move the whole folder to data folder + shutil.move(name, '../data/assets/')
+ + +if __name__ == "__main__": +
[docs] preprocess = PreProcess()
+ preprocess.run_processing() +
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/preprocessing/utils.html b/docs/html/_modules/shasta/preprocessing/utils.html new file mode 100644 index 0000000..80306e9 --- /dev/null +++ b/docs/html/_modules/shasta/preprocessing/utils.html @@ -0,0 +1,314 @@ + + + + + + + + shasta.preprocessing.utils - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.preprocessing.utils

+from pathlib import Path
+
+import numpy as np
+import pandas as pd
+
+
+import networkx as nx
+import osmnx as ox
+
+
+
[docs]def extract_building_info(osm_path, save_fig=False): + """Perfrom initial building setup.""" + read_path = osm_path + G = ox.graph_from_xml(read_path, retain_all=True) + + # TODO: This method doesn't work if the building info is not there in OSM + nodes, streets = ox.graph_to_gdfs(G) + + west, north, east, south = nodes.geometry.total_bounds + polygon = ox.utils_geo.bbox_to_poly(north, south, east, west) + gdf = ox.geometries.geometries_from_polygon(polygon, tags={'building': True}) + buildings_proj = ox.project_gdf(gdf, to_crs="EPSG:4326").to_crs(4328) + + # Building Info + building_info = buildings_proj.copy() + + # Add more information + # Save the dataframe representing buildings + building_info['lon'] = buildings_proj['geometry'].centroid.x + building_info['lat'] = buildings_proj['geometry'].centroid.y + building_info['area'] = buildings_proj.area + building_info['perimeter'] = buildings_proj.length + try: + building_info.loc[:, 'height'] = buildings_proj['height'] + except KeyError: + building_info.loc[:, 'height'] = 10 # assumption + building_info['id'] = np.arange(len(buildings_proj)) + + if save_fig: + save_path = Path(osm_path) + ox.plot_graph(G) + ox.plot.plot_footprints( + buildings_proj, save=True, filepath=save_path.with_suffix('.jpg') + ) + + return building_info
+ + +
[docs]def save_buildings_map(osm_path): + raise NotImplementedError
+ + +
[docs]def extract_path_info(osm_path): + raise NotImplementedError
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/primitives/formation.html b/docs/html/_modules/shasta/primitives/formation.html new file mode 100644 index 0000000..65d21ec --- /dev/null +++ b/docs/html/_modules/shasta/primitives/formation.html @@ -0,0 +1,396 @@ + + + + + + + + shasta.primitives.formation - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.primitives.formation

+import numpy as np
+import networkx as nx
+import osmnx as ox
+
+
+
[docs]class Formation(object): + """Formation control primitive using region based shape control. + Coded by: Apurvakumar Jani, Date: 18/9/2019 + """ + + def __init__(self, config=None): + # Initialise the parameters + self.a = 5 + self.b = 5 + self.knn = 6 + self.alpha = 0.5 + self.gamma = 0.5 + self.min_dis = 2 + self.dt = 1.0 + return None + +
[docs] def calculate_vel( + self, vehicle, dt, all_drones_pos, centroid_pos, path_vel, vmax, formation_type + ): + """Calculate the vehicle velocity depending on the position of the peer vehicles + + Parameters + ---------- + vehicle : class instance + A class instance of UxV agent + dt : float + Time step duration (in seconds) to use in next position calculation + all_drones_pos : aarray + An array with position of all the vehicles in the group/platoon + centroid_pos : array + An array specifying the centroid of the platoon + path_vel : float + Path velocity calculated from next position and current position + vmax : float + Maximum velocity of the vehicle + formation_type : str + Whether the formation is solid or ring + + Returns + ------- + vehicle : class instance + A vehicle class instance with updated position + """ + + # Get the neighboor position + curr_pos = np.asarray(vehicle.current_pos[0:2]) + peers_pos = all_drones_pos + + # Calculate the velocity of each neighboor particle + k = 1 / self.knn # constant + g_lij = (self.min_dis**2) - np.linalg.norm( + curr_pos - peers_pos, axis=1, ord=2 + ) + del_g_ij = 2 * (peers_pos - curr_pos) + P_ij = k * np.dot(np.maximum(0, g_lij / (self.min_dis**2)) ** 2, del_g_ij) + f_g_ij = ( + np.linalg.norm( + (curr_pos - centroid_pos[0:2]) / np.array([self.a, self.b]), ord=2 + ) + - 1 + ) + + # Calculate path velocity + kl = 1 # constant + del_f_g_ij = 1 * (curr_pos - centroid_pos[0:2]) + del_zeta_ij = (kl * max(0, f_g_ij)) * del_f_g_ij + vel = path_vel - (self.alpha * del_zeta_ij) - (self.gamma * P_ij) + + # Calculate the speed + speed = np.linalg.norm(vel) + + # Normalize the velocity with respect to speed + if speed > vmax: + vel = (vel / speed) * vmax + + # New position + vehicle.desired_pos[0:2] = vehicle.current_pos[0:2] + (vel) * dt + + return vehicle, speed
+ +
[docs] def execute(self, vehicles, next_pos, centroid_pos, formation_type): + """Get the position of the formation control + + Parameters + ---------- + vehicles : list + A list containing UAV or UGV class + centroid_pos : array + An array containing the x, y, and z position + dt : float + Time step to be used for distance calculation + """ + vmax = vehicles[0].speed + all_drones_pos = np.asarray([vehicle.current_pos[0:2] for vehicle in vehicles]) + + # Path velocity + path = np.array([next_pos[0], next_pos[1]]) - centroid_pos[0:2] + path_vel = (1 / self.dt) * path + if np.linalg.norm(path_vel) > vmax: + path_vel = (path_vel / np.linalg.norm(path_vel)) * vmax + + # Loop over each drone to calculate the velocity + # NOTE: Very complicated way to implementing list comprehension + # TODO: Need to find an efficient way to implement formation control + vehicles, speed = map( + list, + zip( + *[ + self.calculate_vel( + vehicle, + self.dt, + all_drones_pos, + centroid_pos, + path_vel, + vmax, + formation_type, + ) + for vehicle in vehicles + ] + ), + ) + if np.max(speed) < 0.015 * len(all_drones_pos): + formation_done = True + else: + formation_done = False + + # Apply the control + for vehicle in vehicles: + vehicle.apply_action(vehicle.desired_pos) + + return vehicles, formation_done
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/primitives/path_planning.html b/docs/html/_modules/shasta/primitives/path_planning.html new file mode 100644 index 0000000..3ea22f5 --- /dev/null +++ b/docs/html/_modules/shasta/primitives/path_planning.html @@ -0,0 +1,378 @@ + + + + + + + + shasta.primitives.path_planning - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.primitives.path_planning

+import numpy as np
+import networkx as nx
+import osmnx as ox
+
+
+
[docs]class PathPlanning(object): + """Path planner based on the skeleton of the image. + Generates a spline path + """ + + def __init__(self, env_map): + self.map = env_map + self.A, self.G = self.map.get_affine_transformation_and_graph() + return None + +
[docs] def linear_refine_implicit(self, x, n): + """Given a 2D ndarray (npt, m) of npt coordinates in m dimension, + insert 2**(n-1) additional points on each trajectory segment + Returns an (npt*2**(n-1), m) ndarray + + Parameters + ---------- + x : array + A 2D input array + n : int + Number of intermediate points to insert between two consecutive points in x + + Returns + ------- + array + An array with interploated points + + Raises + ------ + NotImplementedError + The functions is not implemented for 3D or higher dimensions + ValueError + Number of intermediate points should be greated than zero + """ + if n > 1: + m = 0.5 * (x[:-1] + x[1:]) + if x.ndim == 2: + msize = (x.shape[0] + m.shape[0], x.shape[1]) + else: + raise NotImplementedError + + x_new = np.empty(msize, dtype=x.dtype) + x_new[0::2] = x + x_new[1::2] = m + return self.linear_refine_implicit(x_new, n - 1) + elif n == 1: + return x + else: + raise ValueError
+ +
[docs] def find_path(self, start, end, n_splits=1): + """Finds a path between start and end using path graph + + Parameters + ---------- + start : array + A cartesian co-ordinate specifying the start position + end : array + A node ID specifying the end position + n_splits : int, optional + Number of splits in refining the path points, by default 1 + + Returns + ------- + path_points : array + A refined path points in pybullet cartesian co-ordinate system + """ + x = [] + y = [] + + # Convert the node index to node ID + # TODO: Very dirty way to implement + # TODO: Verify the implementation of nearest nodes + if not isinstance(start, (int, np.int64)): + start_lat_lon = self.map.convert_to_lat_lon(start) + start = ox.distance.nearest_nodes( + self.G, X=start_lat_lon[1], Y=start_lat_lon[0] + ) + if not isinstance(end, (int, np.int64)): + end_lat_lon = self.map.convert_to_lat_lon(end) + end = ox.distance.nearest_nodes(self.G, X=end_lat_lon[1], Y=end_lat_lon[0]) + + route = nx.shortest_path(self.G, start, end, weight='length') + for u, v in zip(route[:-1], route[1:]): + # if there are parallel edges, select the shortest in length + data = min(self.G.get_edge_data(u, v).values(), key=lambda d: d["length"]) + if "geometry" in data: + # if geometry attribute exists, add all its coords to list + xs, ys = data["geometry"].xy + x.extend(xs) + y.extend(ys) + else: + # otherwise, the edge is a straight line from node to node + x.extend((self.G.nodes[u]["x"], self.G.nodes[v]["x"])) + y.extend((self.G.nodes[u]["y"], self.G.nodes[v]["y"])) + + # Add more path points for smooth travel + lat_lon = np.array((x, y)).T + refined_points = self.linear_refine_implicit(lat_lon, n=n_splits) + refined_points = np.hstack( + (refined_points, np.ones((refined_points.shape[0], 1))) + ) + + # Exchange x and y as they are reversed in pybullet + refined_points[:, [1, 0]] = refined_points[:, [0, 1]] + + # Convert the lat lon to pybullet co-ordinates + path_points = np.dot(refined_points, self.A) + + return path_points
+ +
[docs] def execute(self): + raise NotImplementedError
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/utils.html b/docs/html/_modules/shasta/utils.html new file mode 100644 index 0000000..a80365c --- /dev/null +++ b/docs/html/_modules/shasta/utils.html @@ -0,0 +1,286 @@ + + + + + + + + shasta.utils - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.utils

+import numpy as np
+
+
+
[docs]def get_initial_positions(cartesian_pos, r, n): + """Initial position for actor in the form of a ring + + Parameters + ---------- + cartesian_pos : array + Initial cartesian pos + r : float + Radius of formation + n : int + Number of points in the circle + + Returns + ------- + array + An array of points in the form of a ring + """ + positions = [] + t = np.linspace(0, 2 * np.pi, n) + x = cartesian_pos[0] + r * np.cos(t) + y = cartesian_pos[1] + r * np.sin(t) + positions = np.asarray([x, y, x * 0 + 1]).T.tolist() + return positions
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/visualize.html b/docs/html/_modules/shasta/visualize.html new file mode 100644 index 0000000..102a3d8 --- /dev/null +++ b/docs/html/_modules/shasta/visualize.html @@ -0,0 +1,283 @@ + + + + + + + + shasta.visualize - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.visualize

+import matplotlib.pyplot as plt
+import networkx as nx
+import osmnx as ox
+
+
+
[docs]def plot_nodes(config): + """Visualize the node graph + + Parameters + ---------- + config : yaml + a yaml file providing the configuration + """ + read_path = '/'.join( + [config['urdf_data_path'], config['simulation']['map_to_use'], 'map.osm'] + ) + G = ox.graph_from_xml(read_path, simplify=True, bidirectional='walk') + G = nx.convert_node_labels_to_integers(G) + fig, ax = ox.plot_graph(G, show=False) + for i, node in enumerate(G.nodes): + ax.annotate(str(i), (G.nodes[i]['x'], G.nodes[i]['y']), c='w') + plt.tight_layout() + plt.show()
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_modules/shasta/world.html b/docs/html/_modules/shasta/world.html new file mode 100644 index 0000000..926c855 --- /dev/null +++ b/docs/html/_modules/shasta/world.html @@ -0,0 +1,352 @@ + + + + + + + + shasta.world - SHaSTA 0.1.0 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+

Source code for shasta.world

+import numpy as np
+
+
+
[docs]class World: + def __init__(self, config): + super(World, self).__init__() + # Need to specify some parameters + self.config = config + self.actor_ids = [] + + # Setup the phsysics client + self.physics_client = None + + return None + +
[docs] def load_world_model(self, read_path): + """Load the URDF model + + Parameters + ---------- + read_path : str + The path to the URDF model + """ + + if self.physics_client is not None: + self.physics_client.loadURDF( + read_path, + [0, 0, 0], + self.physics_client.getQuaternionFromEuler([np.pi / 2, 0, 0]), + flags=self.physics_client.URDF_USE_MATERIAL_COLORS_FROM_MTL, + useFixedBase=True, + )
+ +
[docs] def change_camera_position( + self, + camera_distance=150.0, + camera_yaw=0.0, + camera_pitch=-89.999, + camera_target_position=[0, 30, 0], + ): + """Change the world camera position + + Parameters + ---------- + camera_distance : float, optional + Camera distance from target, by default 150 + camera_yaw : float, optional + Camera yaw, by default 0 + camera_pitch : float, optional + Camera pitch, by default -89.999 + camera_target_position : list, optional + Camera target position, by default [0, 30, 0] + + Returns + ------- + None + """ + self.camer_distance = camera_distance + self.camera_yaw = camera_yaw + self.camera_pitch = camera_pitch + self.camera_target_position = camera_target_position + + self.physics_client.resetDebugVisualizerCamera( + cameraDistance=camera_distance, + cameraYaw=camera_yaw, + cameraPitch=camera_pitch, + cameraTargetPosition=camera_target_position, + ) + return None
+ +
[docs] def spawn_actor(self, actor, spawn_point): + """Spawn the actor at a given point + + Parameters + ---------- + actor : object + An actor to spawm + spawn_point : array + Spawn point + + Returns + ------- + None + """ + # Check if the physic client is added to the actor + if actor.physics_client is None: + actor.physics_client = self.physics_client + + # Load the actor + actor._load() + self.actor_ids.append(actor.get_actor_id()) + return None
+
+
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/html/_sources/autoapi/index.rst.txt b/docs/html/_sources/autoapi/index.rst.txt index 3d8f43f..9e28b8c 100644 --- a/docs/html/_sources/autoapi/index.rst.txt +++ b/docs/html/_sources/autoapi/index.rst.txt @@ -6,11 +6,6 @@ This page contains auto-generated API reference documentation [#f1]_. .. toctree:: :titlesonly: - /autoapi/utils/index - /autoapi/main/index - /autoapi/__initi__/index - /autoapi/default_actions/index - /autoapi/gui/index - /autoapi/envs/index + /autoapi/shasta/index .. [#f1] Created with `sphinx-autoapi `_ \ No newline at end of file diff --git a/docs/html/_sources/autoapi/shasta/actor/index.rst.txt b/docs/html/_sources/autoapi/shasta/actor/index.rst.txt new file mode 100644 index 0000000..e81478a --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/actor/index.rst.txt @@ -0,0 +1,87 @@ +:py:mod:`shasta.actor` +====================== + +.. py:module:: shasta.actor + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + shasta.actor.BaseActor + + + + +.. py:class:: BaseActor + + + Bases: :py:obj:`with_metaclass`\ (\ :py:obj:`ABCMeta`\ , :py:obj:`object`\ ) + + This the base class for single UGV robot + + .. py:attribute:: physics_client + + + + .. py:attribute:: _loaded + :value: False + + + + .. py:method:: _load() + + Load object into pybullet and return list of loaded body ids. + + + .. py:method:: get_actor_id() + + Get the actor id + + :returns: The actor id in the simulation + :rtype: int + + + .. py:method:: load_asset(*args, **kwargs) + :abstractmethod: + + Load the assests of the actor. + + + .. py:method:: reset(*args, **kwargs) + :abstractmethod: + + Reset the actor + + :raises NotImplementedError: + + + .. py:method:: get_observation(*args, **kwargs) + :abstractmethod: + + Get the observation from the actor. + + :raises NotImplementedError: + + + .. py:method:: apply_action(*args, **kwargs) + :abstractmethod: + + Apply the action to the actor + + :raises NotImplementedError: + + + .. py:method:: destroy(*args, **kwargs) + :abstractmethod: + + Destroy the actor + + :raises NotImplementedError: + + + diff --git a/docs/html/_sources/autoapi/shasta/base_experiment/index.rst.txt b/docs/html/_sources/autoapi/shasta/base_experiment/index.rst.txt new file mode 100644 index 0000000..6c5fbe3 --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/base_experiment/index.rst.txt @@ -0,0 +1,78 @@ +:py:mod:`shasta.base_experiment` +================================ + +.. py:module:: shasta.base_experiment + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + shasta.base_experiment.BaseExperiment + + + + +.. py:class:: BaseExperiment(config, core, experiment_config=None, *args, **kargs) + + + Bases: :py:obj:`with_metaclass`\ (\ :py:obj:`ABCMeta`\ , :py:obj:`object`\ ) + + .. py:method:: reset() + + Called at the beginning and each time the simulation is reset + + + .. py:method:: get_action_space() + :abstractmethod: + + Returns the action space + + + .. py:method:: get_observation_space() + :abstractmethod: + + Returns the observation space + + + .. py:method:: get_actions() + :abstractmethod: + + Returns the actions + + + .. py:method:: apply_actions(actions, core) + :abstractmethod: + + Given the action, applies the action to group or individual actor + + :param action: value outputted by the policy + + + .. py:method:: get_observation(observation, core) + :abstractmethod: + + Function to do all the post processing of observations (sensor data). + + :param sensor_data: dictionary {sensor_name: sensor_data} + + Should return a tuple or list with two items, the processed observations, + as well as a variable with additional information about such observation. + The information variable can be empty + + + .. py:method:: get_done_status(observation, core) + + Returns whether or not the experiment has to end + + + .. py:method:: compute_reward(observation, core) + + Computes the reward + + + diff --git a/docs/html/_sources/autoapi/shasta/core/index.rst.txt b/docs/html/_sources/autoapi/shasta/core/index.rst.txt new file mode 100644 index 0000000..de9564c --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/core/index.rst.txt @@ -0,0 +1,121 @@ +:py:mod:`shasta.core` +===================== + +.. py:module:: shasta.core + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + shasta.core.ShastaCore + + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + shasta.core.kill_all_servers + + + +.. py:function:: kill_all_servers() + + Kill all PIDs that start with Carla + + +.. py:class:: ShastaCore(config, actor_groups: dict = None) + + + Class responsible of handling all the different CARLA functionalities, + such as server-client connecting, actor spawning, + and getting the sensors data. + + .. py:method:: _setup_physics_client() + + Setup the physics client + + :rtype: None + + + .. py:method:: get_physics_client() + + Ge the physics client + + :returns: The bullet physics client + :rtype: object + + + .. py:method:: init_server() + + Start a server on a random port + + + .. py:method:: setup_experiment(experiment_config) + + Initialize the hero and sensors + + + .. py:method:: get_world() + + Get the World object from the simulation + + :returns: The world object + :rtype: object + + + .. py:method:: get_map() + + Get the Map object from the simulation + + :returns: The map object + :rtype: object + + + .. py:method:: reset() + + This function resets / spawns the hero vehicle and its sensors + + + .. py:method:: spawn_actors() + + Spawns vehicles and walkers, also setting up the Traffic Manager and its parameters + + + .. py:method:: get_actor_groups() + + Get the actor groups + + :returns: The actor groups as a dict with group id as the key + list of actors as the value + :rtype: dict + + + .. py:method:: get_actors_by_group_id(group_id) + + Get a list of actor given by group id + + :param group_id: Group id to be returned + :type group_id: int + + :returns: A list of actor given the group id + :rtype: list + + + .. py:method:: tick() + + Performs one tick of the simulation, moving all actors, and getting the sensor data + + + .. py:method:: close_simulation() + + Close the simulation + + + diff --git a/docs/html/_sources/autoapi/shasta/index.rst.txt b/docs/html/_sources/autoapi/shasta/index.rst.txt new file mode 100644 index 0000000..6d8bcfe --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/index.rst.txt @@ -0,0 +1,32 @@ +:py:mod:`shasta` +================ + +.. py:module:: shasta + + +Subpackages +----------- +.. toctree:: + :titlesonly: + :maxdepth: 3 + + preprocessing/index.rst + primitives/index.rst + + +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + + actor/index.rst + base_experiment/index.rst + core/index.rst + env/index.rst + map/index.rst + utils/index.rst + visualize/index.rst + world/index.rst + + diff --git a/docs/html/_sources/autoapi/shasta/map/index.rst.txt b/docs/html/_sources/autoapi/shasta/map/index.rst.txt new file mode 100644 index 0000000..e604615 --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/map/index.rst.txt @@ -0,0 +1,181 @@ +:py:mod:`shasta.map` +==================== + +.. py:module:: shasta.map + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + shasta.map.Map + + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + shasta.map.directories + shasta.map.assets_root + + +.. py:data:: directories + + + +.. py:data:: assets_root + + + +.. py:class:: Map + + + .. py:method:: _affine_transformation_and_graph() + + Performs initial conversion of the lat lon to cartesian + + + .. py:method:: _setup_building_info() + + + .. py:method:: setup(experiment_config) + + Perform the initial experiment setup e.g., loading the map + + :param experiment_config: A yaml file providing the map configuration + :type experiment_config: yaml + + :rtype: None + + :raises FileNotFoundError: If the experiment config is none, raises a file not found error + + + .. py:method:: get_affine_transformation_and_graph() + + Get the transformation matrix and the node graph of the map + + :returns: The transformation matrix and the node graph + :rtype: array, node graph + + + .. py:method:: get_node_graph() + + Get the node graph of the world + + :returns: A node graph of the world map + :rtype: networkx graph + + + .. py:method:: get_node_info(node_index) + + Get the information about a node. + + :param id: Node ID + :type id: int + + :returns: A dictionary containing all the information about the node. + :rtype: dict + + + .. py:method:: convert_to_lat_lon(point) + + Convert a given point to lat lon co-ordinates + + :param point: A numpy array in pybullet cartesian co-ordinates + :type point: array + + :returns: **lat_lon** -- The lat lon co-ordinates + :rtype: array + + + .. py:method:: convert_to_cartesian(point) + + Convert a lat lon co-ordinates to cartesian coordinates + + :param point: A numpy array in lat lon co-ordinates co-ordinates + :type point: array + + :returns: **lat_lon** -- The cartesian coordinates + :rtype: array + + + .. py:method:: get_building_info(building_index) + + Get the information about a building such as perimeter, + position, number of floors. + + :param id: Building ID + :type id: int + + :returns: A dictionary containing all the information about the building. + :rtype: dict + + + .. py:method:: get_lat_lon_spawn_points(n_points=5) + + Get the latitude and longitude spawn points + + :param n_points: Number of points to random latitude and longitude points, by default 5 + :type n_points: int, optional + + :returns: An array of cartesian spawn points + :rtype: array + + + .. py:method:: get_cartesian_node_position(node_index) + + Get the cartesian co-ordinates given the node index + + :param node_index: The node index in the map + :type node_index: int + + :returns: The cartesian co-ordinates + :rtype: array + + + .. py:method:: get_lat_lon_node_position(node_index) + + Get the lat and lon given the node index + + :param node_index: The node index in the map + :type node_index: int + + :returns: The cartesian co-ordinates + :rtype: array + + + .. py:method:: get_cartesian_spawn_points(n_points=5) + + Get the cartesian spawn points + + :param n_points: Number of points to random cartesian co-ordinates, by default 5 + :type n_points: int, optional + + :returns: An array of cartesian spawn points + :rtype: array + + + .. py:method:: get_all_buildings() + + Get all the buildings + + :returns: A dataframe with all the building information + :rtype: dataframe + + + .. py:method:: get_transformation_matrix() + + Get the transformation matrix to convert lat lon to cartesian + + :returns: The transformation matrix + :rtype: array + + + diff --git a/docs/html/_sources/autoapi/shasta/preprocessing/bake_texture/index.rst.txt b/docs/html/_sources/autoapi/shasta/preprocessing/bake_texture/index.rst.txt new file mode 100644 index 0000000..9c9e2cc --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/preprocessing/bake_texture/index.rst.txt @@ -0,0 +1,54 @@ +:py:mod:`shasta.preprocessing.bake_texture` +=========================================== + +.. py:module:: shasta.preprocessing.bake_texture + + +Module Contents +--------------- + +.. py:data:: ops + + + +.. py:data:: scene + + + +.. py:data:: mesh + + + +.. py:data:: scene + + + +.. py:data:: obs + :value: [] + + + +.. py:data:: ctx + + + +.. py:data:: image + + + +.. py:data:: matslots + + + +.. py:data:: mat + + + +.. py:data:: tex + + + +.. py:data:: slot + + + diff --git a/docs/html/_sources/autoapi/shasta/preprocessing/index.rst.txt b/docs/html/_sources/autoapi/shasta/preprocessing/index.rst.txt new file mode 100644 index 0000000..280647b --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/preprocessing/index.rst.txt @@ -0,0 +1,17 @@ +:py:mod:`shasta.preprocessing` +============================== + +.. py:module:: shasta.preprocessing + + +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + + bake_texture/index.rst + preprocess/index.rst + utils/index.rst + + diff --git a/docs/html/_sources/autoapi/shasta/preprocessing/preprocess/index.rst.txt b/docs/html/_sources/autoapi/shasta/preprocessing/preprocess/index.rst.txt new file mode 100644 index 0000000..b0535eb --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/preprocessing/preprocess/index.rst.txt @@ -0,0 +1,46 @@ +:py:mod:`shasta.preprocessing.preprocess` +========================================= + +.. py:module:: shasta.preprocessing.preprocess + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + shasta.preprocessing.preprocess.PreProcess + + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + shasta.preprocessing.preprocess.preprocess + + +.. py:class:: PreProcess(osm_map_path=None, blender_path=None) + + + .. py:method:: _save_building_info() + :abstractmethod: + + + .. py:method:: _save_graph_info() + :abstractmethod: + + + .. py:method:: run_processing() + + + +.. py:data:: preprocess + + + diff --git a/docs/html/_sources/autoapi/shasta/preprocessing/utils/index.rst.txt b/docs/html/_sources/autoapi/shasta/preprocessing/utils/index.rst.txt new file mode 100644 index 0000000..bb0fa69 --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/preprocessing/utils/index.rst.txt @@ -0,0 +1,32 @@ +:py:mod:`shasta.preprocessing.utils` +==================================== + +.. py:module:: shasta.preprocessing.utils + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + shasta.preprocessing.utils.extract_building_info + shasta.preprocessing.utils.save_buildings_map + shasta.preprocessing.utils.extract_path_info + + + +.. py:function:: extract_building_info(osm_path, save_fig=False) + + Perfrom initial building setup. + + +.. py:function:: save_buildings_map(osm_path) + + +.. py:function:: extract_path_info(osm_path) + + diff --git a/docs/html/_sources/autoapi/shasta/primitives/formation/index.rst.txt b/docs/html/_sources/autoapi/shasta/primitives/formation/index.rst.txt new file mode 100644 index 0000000..85b69ce --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/primitives/formation/index.rst.txt @@ -0,0 +1,63 @@ +:py:mod:`shasta.primitives.formation` +===================================== + +.. py:module:: shasta.primitives.formation + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + shasta.primitives.formation.Formation + + + + +.. py:class:: Formation(config=None) + + + Bases: :py:obj:`object` + + Formation control primitive using region based shape control. + Coded by: Apurvakumar Jani, Date: 18/9/2019 + + .. py:method:: calculate_vel(vehicle, dt, all_drones_pos, centroid_pos, path_vel, vmax, formation_type) + + Calculate the vehicle velocity depending on the position of the peer vehicles + + :param vehicle: A class instance of UxV agent + :type vehicle: class instance + :param dt: Time step duration (in seconds) to use in next position calculation + :type dt: float + :param all_drones_pos: An array with position of all the vehicles in the group/platoon + :type all_drones_pos: aarray + :param centroid_pos: An array specifying the centroid of the platoon + :type centroid_pos: array + :param path_vel: Path velocity calculated from next position and current position + :type path_vel: float + :param vmax: Maximum velocity of the vehicle + :type vmax: float + :param formation_type: Whether the formation is solid or ring + :type formation_type: str + + :returns: **vehicle** -- A vehicle class instance with updated position + :rtype: class instance + + + .. py:method:: execute(vehicles, next_pos, centroid_pos, formation_type) + + Get the position of the formation control + + :param vehicles: A list containing UAV or UGV class + :type vehicles: list + :param centroid_pos: An array containing the x, y, and z position + :type centroid_pos: array + :param dt: Time step to be used for distance calculation + :type dt: float + + + diff --git a/docs/html/_sources/autoapi/shasta/primitives/index.rst.txt b/docs/html/_sources/autoapi/shasta/primitives/index.rst.txt new file mode 100644 index 0000000..30f4839 --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/primitives/index.rst.txt @@ -0,0 +1,120 @@ +:py:mod:`shasta.primitives` +=========================== + +.. py:module:: shasta.primitives + + +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + + formation/index.rst + path_planning/index.rst + + +Package Contents +---------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + shasta.primitives.Formation + shasta.primitives.PathPlanning + + + + +.. py:class:: Formation(config=None) + + + Bases: :py:obj:`object` + + Formation control primitive using region based shape control. + Coded by: Apurvakumar Jani, Date: 18/9/2019 + + .. py:method:: calculate_vel(vehicle, dt, all_drones_pos, centroid_pos, path_vel, vmax, formation_type) + + Calculate the vehicle velocity depending on the position of the peer vehicles + + :param vehicle: A class instance of UxV agent + :type vehicle: class instance + :param dt: Time step duration (in seconds) to use in next position calculation + :type dt: float + :param all_drones_pos: An array with position of all the vehicles in the group/platoon + :type all_drones_pos: aarray + :param centroid_pos: An array specifying the centroid of the platoon + :type centroid_pos: array + :param path_vel: Path velocity calculated from next position and current position + :type path_vel: float + :param vmax: Maximum velocity of the vehicle + :type vmax: float + :param formation_type: Whether the formation is solid or ring + :type formation_type: str + + :returns: **vehicle** -- A vehicle class instance with updated position + :rtype: class instance + + + .. py:method:: execute(vehicles, next_pos, centroid_pos, formation_type) + + Get the position of the formation control + + :param vehicles: A list containing UAV or UGV class + :type vehicles: list + :param centroid_pos: An array containing the x, y, and z position + :type centroid_pos: array + :param dt: Time step to be used for distance calculation + :type dt: float + + + +.. py:class:: PathPlanning(env_map) + + + Bases: :py:obj:`object` + + Path planner based on the skeleton of the image. + Generates a spline path + + .. py:method:: linear_refine_implicit(x, n) + + Given a 2D ndarray (npt, m) of npt coordinates in m dimension, + insert 2**(n-1) additional points on each trajectory segment + Returns an (npt*2**(n-1), m) ndarray + + :param x: A 2D input array + :type x: array + :param n: Number of intermediate points to insert between two consecutive points in x + :type n: int + + :returns: An array with interploated points + :rtype: array + + :raises NotImplementedError: The functions is not implemented for 3D or higher dimensions + :raises ValueError: Number of intermediate points should be greated than zero + + + .. py:method:: find_path(start, end, n_splits=1) + + Finds a path between start and end using path graph + + :param start: A cartesian co-ordinate specifying the start position + :type start: array + :param end: A node ID specifying the end position + :type end: array + :param n_splits: Number of splits in refining the path points, by default 1 + :type n_splits: int, optional + + :returns: **path_points** -- A refined path points in pybullet cartesian co-ordinate system + :rtype: array + + + .. py:method:: execute() + :abstractmethod: + + + diff --git a/docs/html/_sources/autoapi/shasta/primitives/path_planning/index.rst.txt b/docs/html/_sources/autoapi/shasta/primitives/path_planning/index.rst.txt new file mode 100644 index 0000000..0e45522 --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/primitives/path_planning/index.rst.txt @@ -0,0 +1,65 @@ +:py:mod:`shasta.primitives.path_planning` +========================================= + +.. py:module:: shasta.primitives.path_planning + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + shasta.primitives.path_planning.PathPlanning + + + + +.. py:class:: PathPlanning(env_map) + + + Bases: :py:obj:`object` + + Path planner based on the skeleton of the image. + Generates a spline path + + .. py:method:: linear_refine_implicit(x, n) + + Given a 2D ndarray (npt, m) of npt coordinates in m dimension, + insert 2**(n-1) additional points on each trajectory segment + Returns an (npt*2**(n-1), m) ndarray + + :param x: A 2D input array + :type x: array + :param n: Number of intermediate points to insert between two consecutive points in x + :type n: int + + :returns: An array with interploated points + :rtype: array + + :raises NotImplementedError: The functions is not implemented for 3D or higher dimensions + :raises ValueError: Number of intermediate points should be greated than zero + + + .. py:method:: find_path(start, end, n_splits=1) + + Finds a path between start and end using path graph + + :param start: A cartesian co-ordinate specifying the start position + :type start: array + :param end: A node ID specifying the end position + :type end: array + :param n_splits: Number of splits in refining the path points, by default 1 + :type n_splits: int, optional + + :returns: **path_points** -- A refined path points in pybullet cartesian co-ordinate system + :rtype: array + + + .. py:method:: execute() + :abstractmethod: + + + diff --git a/docs/html/_sources/autoapi/shasta/utils/index.rst.txt b/docs/html/_sources/autoapi/shasta/utils/index.rst.txt new file mode 100644 index 0000000..39c6c49 --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/utils/index.rst.txt @@ -0,0 +1,34 @@ +:py:mod:`shasta.utils` +====================== + +.. py:module:: shasta.utils + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + shasta.utils.get_initial_positions + + + +.. py:function:: get_initial_positions(cartesian_pos, r, n) + + Initial position for actor in the form of a ring + + :param cartesian_pos: Initial cartesian pos + :type cartesian_pos: array + :param r: Radius of formation + :type r: float + :param n: Number of points in the circle + :type n: int + + :returns: An array of points in the form of a ring + :rtype: array + + diff --git a/docs/html/_sources/autoapi/shasta/visualize/index.rst.txt b/docs/html/_sources/autoapi/shasta/visualize/index.rst.txt new file mode 100644 index 0000000..ae7a0bb --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/visualize/index.rst.txt @@ -0,0 +1,27 @@ +:py:mod:`shasta.visualize` +========================== + +.. py:module:: shasta.visualize + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + shasta.visualize.plot_nodes + + + +.. py:function:: plot_nodes(config) + + Visualize the node graph + + :param config: a yaml file providing the configuration + :type config: yaml + + diff --git a/docs/html/_sources/autoapi/shasta/world/index.rst.txt b/docs/html/_sources/autoapi/shasta/world/index.rst.txt new file mode 100644 index 0000000..0104b6d --- /dev/null +++ b/docs/html/_sources/autoapi/shasta/world/index.rst.txt @@ -0,0 +1,59 @@ +:py:mod:`shasta.world` +====================== + +.. py:module:: shasta.world + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + shasta.world.World + + + + +.. py:class:: World(config) + + + .. py:method:: load_world_model(read_path) + + Load the URDF model + + :param read_path: The path to the URDF model + :type read_path: str + + + .. py:method:: change_camera_position(camera_distance=150.0, camera_yaw=0.0, camera_pitch=-89.999, camera_target_position=[0, 30, 0]) + + Change the world camera position + + :param camera_distance: Camera distance from target, by default 150 + :type camera_distance: float, optional + :param camera_yaw: Camera yaw, by default 0 + :type camera_yaw: float, optional + :param camera_pitch: Camera pitch, by default -89.999 + :type camera_pitch: float, optional + :param camera_target_position: Camera target position, by default [0, 30, 0] + :type camera_target_position: list, optional + + :rtype: None + + + .. py:method:: spawn_actor(actor, spawn_point) + + Spawn the actor at a given point + + :param actor: An actor to spawm + :type actor: object + :param spawn_point: Spawn point + :type spawn_point: array + + :rtype: None + + + diff --git a/docs/html/_sources/code_of_conduct.rst.txt b/docs/html/_sources/code_of_conduct.rst.txt new file mode 100644 index 0000000..63606e6 --- /dev/null +++ b/docs/html/_sources/code_of_conduct.rst.txt @@ -0,0 +1,4 @@ +Code of Conduct +=============== +.. include:: ../CODE_OF_CONDUCT.md + :parser: myst_parser.sphinx_ diff --git a/docs/html/_sources/contributing.rst.txt b/docs/html/_sources/contributing.rst.txt index e582053..66c365e 100644 --- a/docs/html/_sources/contributing.rst.txt +++ b/docs/html/_sources/contributing.rst.txt @@ -1 +1,4 @@ -.. include:: ../CONTRIBUTING.rst +Contributing +=========== +.. include:: ../CONTRIBUTING.md + :parser: myst_parser.sphinx_ diff --git a/docs/html/_sources/index.rst.txt b/docs/html/_sources/index.rst.txt index 3cf3bb5..ba4a499 100644 --- a/docs/html/_sources/index.rst.txt +++ b/docs/html/_sources/index.rst.txt @@ -7,8 +7,8 @@ Welcome to shasta's documentation! readme installation - usage contributing + code_of_conduct history Indices and tables diff --git a/docs/html/_sources/installation.rst.txt b/docs/html/_sources/installation.rst.txt index 729dd20..edbe5a3 100644 --- a/docs/html/_sources/installation.rst.txt +++ b/docs/html/_sources/installation.rst.txt @@ -34,18 +34,9 @@ You can either clone the public repository: $ git clone git://github.com/hemumanju/shasta -Or download the `tarball`_: - -.. code-block:: console - - $ curl -OJL https://github.com/hemumanju/shasta/tarball/master - -Once you have a copy of the source, you can install it with: - .. code-block:: console $ python setup.py install .. _Github repo: https://github.com/hemumanju/shasta -.. _tarball: https://github.com/hemumanju/shasta/tarball/master diff --git a/docs/html/_sources/readme.rst.txt b/docs/html/_sources/readme.rst.txt index 72a3355..95cacbc 100644 --- a/docs/html/_sources/readme.rst.txt +++ b/docs/html/_sources/readme.rst.txt @@ -1 +1,4 @@ -.. include:: ../README.rst +Welcome +=========== +.. include:: ../README.md + :parser: myst_parser.sphinx_ diff --git a/docs/html/_static/basic.css b/docs/html/_static/basic.css index 24a49f0..7577acb 100644 --- a/docs/html/_static/basic.css +++ b/docs/html/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -130,7 +130,7 @@ ul.search li a { font-weight: bold; } -ul.search li div.context { +ul.search li p.context { color: #888; margin: 2px 0 0 30px; text-align: left; @@ -222,7 +222,7 @@ table.modindextable td { /* -- general body styles --------------------------------------------------- */ div.body { - min-width: 450px; + min-width: 360px; max-width: 800px; } @@ -237,16 +237,6 @@ a.headerlink { visibility: hidden; } -a.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -277,25 +267,25 @@ p.rubric { font-weight: bold; } -img.align-left, .figure.align-left, object.align-left { +img.align-left, figure.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } -img.align-right, .figure.align-right, object.align-right { +img.align-right, figure.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } -img.align-center, .figure.align-center, object.align-center { +img.align-center, figure.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } -img.align-default, .figure.align-default { +img.align-default, figure.align-default, .figure.align-default { display: block; margin-left: auto; margin-right: auto; @@ -319,7 +309,8 @@ img.align-default, .figure.align-default { /* -- sidebars -------------------------------------------------------------- */ -div.sidebar { +div.sidebar, +aside.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px; @@ -334,12 +325,16 @@ p.sidebar-title { font-weight: bold; } +nav.contents, +aside.topic, div.admonition, div.topic, blockquote { clear: left; } /* -- topics ---------------------------------------------------------------- */ +nav.contents, +aside.topic, div.topic { border: 1px solid #ccc; padding: 7px; @@ -377,12 +372,18 @@ div.body p.centered { /* -- content of sidebars/topics/admonitions -------------------------------- */ div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; } div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, div.topic::after, div.admonition::after, blockquote::after { @@ -425,10 +426,6 @@ table.docutils td, table.docutils th { border-bottom: 1px solid #aaa; } -table.footnote td, table.footnote th { - border: 0 !important; -} - th { text-align: left; padding-right: 5px; @@ -455,20 +452,22 @@ td > :last-child { /* -- figures --------------------------------------------------------------- */ -div.figure { +div.figure, figure { margin: 0.5em; padding: 0.5em; } -div.figure p.caption { +div.figure p.caption, figcaption { padding: 0.3em; } -div.figure p.caption span.caption-number { +div.figure p.caption span.caption-number, +figcaption span.caption-number { font-style: italic; } -div.figure p.caption span.caption-text { +div.figure p.caption span.caption-text, +figcaption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ @@ -503,6 +502,63 @@ table.hlist td { vertical-align: top; } +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + /* -- other body styles ----------------------------------------------------- */ @@ -553,19 +609,26 @@ ul.simple p { margin-bottom: 0; } -dl.footnote > dt, -dl.citation > dt { +aside.footnote > span, +div.citation > span { float: left; - margin-right: 0.5em; } - -dl.footnote > dd, -dl.citation > dd { +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { margin-bottom: 0em; } - -dl.footnote > dd:after, -dl.citation > dd:after { +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { content: ""; clear: both; } @@ -582,10 +645,6 @@ dl.field-list > dt { padding-right: 5px; } -dl.field-list > dt:after { - content: ":"; -} - dl.field-list > dd { padding-left: 0.5em; margin-top: 0em; @@ -629,14 +688,6 @@ dl.glossary dt { font-size: 1.1em; } -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - .versionmodified { font-style: italic; } @@ -677,8 +728,9 @@ dl.glossary dt { .classifier:before { font-style: normal; - margin: 0.5em; + margin: 0 0.5em; content: ":"; + display: inline-block; } abbr, acronym { @@ -702,6 +754,7 @@ span.pre { -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; + white-space: nowrap; } div[class*="highlight-"] { @@ -765,8 +818,12 @@ div.code-block-caption code { table.highlighttable td.linenos, span.linenos, -div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ - user-select: none; +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ } div.code-block-caption span.caption-number { @@ -781,16 +838,6 @@ div.literal-block-wrapper { margin: 1em 0; } -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - code.xref, a code { background-color: transparent; font-weight: bold; diff --git a/docs/html/_static/debug.css b/docs/html/_static/debug.css new file mode 100644 index 0000000..74d4aec --- /dev/null +++ b/docs/html/_static/debug.css @@ -0,0 +1,69 @@ +/* + This CSS file should be overridden by the theme authors. It's + meant for debugging and developing the skeleton that this theme provides. +*/ +body { + font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, + "Apple Color Emoji", "Segoe UI Emoji"; + background: lavender; +} +.sb-announcement { + background: rgb(131, 131, 131); +} +.sb-announcement__inner { + background: black; + color: white; +} +.sb-header { + background: lightskyblue; +} +.sb-header__inner { + background: royalblue; + color: white; +} +.sb-header-secondary { + background: lightcyan; +} +.sb-header-secondary__inner { + background: cornflowerblue; + color: white; +} +.sb-sidebar-primary { + background: lightgreen; +} +.sb-main { + background: blanchedalmond; +} +.sb-main__inner { + background: antiquewhite; +} +.sb-header-article { + background: lightsteelblue; +} +.sb-article-container { + background: snow; +} +.sb-article-main { + background: white; +} +.sb-footer-article { + background: lightpink; +} +.sb-sidebar-secondary { + background: lightgoldenrodyellow; +} +.sb-footer-content { + background: plum; +} +.sb-footer-content__inner { + background: palevioletred; +} +.sb-footer { + background: pink; +} +.sb-footer__inner { + background: salmon; +} +.sb-article { + background: white; +} diff --git a/docs/html/_static/doctools.js b/docs/html/_static/doctools.js index 7d88f80..d06a71d 100644 --- a/docs/html/_static/doctools.js +++ b/docs/html/_static/doctools.js @@ -2,315 +2,155 @@ * doctools.js * ~~~~~~~~~~~ * - * Sphinx JavaScript utilities for all documentation. + * Base JavaScript utilities for all Sphinx HTML documentation. * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(x) { - return decodeURIComponent(x).replace(/\+/g, ' '); -}; - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s === 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); } - return result; }; -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node, addItems) { - if (node.nodeType === 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && - !jQuery(node.parentNode).hasClass(className) && - !jQuery(node.parentNode).hasClass("nohighlight")) { - var span; - var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.className = className; - } - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - if (isInSVG) { - var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); - var bbox = node.parentElement.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute('class', className); - addItems.push({ - "parent": node.parentNode, - "target": rect}); - } - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this, addItems); - }); - } - } - var addItems = []; - var result = this.each(function() { - highlight(this, addItems); - }); - for (var i = 0; i < addItems.length; ++i) { - jQuery(addItems[i].parent).before(addItems[i].target); - } - return result; -}; - -/* - * backward compatibility for jQuery.browser - * This will be supported until firefox bug is fixed. - */ -if (!jQuery.browser) { - jQuery.uaMatch = function(ua) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || - /(webkit)[ \/]([\w.]+)/.exec(ua) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || - /(msie) ([\w.]+)/.exec(ua) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; - }; - jQuery.browser = {}; - jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; -} - /** * Small JavaScript module for the documentation. */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { - this.initOnKeyListeners(); - } +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); }, /** * i18n support */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, - LOCALE : 'unknown', + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", // gettext and ngettext don't access this so that the functions // can safely bound to a different name (_ = Documentation.gettext) - gettext : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } }, - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; }, - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; }, /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 + * helper function to focus on search bar */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); }, /** - * highlight the search words provided in the url in the text + * Initialise the domain index toggle buttons */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, + }; - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); }, - initOnKeyListeners: function() { - $(document).keydown(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box, textarea, dropdown or button - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey - && !event.shiftKey) { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); } + break; } } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } }); - } + }, }; // quick alias for translations -_ = Documentation.gettext; +const _ = Documentation.gettext; -$(document).ready(function() { - Documentation.init(); -}); +_ready(Documentation.init); diff --git a/docs/html/_static/documentation_options.js b/docs/html/_static/documentation_options.js index 87d8188..e49ed18 100644 --- a/docs/html/_static/documentation_options.js +++ b/docs/html/_static/documentation_options.js @@ -1,12 +1,14 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), VERSION: '0.1.0', - LANGUAGE: 'None', + LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', FILE_SUFFIX: '.html', LINK_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: false + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, }; \ No newline at end of file diff --git a/docs/html/_static/graphviz.css b/docs/html/_static/graphviz.css index 8ab69e0..8d81c02 100644 --- a/docs/html/_static/graphviz.css +++ b/docs/html/_static/graphviz.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- graphviz extension. * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/docs/html/_static/language_data.js b/docs/html/_static/language_data.js index d2b4ee9..250f566 100644 --- a/docs/html/_static/language_data.js +++ b/docs/html/_static/language_data.js @@ -5,15 +5,16 @@ * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ -var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"]; +var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; -/* Non-minified version JS is _stemmer.js if file is provided */ +/* Non-minified version is copied as a separate JS file, is available */ + /** * Porter Stemmer */ @@ -196,102 +197,3 @@ var Stemmer = function() { } } - - - - -var splitChars = (function() { - var result = {}; - var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, - 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, - 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, - 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, - 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, - 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, - 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, - 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, - 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, - 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; - var i, j, start, end; - for (i = 0; i < singles.length; i++) { - result[singles[i]] = true; - } - var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], - [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], - [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], - [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], - [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], - [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], - [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], - [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], - [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], - [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], - [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], - [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], - [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], - [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], - [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], - [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], - [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], - [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], - [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], - [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], - [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], - [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], - [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], - [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], - [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], - [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], - [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], - [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], - [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], - [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], - [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], - [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], - [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], - [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], - [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], - [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], - [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], - [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], - [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], - [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], - [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], - [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], - [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], - [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], - [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], - [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], - [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], - [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], - [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; - for (i = 0; i < ranges.length; i++) { - start = ranges[i][0]; - end = ranges[i][1]; - for (j = start; j <= end; j++) { - result[j] = true; - } - } - return result; -})(); - -function splitQuery(query) { - var result = []; - var start = -1; - for (var i = 0; i < query.length; i++) { - if (splitChars[query.charCodeAt(i)]) { - if (start !== -1) { - result.push(query.slice(start, i)); - start = -1; - } - } else if (start === -1) { - start = i; - } - } - if (start !== -1) { - result.push(query.slice(start)); - } - return result; -} - - diff --git a/docs/html/_static/pygments.css b/docs/html/_static/pygments.css index 96529c7..c2e07c7 100644 --- a/docs/html/_static/pygments.css +++ b/docs/html/_static/pygments.css @@ -1,74 +1,258 @@ -pre { line-height: 125%; margin: 0; } -td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } -span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } -td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight pre { line-height: 125%; } +.highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +.highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +.highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight { background: #f8f8f8; } -.highlight .c { color: #408080; font-style: italic } /* Comment */ -.highlight .err { border: 1px solid #FF0000 } /* Error */ -.highlight .k { color: #008000; font-weight: bold } /* Keyword */ -.highlight .o { color: #666666 } /* Operator */ -.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ -.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #BC7A00 } /* Comment.Preproc */ -.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ -.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ -.highlight .gd { color: #A00000 } /* Generic.Deleted */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .c { color: #8f5902; font-style: italic } /* Comment */ +.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ +.highlight .g { color: #000000 } /* Generic */ +.highlight .k { color: #204a87; font-weight: bold } /* Keyword */ +.highlight .l { color: #000000 } /* Literal */ +.highlight .n { color: #000000 } /* Name */ +.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */ +.highlight .x { color: #000000 } /* Other */ +.highlight .p { color: #000000; font-weight: bold } /* Punctuation */ +.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #a40000 } /* Generic.Deleted */ +.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.highlight .ges { color: #000000; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #ef2929 } /* Generic.Error */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .highlight .gi { color: #00A000 } /* Generic.Inserted */ -.highlight .go { color: #888888 } /* Generic.Output */ -.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .go { color: #000000; font-style: italic } /* Generic.Output */ +.highlight .gp { color: #8f5902 } /* Generic.Prompt */ +.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #0044DD } /* Generic.Traceback */ -.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ -.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ -.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ -.highlight .kp { color: #008000 } /* Keyword.Pseudo */ -.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #B00040 } /* Keyword.Type */ -.highlight .m { color: #666666 } /* Literal.Number */ -.highlight .s { color: #BA2121 } /* Literal.String */ -.highlight .na { color: #7D9029 } /* Name.Attribute */ -.highlight .nb { color: #008000 } /* Name.Builtin */ -.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ -.highlight .no { color: #880000 } /* Name.Constant */ -.highlight .nd { color: #AA22FF } /* Name.Decorator */ -.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ -.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #0000FF } /* Name.Function */ -.highlight .nl { color: #A0A000 } /* Name.Label */ -.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ -.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ -.highlight .nv { color: #19177C } /* Name.Variable */ -.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mb { color: #666666 } /* Literal.Number.Bin */ -.highlight .mf { color: #666666 } /* Literal.Number.Float */ -.highlight .mh { color: #666666 } /* Literal.Number.Hex */ -.highlight .mi { color: #666666 } /* Literal.Number.Integer */ -.highlight .mo { color: #666666 } /* Literal.Number.Oct */ -.highlight .sa { color: #BA2121 } /* Literal.String.Affix */ -.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ -.highlight .sc { color: #BA2121 } /* Literal.String.Char */ -.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ -.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ -.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ -.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ -.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ -.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ -.highlight .sx { color: #008000 } /* Literal.String.Other */ -.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ -.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ -.highlight .ss { color: #19177C } /* Literal.String.Symbol */ -.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ -.highlight .fm { color: #0000FF } /* Name.Function.Magic */ -.highlight .vc { color: #19177C } /* Name.Variable.Class */ -.highlight .vg { color: #19177C } /* Name.Variable.Global */ -.highlight .vi { color: #19177C } /* Name.Variable.Instance */ -.highlight .vm { color: #19177C } /* Name.Variable.Magic */ -.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file +.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ +.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #000000 } /* Literal.Date */ +.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #4e9a06 } /* Literal.String */ +.highlight .na { color: #c4a000 } /* Name.Attribute */ +.highlight .nb { color: #204a87 } /* Name.Builtin */ +.highlight .nc { color: #000000 } /* Name.Class */ +.highlight .no { color: #000000 } /* Name.Constant */ +.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #ce5c00 } /* Name.Entity */ +.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #000000 } /* Name.Function */ +.highlight .nl { color: #f57900 } /* Name.Label */ +.highlight .nn { color: #000000 } /* Name.Namespace */ +.highlight .nx { color: #000000 } /* Name.Other */ +.highlight .py { color: #000000 } /* Name.Property */ +.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #000000 } /* Name.Variable */ +.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ +.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */ +.highlight .w { color: #f8f8f8 } /* Text.Whitespace */ +.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ +.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ +.highlight .sc { color: #4e9a06 } /* Literal.String.Char */ +.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ +.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ +.highlight .se { color: #4e9a06 } /* Literal.String.Escape */ +.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ +.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ +.highlight .sx { color: #4e9a06 } /* Literal.String.Other */ +.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ +.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ +.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ +.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #000000 } /* Name.Function.Magic */ +.highlight .vc { color: #000000 } /* Name.Variable.Class */ +.highlight .vg { color: #000000 } /* Name.Variable.Global */ +.highlight .vi { color: #000000 } /* Name.Variable.Instance */ +.highlight .vm { color: #000000 } /* Name.Variable.Magic */ +.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ +@media not print { +body[data-theme="dark"] .highlight pre { line-height: 125%; } +body[data-theme="dark"] .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } +body[data-theme="dark"] .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } +body[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +body[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +body[data-theme="dark"] .highlight .hll { background-color: #404040 } +body[data-theme="dark"] .highlight { background: #202020; color: #d0d0d0 } +body[data-theme="dark"] .highlight .c { color: #ababab; font-style: italic } /* Comment */ +body[data-theme="dark"] .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +body[data-theme="dark"] .highlight .esc { color: #d0d0d0 } /* Escape */ +body[data-theme="dark"] .highlight .g { color: #d0d0d0 } /* Generic */ +body[data-theme="dark"] .highlight .k { color: #6ebf26; font-weight: bold } /* Keyword */ +body[data-theme="dark"] .highlight .l { color: #d0d0d0 } /* Literal */ +body[data-theme="dark"] .highlight .n { color: #d0d0d0 } /* Name */ +body[data-theme="dark"] .highlight .o { color: #d0d0d0 } /* Operator */ +body[data-theme="dark"] .highlight .x { color: #d0d0d0 } /* Other */ +body[data-theme="dark"] .highlight .p { color: #d0d0d0 } /* Punctuation */ +body[data-theme="dark"] .highlight .ch { color: #ababab; font-style: italic } /* Comment.Hashbang */ +body[data-theme="dark"] .highlight .cm { color: #ababab; font-style: italic } /* Comment.Multiline */ +body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* Comment.Preproc */ +body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ +body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ +body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ +body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ +body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ +body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ +body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ +body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ +body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ +body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ +body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ +body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ +body[data-theme="dark"] .highlight .kp { color: #6ebf26 } /* Keyword.Pseudo */ +body[data-theme="dark"] .highlight .kr { color: #6ebf26; font-weight: bold } /* Keyword.Reserved */ +body[data-theme="dark"] .highlight .kt { color: #6ebf26; font-weight: bold } /* Keyword.Type */ +body[data-theme="dark"] .highlight .ld { color: #d0d0d0 } /* Literal.Date */ +body[data-theme="dark"] .highlight .m { color: #51b2fd } /* Literal.Number */ +body[data-theme="dark"] .highlight .s { color: #ed9d13 } /* Literal.String */ +body[data-theme="dark"] .highlight .na { color: #bbbbbb } /* Name.Attribute */ +body[data-theme="dark"] .highlight .nb { color: #2fbccd } /* Name.Builtin */ +body[data-theme="dark"] .highlight .nc { color: #71adff; text-decoration: underline } /* Name.Class */ +body[data-theme="dark"] .highlight .no { color: #40ffff } /* Name.Constant */ +body[data-theme="dark"] .highlight .nd { color: #ffa500 } /* Name.Decorator */ +body[data-theme="dark"] .highlight .ni { color: #d0d0d0 } /* Name.Entity */ +body[data-theme="dark"] .highlight .ne { color: #bbbbbb } /* Name.Exception */ +body[data-theme="dark"] .highlight .nf { color: #71adff } /* Name.Function */ +body[data-theme="dark"] .highlight .nl { color: #d0d0d0 } /* Name.Label */ +body[data-theme="dark"] .highlight .nn { color: #71adff; text-decoration: underline } /* Name.Namespace */ +body[data-theme="dark"] .highlight .nx { color: #d0d0d0 } /* Name.Other */ +body[data-theme="dark"] .highlight .py { color: #d0d0d0 } /* Name.Property */ +body[data-theme="dark"] .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */ +body[data-theme="dark"] .highlight .nv { color: #40ffff } /* Name.Variable */ +body[data-theme="dark"] .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */ +body[data-theme="dark"] .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */ +body[data-theme="dark"] .highlight .w { color: #666666 } /* Text.Whitespace */ +body[data-theme="dark"] .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */ +body[data-theme="dark"] .highlight .mf { color: #51b2fd } /* Literal.Number.Float */ +body[data-theme="dark"] .highlight .mh { color: #51b2fd } /* Literal.Number.Hex */ +body[data-theme="dark"] .highlight .mi { color: #51b2fd } /* Literal.Number.Integer */ +body[data-theme="dark"] .highlight .mo { color: #51b2fd } /* Literal.Number.Oct */ +body[data-theme="dark"] .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */ +body[data-theme="dark"] .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ +body[data-theme="dark"] .highlight .sc { color: #ed9d13 } /* Literal.String.Char */ +body[data-theme="dark"] .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */ +body[data-theme="dark"] .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ +body[data-theme="dark"] .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ +body[data-theme="dark"] .highlight .se { color: #ed9d13 } /* Literal.String.Escape */ +body[data-theme="dark"] .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ +body[data-theme="dark"] .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ +body[data-theme="dark"] .highlight .sx { color: #ffa500 } /* Literal.String.Other */ +body[data-theme="dark"] .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ +body[data-theme="dark"] .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ +body[data-theme="dark"] .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ +body[data-theme="dark"] .highlight .bp { color: #2fbccd } /* Name.Builtin.Pseudo */ +body[data-theme="dark"] .highlight .fm { color: #71adff } /* Name.Function.Magic */ +body[data-theme="dark"] .highlight .vc { color: #40ffff } /* Name.Variable.Class */ +body[data-theme="dark"] .highlight .vg { color: #40ffff } /* Name.Variable.Global */ +body[data-theme="dark"] .highlight .vi { color: #40ffff } /* Name.Variable.Instance */ +body[data-theme="dark"] .highlight .vm { color: #40ffff } /* Name.Variable.Magic */ +body[data-theme="dark"] .highlight .il { color: #51b2fd } /* Literal.Number.Integer.Long */ +@media (prefers-color-scheme: dark) { +body:not([data-theme="light"]) .highlight pre { line-height: 125%; } +body:not([data-theme="light"]) .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } +body:not([data-theme="light"]) .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } +body:not([data-theme="light"]) .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +body:not([data-theme="light"]) .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +body:not([data-theme="light"]) .highlight .hll { background-color: #404040 } +body:not([data-theme="light"]) .highlight { background: #202020; color: #d0d0d0 } +body:not([data-theme="light"]) .highlight .c { color: #ababab; font-style: italic } /* Comment */ +body:not([data-theme="light"]) .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +body:not([data-theme="light"]) .highlight .esc { color: #d0d0d0 } /* Escape */ +body:not([data-theme="light"]) .highlight .g { color: #d0d0d0 } /* Generic */ +body:not([data-theme="light"]) .highlight .k { color: #6ebf26; font-weight: bold } /* Keyword */ +body:not([data-theme="light"]) .highlight .l { color: #d0d0d0 } /* Literal */ +body:not([data-theme="light"]) .highlight .n { color: #d0d0d0 } /* Name */ +body:not([data-theme="light"]) .highlight .o { color: #d0d0d0 } /* Operator */ +body:not([data-theme="light"]) .highlight .x { color: #d0d0d0 } /* Other */ +body:not([data-theme="light"]) .highlight .p { color: #d0d0d0 } /* Punctuation */ +body:not([data-theme="light"]) .highlight .ch { color: #ababab; font-style: italic } /* Comment.Hashbang */ +body:not([data-theme="light"]) .highlight .cm { color: #ababab; font-style: italic } /* Comment.Multiline */ +body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bold } /* Comment.Preproc */ +body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ +body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ +body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ +body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ +body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ +body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ +body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ +body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ +body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ +body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ +body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ +body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ +body:not([data-theme="light"]) .highlight .kp { color: #6ebf26 } /* Keyword.Pseudo */ +body:not([data-theme="light"]) .highlight .kr { color: #6ebf26; font-weight: bold } /* Keyword.Reserved */ +body:not([data-theme="light"]) .highlight .kt { color: #6ebf26; font-weight: bold } /* Keyword.Type */ +body:not([data-theme="light"]) .highlight .ld { color: #d0d0d0 } /* Literal.Date */ +body:not([data-theme="light"]) .highlight .m { color: #51b2fd } /* Literal.Number */ +body:not([data-theme="light"]) .highlight .s { color: #ed9d13 } /* Literal.String */ +body:not([data-theme="light"]) .highlight .na { color: #bbbbbb } /* Name.Attribute */ +body:not([data-theme="light"]) .highlight .nb { color: #2fbccd } /* Name.Builtin */ +body:not([data-theme="light"]) .highlight .nc { color: #71adff; text-decoration: underline } /* Name.Class */ +body:not([data-theme="light"]) .highlight .no { color: #40ffff } /* Name.Constant */ +body:not([data-theme="light"]) .highlight .nd { color: #ffa500 } /* Name.Decorator */ +body:not([data-theme="light"]) .highlight .ni { color: #d0d0d0 } /* Name.Entity */ +body:not([data-theme="light"]) .highlight .ne { color: #bbbbbb } /* Name.Exception */ +body:not([data-theme="light"]) .highlight .nf { color: #71adff } /* Name.Function */ +body:not([data-theme="light"]) .highlight .nl { color: #d0d0d0 } /* Name.Label */ +body:not([data-theme="light"]) .highlight .nn { color: #71adff; text-decoration: underline } /* Name.Namespace */ +body:not([data-theme="light"]) .highlight .nx { color: #d0d0d0 } /* Name.Other */ +body:not([data-theme="light"]) .highlight .py { color: #d0d0d0 } /* Name.Property */ +body:not([data-theme="light"]) .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */ +body:not([data-theme="light"]) .highlight .nv { color: #40ffff } /* Name.Variable */ +body:not([data-theme="light"]) .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */ +body:not([data-theme="light"]) .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */ +body:not([data-theme="light"]) .highlight .w { color: #666666 } /* Text.Whitespace */ +body:not([data-theme="light"]) .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */ +body:not([data-theme="light"]) .highlight .mf { color: #51b2fd } /* Literal.Number.Float */ +body:not([data-theme="light"]) .highlight .mh { color: #51b2fd } /* Literal.Number.Hex */ +body:not([data-theme="light"]) .highlight .mi { color: #51b2fd } /* Literal.Number.Integer */ +body:not([data-theme="light"]) .highlight .mo { color: #51b2fd } /* Literal.Number.Oct */ +body:not([data-theme="light"]) .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */ +body:not([data-theme="light"]) .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ +body:not([data-theme="light"]) .highlight .sc { color: #ed9d13 } /* Literal.String.Char */ +body:not([data-theme="light"]) .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */ +body:not([data-theme="light"]) .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ +body:not([data-theme="light"]) .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ +body:not([data-theme="light"]) .highlight .se { color: #ed9d13 } /* Literal.String.Escape */ +body:not([data-theme="light"]) .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ +body:not([data-theme="light"]) .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ +body:not([data-theme="light"]) .highlight .sx { color: #ffa500 } /* Literal.String.Other */ +body:not([data-theme="light"]) .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ +body:not([data-theme="light"]) .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ +body:not([data-theme="light"]) .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ +body:not([data-theme="light"]) .highlight .bp { color: #2fbccd } /* Name.Builtin.Pseudo */ +body:not([data-theme="light"]) .highlight .fm { color: #71adff } /* Name.Function.Magic */ +body:not([data-theme="light"]) .highlight .vc { color: #40ffff } /* Name.Variable.Class */ +body:not([data-theme="light"]) .highlight .vg { color: #40ffff } /* Name.Variable.Global */ +body:not([data-theme="light"]) .highlight .vi { color: #40ffff } /* Name.Variable.Instance */ +body:not([data-theme="light"]) .highlight .vm { color: #40ffff } /* Name.Variable.Magic */ +body:not([data-theme="light"]) .highlight .il { color: #51b2fd } /* Literal.Number.Integer.Long */ +} +} \ No newline at end of file diff --git a/docs/html/_static/scripts/furo-extensions.js b/docs/html/_static/scripts/furo-extensions.js new file mode 100644 index 0000000..e69de29 diff --git a/docs/html/_static/scripts/furo.js b/docs/html/_static/scripts/furo.js new file mode 100644 index 0000000..cbf6487 --- /dev/null +++ b/docs/html/_static/scripts/furo.js @@ -0,0 +1,3 @@ +/*! For license information please see furo.js.LICENSE.txt */ +(()=>{var t={212:function(t,e,n){var o,r;r=void 0!==n.g?n.g:"undefined"!=typeof window?window:this,o=function(){return function(t){"use strict";var e={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},n=function(t,e,n){if(n.settings.events){var o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e.dispatchEvent(o)}},o=function(t){var e=0;if(t.offsetParent)for(;t;)e+=t.offsetTop,t=t.offsetParent;return e>=0?e:0},r=function(t){t&&t.sort((function(t,e){return o(t.content)=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},l=function(t,e){var n=t[t.length-1];if(function(t,e){return!(!s()||!c(t.content,e,!0))}(n,e))return n;for(var o=t.length-1;o>=0;o--)if(c(t[o].content,e))return t[o]},a=function(t,e){if(e.nested&&t.parentNode){var n=t.parentNode.closest("li");n&&(n.classList.remove(e.nestedClass),a(n,e))}},i=function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.remove(e.navClass),t.content.classList.remove(e.contentClass),a(o,e),n("gumshoeDeactivate",o,{link:t.nav,content:t.content,settings:e}))}},u=function(t,e){if(e.nested){var n=t.parentNode.closest("li");n&&(n.classList.add(e.nestedClass),u(n,e))}};return function(o,c){var s,a,d,f,m,v={setup:function(){s=document.querySelectorAll(o),a=[],Array.prototype.forEach.call(s,(function(t){var e=document.getElementById(decodeURIComponent(t.hash.substr(1)));e&&a.push({nav:t,content:e})})),r(a)},detect:function(){var t=l(a,m);t?d&&t.content===d.content||(i(d,m),function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.add(e.navClass),t.content.classList.add(e.contentClass),u(o,e),n("gumshoeActivate",o,{link:t.nav,content:t.content,settings:e}))}}(t,m),d=t):d&&(i(d,m),d=null)}},h=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame(v.detect)},g=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame((function(){r(a),v.detect()}))};return v.destroy=function(){d&&i(d,m),t.removeEventListener("scroll",h,!1),m.reflow&&t.removeEventListener("resize",g,!1),a=null,s=null,d=null,f=null,m=null},m=function(){var t={};return Array.prototype.forEach.call(arguments,(function(e){for(var n in e){if(!e.hasOwnProperty(n))return;t[n]=e[n]}})),t}(e,c||{}),v.setup(),v.detect(),t.addEventListener("scroll",h,!1),m.reflow&&t.addEventListener("resize",g,!1),v}}(r)}.apply(e,[]),void 0===o||(t.exports=o)}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var c=e[o]={exports:{}};return t[o].call(c.exports,c,c.exports,n),c.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(212),e=n.n(t),o=null,r=null,c=window.pageYOffset||document.documentElement.scrollTop;function s(){const t=localStorage.getItem("theme")||"auto";var e;"light"!==(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"auto"===t?"light":"light"==t?"dark":"auto":"auto"===t?"dark":"dark"==t?"light":"auto")&&"dark"!==e&&"auto"!==e&&(console.error(`Got invalid theme mode: ${e}. Resetting to auto.`),e="auto"),document.body.dataset.theme=e,localStorage.setItem("theme",e),console.log(`Changed to ${e} mode.`)}function l(){!function(){const t=document.getElementsByClassName("theme-toggle");Array.from(t).forEach((t=>{t.addEventListener("click",s)}))}(),function(){let t=0,e=!1;window.addEventListener("scroll",(function(n){t=window.scrollY,e||(window.requestAnimationFrame((function(){var n;n=t,0==Math.floor(r.getBoundingClientRect().top)?r.classList.add("scrolled"):r.classList.remove("scrolled"),function(t){t<64?document.documentElement.classList.remove("show-back-to-top"):tc&&document.documentElement.classList.remove("show-back-to-top"),c=t}(n),function(t){null!==o&&(0==t?o.scrollTo(0,0):Math.ceil(t)>=Math.floor(document.documentElement.scrollHeight-window.innerHeight)?o.scrollTo(0,o.scrollHeight):document.querySelector(".scroll-current"))}(n),e=!1})),e=!0)})),window.scroll()}(),null!==o&&new(e())(".toc-tree a",{reflow:!0,recursive:!0,navClass:"scroll-current",offset:()=>{let t=parseFloat(getComputedStyle(document.documentElement).fontSize);return r.getBoundingClientRect().height+.5*t+1}})}document.addEventListener("DOMContentLoaded",(function(){document.body.parentNode.classList.remove("no-js"),r=document.querySelector("header"),o=document.querySelector(".toc-scroll"),l()}))})()})(); +//# sourceMappingURL=furo.js.map \ No newline at end of file diff --git a/docs/html/_static/scripts/furo.js.LICENSE.txt b/docs/html/_static/scripts/furo.js.LICENSE.txt new file mode 100644 index 0000000..1632189 --- /dev/null +++ b/docs/html/_static/scripts/furo.js.LICENSE.txt @@ -0,0 +1,7 @@ +/*! + * gumshoejs v5.1.2 (patched by @pradyunsg) + * A simple, framework-agnostic scrollspy script. + * (c) 2019 Chris Ferdinandi + * MIT License + * http://github.com/cferdinandi/gumshoe + */ diff --git a/docs/html/_static/scripts/furo.js.map b/docs/html/_static/scripts/furo.js.map new file mode 100644 index 0000000..7ed2be8 --- /dev/null +++ b/docs/html/_static/scripts/furo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scripts/furo.js","mappings":";iCAAA,MAQWA,SAWS,IAAX,EAAAC,EACH,EAAAA,EACkB,oBAAXC,OACPA,OACAC,KAbS,EAAF,WACP,OAaJ,SAAUD,GACR,aAMA,IAAIE,EAAW,CAEbC,SAAU,SACVC,aAAc,SAGdC,QAAQ,EACRC,YAAa,SAGbC,OAAQ,EACRC,QAAQ,EAGRC,QAAQ,GA6BNC,EAAY,SAAUC,EAAMC,EAAMC,GAEpC,GAAKA,EAAOC,SAASL,OAArB,CAGA,IAAIM,EAAQ,IAAIC,YAAYL,EAAM,CAChCM,SAAS,EACTC,YAAY,EACZL,OAAQA,IAIVD,EAAKO,cAAcJ,KAQjBK,EAAe,SAAUR,GAC3B,IAAIS,EAAW,EACf,GAAIT,EAAKU,aACP,KAAOV,GACLS,GAAYT,EAAKW,UACjBX,EAAOA,EAAKU,aAGhB,OAAOD,GAAY,EAAIA,EAAW,GAOhCG,EAAe,SAAUC,GACvBA,GACFA,EAASC,MAAK,SAAUC,EAAOC,GAG7B,OAFcR,EAAaO,EAAME,SACnBT,EAAaQ,EAAMC,UACF,EACxB,MA2CTC,EAAW,SAAUlB,EAAME,EAAUiB,GACvC,IAAIC,EAASpB,EAAKqB,wBACd1B,EAnCU,SAAUO,GAExB,MAA+B,mBAApBA,EAASP,OACX2B,WAAWpB,EAASP,UAItB2B,WAAWpB,EAASP,QA4Bd4B,CAAUrB,GACvB,OAAIiB,EAEAK,SAASJ,EAAOD,OAAQ,KACvB/B,EAAOqC,aAAeC,SAASC,gBAAgBC,cAG7CJ,SAASJ,EAAOS,IAAK,KAAOlC,GAOjCmC,EAAa,WACf,OACEC,KAAKC,KAAK5C,EAAOqC,YAAcrC,EAAO6C,cAnCjCF,KAAKG,IACVR,SAASS,KAAKC,aACdV,SAASC,gBAAgBS,aACzBV,SAASS,KAAKE,aACdX,SAASC,gBAAgBU,aACzBX,SAASS,KAAKP,aACdF,SAASC,gBAAgBC,eAqDzBU,EAAY,SAAUzB,EAAUX,GAClC,IAAIqC,EAAO1B,EAASA,EAAS2B,OAAS,GACtC,GAbgB,SAAUC,EAAMvC,GAChC,SAAI4B,MAAgBZ,EAASuB,EAAKxB,QAASf,GAAU,IAYjDwC,CAAYH,EAAMrC,GAAW,OAAOqC,EACxC,IAAK,IAAII,EAAI9B,EAAS2B,OAAS,EAAGG,GAAK,EAAGA,IACxC,GAAIzB,EAASL,EAAS8B,GAAG1B,QAASf,GAAW,OAAOW,EAAS8B,IAS7DC,EAAmB,SAAUC,EAAK3C,GAEpC,GAAKA,EAAST,QAAWoD,EAAIC,WAA7B,CAGA,IAAIC,EAAKF,EAAIC,WAAWE,QAAQ,MAC3BD,IAGLA,EAAGE,UAAUC,OAAOhD,EAASR,aAG7BkD,EAAiBG,EAAI7C,MAQnBiD,EAAa,SAAUC,EAAOlD,GAEhC,GAAKkD,EAAL,CAGA,IAAIL,EAAKK,EAAMP,IAAIG,QAAQ,MACtBD,IAGLA,EAAGE,UAAUC,OAAOhD,EAASX,UAC7B6D,EAAMnC,QAAQgC,UAAUC,OAAOhD,EAASV,cAGxCoD,EAAiBG,EAAI7C,GAGrBJ,EAAU,oBAAqBiD,EAAI,CACjCM,KAAMD,EAAMP,IACZ5B,QAASmC,EAAMnC,QACff,SAAUA,OASVoD,EAAiB,SAAUT,EAAK3C,GAElC,GAAKA,EAAST,OAAd,CAGA,IAAIsD,EAAKF,EAAIC,WAAWE,QAAQ,MAC3BD,IAGLA,EAAGE,UAAUM,IAAIrD,EAASR,aAG1B4D,EAAeP,EAAI7C,MA8LrB,OA1JkB,SAAUsD,EAAUC,GAKpC,IACIC,EAAU7C,EAAU8C,EAASC,EAAS1D,EADtC2D,EAAa,CAUjBA,MAAmB,WAEjBH,EAAWhC,SAASoC,iBAAiBN,GAGrC3C,EAAW,GAGXkD,MAAMC,UAAUC,QAAQC,KAAKR,GAAU,SAAUjB,GAE/C,IAAIxB,EAAUS,SAASyC,eACrBC,mBAAmB3B,EAAK4B,KAAKC,OAAO,KAEjCrD,GAGLJ,EAAS0D,KAAK,CACZ1B,IAAKJ,EACLxB,QAASA,OAKbL,EAAaC,IAMfgD,OAAoB,WAElB,IAAIW,EAASlC,EAAUzB,EAAUX,GAG5BsE,EASDb,GAAWa,EAAOvD,UAAY0C,EAAQ1C,UAG1CkC,EAAWQ,EAASzD,GAzFT,SAAUkD,EAAOlD,GAE9B,GAAKkD,EAAL,CAGA,IAAIL,EAAKK,EAAMP,IAAIG,QAAQ,MACtBD,IAGLA,EAAGE,UAAUM,IAAIrD,EAASX,UAC1B6D,EAAMnC,QAAQgC,UAAUM,IAAIrD,EAASV,cAGrC8D,EAAeP,EAAI7C,GAGnBJ,EAAU,kBAAmBiD,EAAI,CAC/BM,KAAMD,EAAMP,IACZ5B,QAASmC,EAAMnC,QACff,SAAUA,MAuEVuE,CAASD,EAAQtE,GAGjByD,EAAUa,GAfJb,IACFR,EAAWQ,EAASzD,GACpByD,EAAU,QAoBZe,EAAgB,SAAUvE,GAExByD,GACFxE,EAAOuF,qBAAqBf,GAI9BA,EAAUxE,EAAOwF,sBAAsBf,EAAWgB,SAOhDC,EAAgB,SAAU3E,GAExByD,GACFxE,EAAOuF,qBAAqBf,GAI9BA,EAAUxE,EAAOwF,uBAAsB,WACrChE,EAAaC,GACbgD,EAAWgB,aAoDf,OA7CAhB,EAAWkB,QAAU,WAEfpB,GACFR,EAAWQ,EAASzD,GAItBd,EAAO4F,oBAAoB,SAAUN,GAAe,GAChDxE,EAASN,QACXR,EAAO4F,oBAAoB,SAAUF,GAAe,GAItDjE,EAAW,KACX6C,EAAW,KACXC,EAAU,KACVC,EAAU,KACV1D,EAAW,MAQXA,EA3XS,WACX,IAAI+E,EAAS,GAOb,OANAlB,MAAMC,UAAUC,QAAQC,KAAKgB,WAAW,SAAUC,GAChD,IAAK,IAAIC,KAAOD,EAAK,CACnB,IAAKA,EAAIE,eAAeD,GAAM,OAC9BH,EAAOG,GAAOD,EAAIC,OAGfH,EAmXMK,CAAOhG,EAAUmE,GAAW,IAGvCI,EAAW0B,QAGX1B,EAAWgB,SAGXzF,EAAOoG,iBAAiB,SAAUd,GAAe,GAC7CxE,EAASN,QACXR,EAAOoG,iBAAiB,SAAUV,GAAe,GAS9CjB,GA7bA4B,CAAQvG,IAChB,QAFM,SAEN,uBCXDwG,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,IAOV,OAHAE,EAAoBL,GAAU1B,KAAK8B,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAGpEK,EAAOD,QCpBfJ,EAAoBO,EAAKF,IACxB,IAAIG,EAASH,GAAUA,EAAOI,WAC7B,IAAOJ,EAAiB,QACxB,IAAM,EAEP,OADAL,EAAoBU,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRR,EAAoBU,EAAI,CAACN,EAASQ,KACjC,IAAI,IAAInB,KAAOmB,EACXZ,EAAoBa,EAAED,EAAYnB,KAASO,EAAoBa,EAAET,EAASX,IAC5EqB,OAAOC,eAAeX,EAASX,EAAK,CAAEuB,YAAY,EAAMC,IAAKL,EAAWnB,MCJ3EO,EAAoBxG,EAAI,WACvB,GAA0B,iBAAf0H,WAAyB,OAAOA,WAC3C,IACC,OAAOxH,MAAQ,IAAIyH,SAAS,cAAb,GACd,MAAOC,GACR,GAAsB,iBAAX3H,OAAqB,OAAOA,QALjB,GCAxBuG,EAAoBa,EAAI,CAACrB,EAAK6B,IAAUP,OAAOzC,UAAUqB,eAAenB,KAAKiB,EAAK6B,4CCK9EC,EAAY,KACZC,EAAS,KACTC,EAAgB/H,OAAO6C,aAAeP,SAASC,gBAAgByF,UA4EnE,SAASC,IACP,MAAMC,EAAeC,aAAaC,QAAQ,UAAY,OAZxD,IAAkBC,EACH,WADGA,EAaIrI,OAAOsI,WAAW,gCAAgCC,QAI/C,SAAjBL,EACO,QACgB,SAAhBA,EACA,OAEA,OAIU,SAAjBA,EACO,OACgB,QAAhBA,EACA,QAEA,SA9BoB,SAATG,GAA4B,SAATA,IACzCG,QAAQC,MAAM,2BAA2BJ,yBACzCA,EAAO,QAGT/F,SAASS,KAAK2F,QAAQC,MAAQN,EAC9BF,aAAaS,QAAQ,QAASP,GAC9BG,QAAQK,IAAI,cAAcR,WA4E5B,SAASlC,KART,WAEE,MAAM2C,EAAUxG,SAASyG,uBAAuB,gBAChDpE,MAAMqE,KAAKF,GAASjE,SAASoE,IAC3BA,EAAI7C,iBAAiB,QAAS6B,MAKhCiB,GA9CF,WAEE,IAAIC,EAA6B,EAC7BC,GAAU,EAEdpJ,OAAOoG,iBAAiB,UAAU,SAAUuB,GAC1CwB,EAA6BnJ,OAAOqJ,QAE/BD,IACHpJ,OAAOwF,uBAAsB,WAzDnC,IAAuB8D,IA0DDH,EA9GkC,GAAlDxG,KAAK4G,MAAMzB,EAAO7F,wBAAwBQ,KAC5CqF,EAAOjE,UAAUM,IAAI,YAErB2D,EAAOjE,UAAUC,OAAO,YAI5B,SAAmCwF,GAC7BA,EAXmB,GAYrBhH,SAASC,gBAAgBsB,UAAUC,OAAO,oBAEtCwF,EAAYvB,EACdzF,SAASC,gBAAgBsB,UAAUM,IAAI,oBAC9BmF,EAAYvB,GACrBzF,SAASC,gBAAgBsB,UAAUC,OAAO,oBAG9CiE,EAAgBuB,EAqChBE,CAA0BF,GAlC5B,SAA6BA,GACT,OAAdzB,IAKa,GAAbyB,EACFzB,EAAU4B,SAAS,EAAG,GAGtB9G,KAAKC,KAAK0G,IACV3G,KAAK4G,MAAMjH,SAASC,gBAAgBS,aAAehD,OAAOqC,aAE1DwF,EAAU4B,SAAS,EAAG5B,EAAU7E,cAGhBV,SAASoH,cAAc,oBAmBzCC,CAAoBL,GAwDdF,GAAU,KAGZA,GAAU,MAGdpJ,OAAO4J,SA8BPC,GA1BkB,OAAdhC,GAKJ,IAAI,IAAJ,CAAY,cAAe,CACzBrH,QAAQ,EACRsJ,WAAW,EACX3J,SAAU,iBACVI,OAAQ,KACN,IAAIwJ,EAAM7H,WAAW8H,iBAAiB1H,SAASC,iBAAiB0H,UAChE,OAAOnC,EAAO7F,wBAAwBiI,OAAS,GAAMH,EAAM,KA+BjEzH,SAAS8D,iBAAiB,oBAT1B,WACE9D,SAASS,KAAKW,WAAWG,UAAUC,OAAO,SAE1CgE,EAASxF,SAASoH,cAAc,UAChC7B,EAAYvF,SAASoH,cAAc,eAEnCvD","sources":["webpack:///./src/furo/assets/scripts/gumshoe-patched.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///./src/furo/assets/scripts/furo.js"],"sourcesContent":["/*!\n * gumshoejs v5.1.2 (patched by @pradyunsg)\n * A simple, framework-agnostic scrollspy script.\n * (c) 2019 Chris Ferdinandi\n * MIT License\n * http://github.com/cferdinandi/gumshoe\n */\n\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], function () {\n return factory(root);\n });\n } else if (typeof exports === \"object\") {\n module.exports = factory(root);\n } else {\n root.Gumshoe = factory(root);\n }\n})(\n typeof global !== \"undefined\"\n ? global\n : typeof window !== \"undefined\"\n ? window\n : this,\n function (window) {\n \"use strict\";\n\n //\n // Defaults\n //\n\n var defaults = {\n // Active classes\n navClass: \"active\",\n contentClass: \"active\",\n\n // Nested navigation\n nested: false,\n nestedClass: \"active\",\n\n // Offset & reflow\n offset: 0,\n reflow: false,\n\n // Event support\n events: true,\n };\n\n //\n // Methods\n //\n\n /**\n * Merge two or more objects together.\n * @param {Object} objects The objects to merge together\n * @returns {Object} Merged values of defaults and options\n */\n var extend = function () {\n var merged = {};\n Array.prototype.forEach.call(arguments, function (obj) {\n for (var key in obj) {\n if (!obj.hasOwnProperty(key)) return;\n merged[key] = obj[key];\n }\n });\n return merged;\n };\n\n /**\n * Emit a custom event\n * @param {String} type The event type\n * @param {Node} elem The element to attach the event to\n * @param {Object} detail Any details to pass along with the event\n */\n var emitEvent = function (type, elem, detail) {\n // Make sure events are enabled\n if (!detail.settings.events) return;\n\n // Create a new event\n var event = new CustomEvent(type, {\n bubbles: true,\n cancelable: true,\n detail: detail,\n });\n\n // Dispatch the event\n elem.dispatchEvent(event);\n };\n\n /**\n * Get an element's distance from the top of the Document.\n * @param {Node} elem The element\n * @return {Number} Distance from the top in pixels\n */\n var getOffsetTop = function (elem) {\n var location = 0;\n if (elem.offsetParent) {\n while (elem) {\n location += elem.offsetTop;\n elem = elem.offsetParent;\n }\n }\n return location >= 0 ? location : 0;\n };\n\n /**\n * Sort content from first to last in the DOM\n * @param {Array} contents The content areas\n */\n var sortContents = function (contents) {\n if (contents) {\n contents.sort(function (item1, item2) {\n var offset1 = getOffsetTop(item1.content);\n var offset2 = getOffsetTop(item2.content);\n if (offset1 < offset2) return -1;\n return 1;\n });\n }\n };\n\n /**\n * Get the offset to use for calculating position\n * @param {Object} settings The settings for this instantiation\n * @return {Float} The number of pixels to offset the calculations\n */\n var getOffset = function (settings) {\n // if the offset is a function run it\n if (typeof settings.offset === \"function\") {\n return parseFloat(settings.offset());\n }\n\n // Otherwise, return it as-is\n return parseFloat(settings.offset);\n };\n\n /**\n * Get the document element's height\n * @private\n * @returns {Number}\n */\n var getDocumentHeight = function () {\n return Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight,\n document.body.offsetHeight,\n document.documentElement.offsetHeight,\n document.body.clientHeight,\n document.documentElement.clientHeight,\n );\n };\n\n /**\n * Determine if an element is in view\n * @param {Node} elem The element\n * @param {Object} settings The settings for this instantiation\n * @param {Boolean} bottom If true, check if element is above bottom of viewport instead\n * @return {Boolean} Returns true if element is in the viewport\n */\n var isInView = function (elem, settings, bottom) {\n var bounds = elem.getBoundingClientRect();\n var offset = getOffset(settings);\n if (bottom) {\n return (\n parseInt(bounds.bottom, 10) <\n (window.innerHeight || document.documentElement.clientHeight)\n );\n }\n return parseInt(bounds.top, 10) <= offset;\n };\n\n /**\n * Check if at the bottom of the viewport\n * @return {Boolean} If true, page is at the bottom of the viewport\n */\n var isAtBottom = function () {\n if (\n Math.ceil(window.innerHeight + window.pageYOffset) >=\n getDocumentHeight()\n )\n return true;\n return false;\n };\n\n /**\n * Check if the last item should be used (even if not at the top of the page)\n * @param {Object} item The last item\n * @param {Object} settings The settings for this instantiation\n * @return {Boolean} If true, use the last item\n */\n var useLastItem = function (item, settings) {\n if (isAtBottom() && isInView(item.content, settings, true)) return true;\n return false;\n };\n\n /**\n * Get the active content\n * @param {Array} contents The content areas\n * @param {Object} settings The settings for this instantiation\n * @return {Object} The content area and matching navigation link\n */\n var getActive = function (contents, settings) {\n var last = contents[contents.length - 1];\n if (useLastItem(last, settings)) return last;\n for (var i = contents.length - 1; i >= 0; i--) {\n if (isInView(contents[i].content, settings)) return contents[i];\n }\n };\n\n /**\n * Deactivate parent navs in a nested navigation\n * @param {Node} nav The starting navigation element\n * @param {Object} settings The settings for this instantiation\n */\n var deactivateNested = function (nav, settings) {\n // If nesting isn't activated, bail\n if (!settings.nested || !nav.parentNode) return;\n\n // Get the parent navigation\n var li = nav.parentNode.closest(\"li\");\n if (!li) return;\n\n // Remove the active class\n li.classList.remove(settings.nestedClass);\n\n // Apply recursively to any parent navigation elements\n deactivateNested(li, settings);\n };\n\n /**\n * Deactivate a nav and content area\n * @param {Object} items The nav item and content to deactivate\n * @param {Object} settings The settings for this instantiation\n */\n var deactivate = function (items, settings) {\n // Make sure there are items to deactivate\n if (!items) return;\n\n // Get the parent list item\n var li = items.nav.closest(\"li\");\n if (!li) return;\n\n // Remove the active class from the nav and content\n li.classList.remove(settings.navClass);\n items.content.classList.remove(settings.contentClass);\n\n // Deactivate any parent navs in a nested navigation\n deactivateNested(li, settings);\n\n // Emit a custom event\n emitEvent(\"gumshoeDeactivate\", li, {\n link: items.nav,\n content: items.content,\n settings: settings,\n });\n };\n\n /**\n * Activate parent navs in a nested navigation\n * @param {Node} nav The starting navigation element\n * @param {Object} settings The settings for this instantiation\n */\n var activateNested = function (nav, settings) {\n // If nesting isn't activated, bail\n if (!settings.nested) return;\n\n // Get the parent navigation\n var li = nav.parentNode.closest(\"li\");\n if (!li) return;\n\n // Add the active class\n li.classList.add(settings.nestedClass);\n\n // Apply recursively to any parent navigation elements\n activateNested(li, settings);\n };\n\n /**\n * Activate a nav and content area\n * @param {Object} items The nav item and content to activate\n * @param {Object} settings The settings for this instantiation\n */\n var activate = function (items, settings) {\n // Make sure there are items to activate\n if (!items) return;\n\n // Get the parent list item\n var li = items.nav.closest(\"li\");\n if (!li) return;\n\n // Add the active class to the nav and content\n li.classList.add(settings.navClass);\n items.content.classList.add(settings.contentClass);\n\n // Activate any parent navs in a nested navigation\n activateNested(li, settings);\n\n // Emit a custom event\n emitEvent(\"gumshoeActivate\", li, {\n link: items.nav,\n content: items.content,\n settings: settings,\n });\n };\n\n /**\n * Create the Constructor object\n * @param {String} selector The selector to use for navigation items\n * @param {Object} options User options and settings\n */\n var Constructor = function (selector, options) {\n //\n // Variables\n //\n\n var publicAPIs = {};\n var navItems, contents, current, timeout, settings;\n\n //\n // Methods\n //\n\n /**\n * Set variables from DOM elements\n */\n publicAPIs.setup = function () {\n // Get all nav items\n navItems = document.querySelectorAll(selector);\n\n // Create contents array\n contents = [];\n\n // Loop through each item, get it's matching content, and push to the array\n Array.prototype.forEach.call(navItems, function (item) {\n // Get the content for the nav item\n var content = document.getElementById(\n decodeURIComponent(item.hash.substr(1)),\n );\n if (!content) return;\n\n // Push to the contents array\n contents.push({\n nav: item,\n content: content,\n });\n });\n\n // Sort contents by the order they appear in the DOM\n sortContents(contents);\n };\n\n /**\n * Detect which content is currently active\n */\n publicAPIs.detect = function () {\n // Get the active content\n var active = getActive(contents, settings);\n\n // if there's no active content, deactivate and bail\n if (!active) {\n if (current) {\n deactivate(current, settings);\n current = null;\n }\n return;\n }\n\n // If the active content is the one currently active, do nothing\n if (current && active.content === current.content) return;\n\n // Deactivate the current content and activate the new content\n deactivate(current, settings);\n activate(active, settings);\n\n // Update the currently active content\n current = active;\n };\n\n /**\n * Detect the active content on scroll\n * Debounced for performance\n */\n var scrollHandler = function (event) {\n // If there's a timer, cancel it\n if (timeout) {\n window.cancelAnimationFrame(timeout);\n }\n\n // Setup debounce callback\n timeout = window.requestAnimationFrame(publicAPIs.detect);\n };\n\n /**\n * Update content sorting on resize\n * Debounced for performance\n */\n var resizeHandler = function (event) {\n // If there's a timer, cancel it\n if (timeout) {\n window.cancelAnimationFrame(timeout);\n }\n\n // Setup debounce callback\n timeout = window.requestAnimationFrame(function () {\n sortContents(contents);\n publicAPIs.detect();\n });\n };\n\n /**\n * Destroy the current instantiation\n */\n publicAPIs.destroy = function () {\n // Undo DOM changes\n if (current) {\n deactivate(current, settings);\n }\n\n // Remove event listeners\n window.removeEventListener(\"scroll\", scrollHandler, false);\n if (settings.reflow) {\n window.removeEventListener(\"resize\", resizeHandler, false);\n }\n\n // Reset variables\n contents = null;\n navItems = null;\n current = null;\n timeout = null;\n settings = null;\n };\n\n /**\n * Initialize the current instantiation\n */\n var init = function () {\n // Merge user options into defaults\n settings = extend(defaults, options || {});\n\n // Setup variables based on the current DOM\n publicAPIs.setup();\n\n // Find the currently active content\n publicAPIs.detect();\n\n // Setup event listeners\n window.addEventListener(\"scroll\", scrollHandler, false);\n if (settings.reflow) {\n window.addEventListener(\"resize\", resizeHandler, false);\n }\n };\n\n //\n // Initialize and return the public APIs\n //\n\n init();\n return publicAPIs;\n };\n\n //\n // Return the Constructor\n //\n\n return Constructor;\n },\n);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import Gumshoe from \"./gumshoe-patched.js\";\n\n////////////////////////////////////////////////////////////////////////////////\n// Scroll Handling\n////////////////////////////////////////////////////////////////////////////////\nvar tocScroll = null;\nvar header = null;\nvar lastScrollTop = window.pageYOffset || document.documentElement.scrollTop;\nconst GO_TO_TOP_OFFSET = 64;\n\nfunction scrollHandlerForHeader() {\n if (Math.floor(header.getBoundingClientRect().top) == 0) {\n header.classList.add(\"scrolled\");\n } else {\n header.classList.remove(\"scrolled\");\n }\n}\n\nfunction scrollHandlerForBackToTop(positionY) {\n if (positionY < GO_TO_TOP_OFFSET) {\n document.documentElement.classList.remove(\"show-back-to-top\");\n } else {\n if (positionY < lastScrollTop) {\n document.documentElement.classList.add(\"show-back-to-top\");\n } else if (positionY > lastScrollTop) {\n document.documentElement.classList.remove(\"show-back-to-top\");\n }\n }\n lastScrollTop = positionY;\n}\n\nfunction scrollHandlerForTOC(positionY) {\n if (tocScroll === null) {\n return;\n }\n\n // top of page.\n if (positionY == 0) {\n tocScroll.scrollTo(0, 0);\n } else if (\n // bottom of page.\n Math.ceil(positionY) >=\n Math.floor(document.documentElement.scrollHeight - window.innerHeight)\n ) {\n tocScroll.scrollTo(0, tocScroll.scrollHeight);\n } else {\n // somewhere in the middle.\n const current = document.querySelector(\".scroll-current\");\n if (current == null) {\n return;\n }\n\n // https://github.com/pypa/pip/issues/9159 This breaks scroll behaviours.\n // // scroll the currently \"active\" heading in toc, into view.\n // const rect = current.getBoundingClientRect();\n // if (0 > rect.top) {\n // current.scrollIntoView(true); // the argument is \"alignTop\"\n // } else if (rect.bottom > window.innerHeight) {\n // current.scrollIntoView(false);\n // }\n }\n}\n\nfunction scrollHandler(positionY) {\n scrollHandlerForHeader();\n scrollHandlerForBackToTop(positionY);\n scrollHandlerForTOC(positionY);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Theme Toggle\n////////////////////////////////////////////////////////////////////////////////\nfunction setTheme(mode) {\n if (mode !== \"light\" && mode !== \"dark\" && mode !== \"auto\") {\n console.error(`Got invalid theme mode: ${mode}. Resetting to auto.`);\n mode = \"auto\";\n }\n\n document.body.dataset.theme = mode;\n localStorage.setItem(\"theme\", mode);\n console.log(`Changed to ${mode} mode.`);\n}\n\nfunction cycleThemeOnce() {\n const currentTheme = localStorage.getItem(\"theme\") || \"auto\";\n const prefersDark = window.matchMedia(\"(prefers-color-scheme: dark)\").matches;\n\n if (prefersDark) {\n // Auto (dark) -> Light -> Dark\n if (currentTheme === \"auto\") {\n setTheme(\"light\");\n } else if (currentTheme == \"light\") {\n setTheme(\"dark\");\n } else {\n setTheme(\"auto\");\n }\n } else {\n // Auto (light) -> Dark -> Light\n if (currentTheme === \"auto\") {\n setTheme(\"dark\");\n } else if (currentTheme == \"dark\") {\n setTheme(\"light\");\n } else {\n setTheme(\"auto\");\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Setup\n////////////////////////////////////////////////////////////////////////////////\nfunction setupScrollHandler() {\n // Taken from https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event\n let last_known_scroll_position = 0;\n let ticking = false;\n\n window.addEventListener(\"scroll\", function (e) {\n last_known_scroll_position = window.scrollY;\n\n if (!ticking) {\n window.requestAnimationFrame(function () {\n scrollHandler(last_known_scroll_position);\n ticking = false;\n });\n\n ticking = true;\n }\n });\n window.scroll();\n}\n\nfunction setupScrollSpy() {\n if (tocScroll === null) {\n return;\n }\n\n // Scrollspy -- highlight table on contents, based on scroll\n new Gumshoe(\".toc-tree a\", {\n reflow: true,\n recursive: true,\n navClass: \"scroll-current\",\n offset: () => {\n let rem = parseFloat(getComputedStyle(document.documentElement).fontSize);\n return header.getBoundingClientRect().height + 0.5 * rem + 1;\n },\n });\n}\n\nfunction setupTheme() {\n // Attach event handlers for toggling themes\n const buttons = document.getElementsByClassName(\"theme-toggle\");\n Array.from(buttons).forEach((btn) => {\n btn.addEventListener(\"click\", cycleThemeOnce);\n });\n}\n\nfunction setup() {\n setupTheme();\n setupScrollHandler();\n setupScrollSpy();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Main entrypoint\n////////////////////////////////////////////////////////////////////////////////\nfunction main() {\n document.body.parentNode.classList.remove(\"no-js\");\n\n header = document.querySelector(\"header\");\n tocScroll = document.querySelector(\".toc-scroll\");\n\n setup();\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", main);\n"],"names":["root","g","window","this","defaults","navClass","contentClass","nested","nestedClass","offset","reflow","events","emitEvent","type","elem","detail","settings","event","CustomEvent","bubbles","cancelable","dispatchEvent","getOffsetTop","location","offsetParent","offsetTop","sortContents","contents","sort","item1","item2","content","isInView","bottom","bounds","getBoundingClientRect","parseFloat","getOffset","parseInt","innerHeight","document","documentElement","clientHeight","top","isAtBottom","Math","ceil","pageYOffset","max","body","scrollHeight","offsetHeight","getActive","last","length","item","useLastItem","i","deactivateNested","nav","parentNode","li","closest","classList","remove","deactivate","items","link","activateNested","add","selector","options","navItems","current","timeout","publicAPIs","querySelectorAll","Array","prototype","forEach","call","getElementById","decodeURIComponent","hash","substr","push","active","activate","scrollHandler","cancelAnimationFrame","requestAnimationFrame","detect","resizeHandler","destroy","removeEventListener","merged","arguments","obj","key","hasOwnProperty","extend","setup","addEventListener","factory","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","globalThis","Function","e","prop","tocScroll","header","lastScrollTop","scrollTop","cycleThemeOnce","currentTheme","localStorage","getItem","mode","matchMedia","matches","console","error","dataset","theme","setItem","log","buttons","getElementsByClassName","from","btn","setupTheme","last_known_scroll_position","ticking","scrollY","positionY","floor","scrollHandlerForBackToTop","scrollTo","querySelector","scrollHandlerForTOC","scroll","setupScrollHandler","recursive","rem","getComputedStyle","fontSize","height"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/html/_static/searchtools.js b/docs/html/_static/searchtools.js index 261ecaa..97d56a7 100644 --- a/docs/html/_static/searchtools.js +++ b/docs/html/_static/searchtools.js @@ -4,22 +4,24 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ +"use strict"; -if (!Scorer) { - /** - * Simple result scoring code. - */ +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { var Scorer = { // Implement the following function to further tweak the score for each result - // The function takes a result array [filename, title, anchor, descr, score] + // The function takes a result array [docname, title, anchor, descr, score, filename] // and returns the new score. /* - score: function(result) { - return result[4]; + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score }, */ @@ -28,9 +30,11 @@ if (!Scorer) { // or matches in the last dotted part of the object name objPartialMatch: 6, // Additive scores depending on the priority of the object - objPrio: {0: 15, // used to be importantResults - 1: 5, // used to be objectResults - 2: -5}, // used to be unimportantResults + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, // Used when the priority is not in the mapping. objPrioDefault: 0, @@ -39,444 +43,495 @@ if (!Scorer) { partialTitle: 7, // query found in terms term: 5, - partialTerm: 2 + partialTerm: 2, }; } -if (!splitQuery) { - function splitQuery(query) { - return query.split(/\s+/); +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = docUrlRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = docUrlRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms) + ); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + `Search finished, found ${resultCount} page(s) matching the search query.` + ); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms), + 5 + ); } + // search finished, update title and status message + else _finishSearch(resultCount); +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings } /** * Search Module */ -var Search = { - - _index : null, - _queued_query : null, - _pulse_status : -1, - - htmlToText : function(htmlString) { - var virtualDocument = document.implementation.createHTMLDocument('virtual'); - var htmlElement = $(htmlString, virtualDocument); - htmlElement.find('.headerlink').remove(); - docContent = htmlElement.find('[role=main]')[0]; - if(docContent === undefined) { - console.warn("Content block not found. Sphinx search tries to obtain it " + - "via '[role=main]'. Could you check your theme or template."); - return ""; - } - return docContent.textContent || docContent.innerText; +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent !== undefined) return docContent.textContent; + console.warn( + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + ); + return ""; }, - init : function() { - var params = $.getQueryParameters(); - if (params.q) { - var query = params.q[0]; - $('input[name="q"]')[0].value = query; - this.performSearch(query); - } + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); }, - loadIndex : function(url) { - $.ajax({type: "GET", url: url, data: null, - dataType: "script", cache: true, - complete: function(jqxhr, textstatus) { - if (textstatus != "success") { - document.getElementById("searchindexloader").src = url; - } - }}); - }, + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), - setIndex : function(index) { - var q; - this._index = index; - if ((q = this._queued_query) !== null) { - this._queued_query = null; - Search.query(q); + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); } }, - hasIndex : function() { - return this._index !== null; - }, + hasIndex: () => Search._index !== null, - deferQuery : function(query) { - this._queued_query = query; - }, + deferQuery: (query) => (Search._queued_query = query), - stopPulse : function() { - this._pulse_status = 0; - }, + stopPulse: () => (Search._pulse_status = -1), - startPulse : function() { - if (this._pulse_status >= 0) - return; - function pulse() { - var i; + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { Search._pulse_status = (Search._pulse_status + 1) % 4; - var dotString = ''; - for (i = 0; i < Search._pulse_status; i++) - dotString += '.'; - Search.dots.text(dotString); - if (Search._pulse_status > -1) - window.setTimeout(pulse, 500); - } + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; pulse(); }, /** * perform a search for something (or wait until index is loaded) */ - performSearch : function(query) { + performSearch: (query) => { // create the required interface elements - this.out = $('#search-results'); - this.title = $('

' + _('Searching') + '

').appendTo(this.out); - this.dots = $('').appendTo(this.title); - this.status = $('

 

').appendTo(this.out); - this.output = $(' - - -
- -
-
- -
-

HistoryΒΆ

-
-

0.1.0 (2020-11-13)ΒΆ

+
+ +
+ +
+
+
+

History#

+
+

0.1.0 (2020-11-13)#

  • First release on PyPI.

-
-
- + + -
- + + + +
+
+ + On this page + +
+
+
- - - + + + - - - - - - - - - - + + + + + \ No newline at end of file diff --git a/docs/html/index.html b/docs/html/index.html index 09298b2..d1c4771 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -1,172 +1,233 @@ + + + + + + + + + SHaSTA 0.1.0 documentation + + + + + + - - - - + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
- - - - - - -
-
-
-
- -
-

Welcome to shasta’s documentation!ΒΆ

+
+ +
+ +
+
+
+

Welcome to shasta’s documentation!#

-
-
-

Indices and tablesΒΆ

+ +
+

Indices and tables#

-
- + -
- + +
+
- - -
- -
-

- - © Copyright 2020, Hemanth Manjunatha - -

-
- - - - Built with Sphinx using a - - theme - - provided by Read the Docs. - - - -
-
- - - + - - - - - - - - - - + + + + + \ No newline at end of file diff --git a/docs/html/installation.html b/docs/html/installation.html index 2b73097..e99635b 100644 --- a/docs/html/installation.html +++ b/docs/html/installation.html @@ -1,253 +1,323 @@ + + + + + + + + + Installation - SHaSTA 0.1.0 documentation + + + + + + - - - - + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
- - - - - - -
-
-
-
- -
-

InstallationΒΆ

-
-

Stable releaseΒΆ

+
+ +
+ +
+
+
+

Installation#

+
+

Stable release#

To install shasta, run this command in your terminal:

-
$ pip install shasta
+
$ pip install shasta
 

This is the preferred method to install shasta, as it will always install the most recent stable release.

If you don’t have pip installed, this Python installation guide can guide you through the process.

-
-
-

From sourcesΒΆ

+
+
+

From sources#

The sources for shasta can be downloaded from the Github repo.

You can either clone the public repository:

-
$ git clone git://github.com/hemumanju/shasta
-
-
-

Or download the tarball:

-
$ curl -OJL https://github.com/hemumanju/shasta/tarball/master
+
$ git clone git://github.com/hemumanju/shasta
 
-

Once you have a copy of the source, you can install it with:

-
$ python setup.py install
+
$ python setup.py install
 
-
-
- +
+
-
- + +
+
- - -
- -
-

- - © Copyright 2020, Hemanth Manjunatha - -

-
- - - - Built with Sphinx using a - - theme - - provided by Read the Docs. - - +
+
+ + On this page + +
+
- - - + + +
- - - - - - - - - - +
+ + + + \ No newline at end of file diff --git a/docs/html/objects.inv b/docs/html/objects.inv index ec74ebc..f163edc 100644 Binary files a/docs/html/objects.inv and b/docs/html/objects.inv differ diff --git a/docs/html/py-modindex.html b/docs/html/py-modindex.html index dbadb39..a9da302 100644 --- a/docs/html/py-modindex.html +++ b/docs/html/py-modindex.html @@ -1,447 +1,368 @@ + + + + + + + Python Module Index - SHaSTA 0.1.0 documentation + + + + + + - - - - + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
- - - - - - - - - - - - - - - -
- -
+
+
- - - - - -
-
-
-
+ +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
- -

Python Module Index

- -
- _ | - d | - e | - g | - m | - u -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
- _
- __initi__ -
 
- d
- default_actions -
 
- e
- envs -
    - envs.action_manager -
    - envs.agents -
    - envs.agents.control -
    - envs.agents.uav -
    - envs.agents.ugv -
    - envs.agents.utils -
    - envs.base_env -
    - envs.blue_team -
    - envs.blue_team.blue_base -
    - envs.blue_team.utils -
    - envs.enhance_env -
    - envs.interaction_manager -
    - envs.primitive_manager -
    - envs.primitives -
    - envs.primitives.engaging -
    - envs.primitives.engaging.shooting -
    - envs.primitives.formation -
    - envs.primitives.formation.control -
    - envs.primitives.planning -
    - envs.primitives.planning.planners -
    - envs.red_team -
    - envs.red_team.red_base -
    - envs.red_team.utils -
    - envs.sensors -
    - envs.state_manager -
    - envs.utils -
    - envs.utils.interaction -
    - envs.utils.magicattr -
 
- g
- gui -
    - gui.core -
    - gui.core.information -
    - gui.core.obj -
    - gui.core.shape_utils -
    - gui.core.user -
    - gui.core.utils -
    - gui.gui_main -
 
- m
- main -
 
- u
- utils -
- - -
-
-
- - -
- -
-

- - © Copyright 2020, Hemanth Manjunatha - -

-
- - - - Built with Sphinx using a - - theme - - provided by Read the Docs. - -
-
-
- - - + + +
+
- - - - - - - - - - +
+ + + + \ No newline at end of file diff --git a/docs/html/readme.html b/docs/html/readme.html index 488a4b3..785cac3 100644 --- a/docs/html/readme.html +++ b/docs/html/readme.html @@ -1,245 +1,386 @@ + + + + + + + + + Welcome - SHaSTA 0.1.0 documentation + + + + + + - - - - + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
- - - - - - -
-
-
-
- -
-

shastaΒΆ

-https://img.shields.io/pypi/v/shasta.svg -https://img.shields.io/travis/hemumanju/shasta.svg -Documentation Status -

SHaSTA: A simulator for human and swarm team applications.

+
+ +
+ +
+
+
+

Welcome#

+
+

SHaSTA (Simulator for Human and Swarm Team Applications)#

+

Simulator Banner +(Screenshot for illustration purposes only.)

+

Welcome to the SHaSTA! An open-source simulation platform to study human-swarm applications. The platform provides a unified interface for humans and learning algorithms to command/learn swarm robot behaviors. SHaSTA also provides a unique ability to collect physiological information from humans and time synchronize it with swarm simulation.

+
+

Table of Contents#

-
-

FeaturesΒΆ

+
+
+

Features#

    -
  • TODO

  • +
  • Realistic swarm simulation powered by the pybullet.

  • +
  • Human-Swarm Interaction interface.

  • +
  • Physiological signal (EEG, EMG, Eye movement, etc.) collection facility built on lab streaming layer.

  • +
  • OpenAI Gym interface for reinforcement learning experiments.

  • +
  • Highly customizable simulation environment.

  • +
  • Easy-to-use and well-documented codebase.

+
+
+

Installation#

+
    +
  1. Clone this repository to your local machine using:

    +
    git clone https://github.com/ub-nsf-hsi/shasta-ub.git
    +
    +
    -
    -

    CreditsΒΆ

    -

    This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

    +
  2. +
  3. Install the required dependencies:

    +
    pip install -r requirements.txt
    +
    +
  4. +
  5. Configure your XPlane installation and simulator settings as needed.

  6. +
+
+
+

Usage#

+
    +
  1. Launch the simulator by running:

    +
    python main.py
    +
    - - -
- +

If you want to run a particular block of code, replace the skip by run.

+ +
  • Explore the simulation environment, adjust settings, and start flying!

  • + + +
    +

    Contributing#

    +

    We welcome contributions from the community to improve and expand this simulator project. If you’re interested in contributing, please follow our Contribution Guidelines.

    +
    +
    +

    Code of Conduct#

    +

    Please review and adhere to our Code of Conduct when participating in our community. We strive to maintain a respectful and inclusive environment for everyone.

    +
    +
    +

    License#

    +

    This project is licensed under the MIT License, which means you are free to use, modify, and distribute the code in your projects.

    +
    +

    We hope you enjoy using the SHaSTA. Happy flying!

    +
    + + + + +
    +
    - - -
    - -
    -

    - - © Copyright 2020, Hemanth Manjunatha - -

    -
    - - - - Built with Sphinx using a - - theme - - provided by Read the Docs. - - + - - - + + +
    - - - - - - - - - - +
    + + + + \ No newline at end of file diff --git a/docs/html/search.html b/docs/html/search.html index f10c0ac..95f8e13 100644 --- a/docs/html/search.html +++ b/docs/html/search.html @@ -1,227 +1,271 @@ + + + + + + + Search - SHaSTA 0.1.0 documentation + + + + + - - - - + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    +
    + +
    + +
    +
    + +
    - - - - - - - - - - - - - -
    - -
      - -
    • »
    • - -
    • Search
    • - - -
    • +
    +
    +
    + +
    +
    + + Made with Sphinx and @pradyunsg's - - - - - - -
    -
    -
    -
    + Furo + +
    +
    - - - -
    - -
    - -
    -
    -
    - - -
    - -
    -

    - - © Copyright 2020, Hemanth Manjunatha - -

    -
    - - - - Built with Sphinx using a - - theme - - provided by Read the Docs. - -
    -
    -
    - - - + + +
    +
    - - - - - - +
    + + + - - - - - - - - + + + \ No newline at end of file diff --git a/docs/html/searchindex.js b/docs/html/searchindex.js index 946a676..3ce69b0 100644 --- a/docs/html/searchindex.js +++ b/docs/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["autoapi/__initi__/index","autoapi/default_actions/index","autoapi/envs/action_manager/index","autoapi/envs/agents/control/index","autoapi/envs/agents/index","autoapi/envs/agents/uav/index","autoapi/envs/agents/ugv/index","autoapi/envs/agents/utils/index","autoapi/envs/base_env/index","autoapi/envs/blue_team/blue_base/index","autoapi/envs/blue_team/index","autoapi/envs/blue_team/utils/index","autoapi/envs/enhance_env/index","autoapi/envs/index","autoapi/envs/interaction_manager/index","autoapi/envs/primitive_manager/index","autoapi/envs/primitives/engaging/index","autoapi/envs/primitives/engaging/shooting/index","autoapi/envs/primitives/formation/control/index","autoapi/envs/primitives/formation/index","autoapi/envs/primitives/index","autoapi/envs/primitives/planning/index","autoapi/envs/primitives/planning/planners/index","autoapi/envs/red_team/index","autoapi/envs/red_team/red_base/index","autoapi/envs/red_team/utils/index","autoapi/envs/sensors/index","autoapi/envs/state_manager/index","autoapi/envs/utils/index","autoapi/envs/utils/interaction/index","autoapi/envs/utils/magicattr/index","autoapi/gui/core/index","autoapi/gui/core/information/index","autoapi/gui/core/obj/index","autoapi/gui/core/shape_utils/index","autoapi/gui/core/user/index","autoapi/gui/core/utils/index","autoapi/gui/gui_main/index","autoapi/gui/index","autoapi/index","autoapi/main/index","autoapi/utils/index","contributing","history","index","installation","readme","usage"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["autoapi/__initi__/index.rst","autoapi/default_actions/index.rst","autoapi/envs/action_manager/index.rst","autoapi/envs/agents/control/index.rst","autoapi/envs/agents/index.rst","autoapi/envs/agents/uav/index.rst","autoapi/envs/agents/ugv/index.rst","autoapi/envs/agents/utils/index.rst","autoapi/envs/base_env/index.rst","autoapi/envs/blue_team/blue_base/index.rst","autoapi/envs/blue_team/index.rst","autoapi/envs/blue_team/utils/index.rst","autoapi/envs/enhance_env/index.rst","autoapi/envs/index.rst","autoapi/envs/interaction_manager/index.rst","autoapi/envs/primitive_manager/index.rst","autoapi/envs/primitives/engaging/index.rst","autoapi/envs/primitives/engaging/shooting/index.rst","autoapi/envs/primitives/formation/control/index.rst","autoapi/envs/primitives/formation/index.rst","autoapi/envs/primitives/index.rst","autoapi/envs/primitives/planning/index.rst","autoapi/envs/primitives/planning/planners/index.rst","autoapi/envs/red_team/index.rst","autoapi/envs/red_team/red_base/index.rst","autoapi/envs/red_team/utils/index.rst","autoapi/envs/sensors/index.rst","autoapi/envs/state_manager/index.rst","autoapi/envs/utils/index.rst","autoapi/envs/utils/interaction/index.rst","autoapi/envs/utils/magicattr/index.rst","autoapi/gui/core/index.rst","autoapi/gui/core/information/index.rst","autoapi/gui/core/obj/index.rst","autoapi/gui/core/shape_utils/index.rst","autoapi/gui/core/user/index.rst","autoapi/gui/core/utils/index.rst","autoapi/gui/gui_main/index.rst","autoapi/gui/index.rst","autoapi/index.rst","autoapi/main/index.rst","autoapi/utils/index.rst","contributing.rst","history.rst","index.rst","installation.rst","readme.rst","usage.rst"],objects:{"":{__initi__:[0,0,0,"-"],default_actions:[1,0,0,"-"],envs:[13,0,0,"-"],gui:[38,0,0,"-"],main:[40,0,0,"-"],utils:[41,0,0,"-"]},"envs.action_manager":{ActionManager:[2,2,1,""]},"envs.action_manager.ActionManager":{_init_platoons_setup:[2,3,1,""],get_actions:[2,3,1,""],get_allocated_vehicle:[2,3,1,""],perform_action_allocation:[2,3,1,""],primitive_execution:[2,3,1,""]},"envs.agents":{control:[3,0,0,"-"],uav:[5,0,0,"-"],ugv:[6,0,0,"-"],utils:[7,0,0,"-"]},"envs.agents.control":{UaVPDController:[3,2,1,""]},"envs.agents.control.UaVPDController":{compute_torque:[3,3,1,""]},"envs.agents.uav":{UaV:[5,2,1,""]},"envs.agents.uav.UaV":{_initial_setup:[5,3,1,""],get_image:[5,3,1,""],get_info:[5,3,1,""],get_pos_and_orientation:[5,3,1,""],remove_self:[5,3,1,""],reset:[5,3,1,""],set_position:[5,3,1,""]},"envs.agents.ugv":{UgV:[6,2,1,""]},"envs.agents.ugv.UgV":{_initial_setup:[6,3,1,""],get_image:[6,3,1,""],get_info:[6,3,1,""],get_pos_and_orientation:[6,3,1,""],remove_self:[6,3,1,""],reset:[6,3,1,""],set_position:[6,3,1,""]},"envs.agents.utils":{rotation_matrix:[7,1,1,""],transformation_matrix:[7,1,1,""]},"envs.base_env":{BaseEnv:[8,2,1,""]},"envs.base_env.BaseEnv":{base_env_simulation_reset:[8,3,1,""],base_env_step:[8,3,1,""]},"envs.blue_team":{blue_base:[9,0,0,"-"],utils:[11,0,0,"-"]},"envs.blue_team.blue_base":{BlueTeam:[9,2,1,""],get_initial_positions:[9,1,1,""]},"envs.blue_team.blue_base.BlueTeam":{_initial_uxv_setup:[9,3,1,""],execute:[9,3,1,""],get_attributes:[9,3,1,""],reset:[9,3,1,""]},"envs.blue_team.utils":{async_func:[11,1,1,""]},"envs.enhance_env":{EnhanceEnv:[12,2,1,""]},"envs.enhance_env.EnhanceEnv":{_initial_team_setup:[12,3,1,""],check_episode_done:[12,3,1,""],get_reward:[12,3,1,""],reset:[12,3,1,""],step:[12,3,1,""]},"envs.interaction_manager":{InteractionManager:[14,2,1,""]},"envs.interaction_manager.InteractionManager":{_set_action:[14,3,1,""],action_lookup_string:[14,3,1,""],get_action:[14,3,1,""],get_team_position:[14,3,1,""],set_action:[14,3,1,""],update_action:[14,3,1,""],update_actions:[14,3,1,""]},"envs.primitive_manager":{PrimitiveManager:[15,2,1,""]},"envs.primitive_manager.PrimitiveManager":{allocate_action:[15,3,1,""],execute_primitive:[15,3,1,""],formation_primitive:[15,3,1,""],get_centroid:[15,3,1,""],make_vehicles_idle:[15,3,1,""],make_vehicles_nonidle:[15,3,1,""],planning_primitive:[15,3,1,""],plot_path:[15,3,1,""],shooting_primitive:[15,3,1,""]},"envs.primitives":{engaging:[16,0,0,"-"],formation:[19,0,0,"-"],planning:[21,0,0,"-"]},"envs.primitives.engaging":{shooting:[17,0,0,"-"]},"envs.primitives.engaging.shooting":{Shooting:[17,2,1,""]},"envs.primitives.engaging.shooting.Shooting":{shoot:[17,3,1,""],shoot_original:[17,3,1,""]},"envs.primitives.formation":{control:[18,0,0,"-"]},"envs.primitives.formation.control":{FormationControl:[18,2,1,""]},"envs.primitives.formation.control.FormationControl":{calculate_vel:[18,3,1,""],execute:[18,3,1,""]},"envs.primitives.planning":{planners:[22,0,0,"-"]},"envs.primitives.planning.planners":{PathPlanning:[22,2,1,""]},"envs.primitives.planning.planners.PathPlanning":{convert_to_lat_lon:[22,3,1,""],find_homogenous_affine_transformation:[22,3,1,""],find_path:[22,3,1,""],linear_refine_implicit:[22,3,1,""]},"envs.red_team":{red_base:[24,0,0,"-"],utils:[25,0,0,"-"]},"envs.red_team.red_base":{RedTeam:[24,2,1,""],get_initial_positions:[24,1,1,""]},"envs.red_team.red_base.RedTeam":{_initial_uxv_setup:[24,3,1,""],execute:[24,3,1,""],get_attributes:[24,3,1,""],reset:[24,3,1,""]},"envs.red_team.utils":{async_func:[25,1,1,""]},"envs.sensors":{Sensors:[26,2,1,""]},"envs.sensors.Sensors":{get_camera_image:[26,3,1,""],ray_cast:[26,3,1,""]},"envs.state_manager":{StateManager:[27,2,1,""]},"envs.state_manager.StateManager":{_affine_transformation_and_graph:[27,3,1,""],_initial_buildings_setup:[27,3,1,""],_initial_mission_setup:[27,3,1,""],_initial_target_setup:[27,3,1,""],_initial_uxv:[27,3,1,""],building_info:[27,3,1,""],get_image:[27,3,1,""],get_states:[27,3,1,""],node_info:[27,3,1,""]},"envs.utils":{interaction:[29,0,0,"-"],magicattr:[30,0,0,"-"]},"envs.utils.interaction":{check_perimeter:[29,1,1,""],findkeys:[29,1,1,""]},"envs.utils.magicattr":{"delete":[30,1,1,""],_AST_TYPES:[30,4,1,""],_STRING_TYPE:[30,4,1,""],_lookup:[30,1,1,""],_lookup_subscript_value:[30,1,1,""],_parse:[30,1,1,""],get:[30,1,1,""],lookup:[30,1,1,""],set:[30,1,1,""]},"gui.core":{information:[32,0,0,"-"],obj:[33,0,0,"-"],shape_utils:[34,0,0,"-"],user:[35,0,0,"-"],utils:[36,0,0,"-"]},"gui.core.information":{ImageView:[32,2,1,""],Text:[32,2,1,""],Timer:[32,2,1,""]},"gui.core.information.ImageView":{prepare_projection:[32,3,1,""],update:[32,3,1,""]},"gui.core.information.Text":{prepare_projection:[32,3,1,""],reset:[32,3,1,""],update:[32,3,1,""]},"gui.core.information.Timer":{prepare_projection:[32,3,1,""],reset:[32,3,1,""],update:[32,3,1,""]},"gui.core.obj":{Obj:[33,2,1,""],lightfv:[33,4,1,""]},"gui.core.obj.Obj":{apply_transformation:[33,3,1,""],convert_to_obj_coordinates:[33,3,1,""],do_draw:[33,3,1,""],on_key_press:[33,3,1,""],on_mouse_drag:[33,3,1,""],on_mouse_release:[33,3,1,""],on_mouse_scroll:[33,3,1,""],pan_rotate:[33,3,1,""],prepare_projection:[33,3,1,""],update:[33,3,1,""]},"gui.core.shape_utils":{BaseObject:[34,2,1,""],Circle:[34,2,1,""],Cube:[34,2,1,""],Point2d:[34,2,1,""],Rectangle:[34,2,1,""],Sphere:[34,2,1,""],create_window:[34,1,1,""],lightfv:[34,4,1,""]},"gui.core.shape_utils.BaseObject":{before_draw:[34,3,1,""],enable_lightning:[34,3,1,""]},"gui.core.shape_utils.Circle":{draw:[34,3,1,""]},"gui.core.shape_utils.Cube":{draw:[34,3,1,""]},"gui.core.shape_utils.Rectangle":{bottom:[34,3,1,""],draw:[34,3,1,""],left:[34,3,1,""],right:[34,3,1,""],top:[34,3,1,""]},"gui.core.shape_utils.Sphere":{draw:[34,3,1,""]},"gui.core.user":{User:[35,2,1,""]},"gui.core.user.User":{do_claim:[35,3,1,""],draw:[35,3,1,""],on_key_press:[35,3,1,""],on_key_release:[35,3,1,""],on_mouse_drag:[35,3,1,""],on_mouse_motion:[35,3,1,""],on_mouse_press:[35,3,1,""],on_mouse_release:[35,3,1,""],on_mouse_scroll:[35,3,1,""]},"gui.core.utils":{ViewPort:[36,2,1,""],create_window:[36,1,1,""],lightfv:[36,4,1,""]},"gui.core.utils.ViewPort":{get_origin:[36,3,1,""],get_size:[36,3,1,""],is_inside:[36,3,1,""],set_viewport:[36,3,1,""],setup_bounding_box:[36,3,1,""]},"gui.gui_main":{MainGUI:[37,2,1,""],get_layout:[37,1,1,""]},"gui.gui_main.MainGUI":{on_close:[37,3,1,""],push_events:[37,3,1,""],run:[37,3,1,""]},"utils.ColorPrint":{print_run:[41,3,1,""],print_skip:[41,3,1,""],print_warn:[41,3,1,""]},default_actions:{blue_team_actions:[1,1,1,""],initial_nodes_setup:[1,1,1,""],red_team_actions:[1,1,1,""]},envs:{action_manager:[2,0,0,"-"],agents:[4,0,0,"-"],base_env:[8,0,0,"-"],blue_team:[10,0,0,"-"],enhance_env:[12,0,0,"-"],interaction_manager:[14,0,0,"-"],primitive_manager:[15,0,0,"-"],primitives:[20,0,0,"-"],red_team:[23,0,0,"-"],sensors:[26,0,0,"-"],state_manager:[27,0,0,"-"],utils:[28,0,0,"-"]},gui:{core:[31,0,0,"-"],gui_main:[37,0,0,"-"]},main:{config:[40,4,1,""],config_path:[40,4,1,""],default_blue_actions:[40,4,1,""],gui:[40,4,1,""]},utils:{ColorPrint:[41,2,1,""],SkipWith:[41,5,1,""],skip_run:[41,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","data","Python data"],"5":["py","exception","Python exception"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method","4":"py:data","5":"py:exception"},terms:{"2018":30,"2019":18,"2020":44,"3x3":7,"abstract":26,"default":[22,37],"final":30,"float":[18,37],"function":[5,6,22,42],"import":47,"int":[2,22,27],"new":42,"public":45,"return":[2,5,6,7,18,22,26,27,29,30,34,41],"static":41,"while":37,The:[2,5,6,22,27,30,37,42,45],Then:42,__initi__:[39,44],_affine_transformation_and_graph:27,_ast_typ:30,_init_platoons_setup:2,_initial_buildings_setup:27,_initial_mission_setup:27,_initial_setup:[5,6],_initial_target_setup:27,_initial_team_setup:12,_initial_uxv:27,_initial_uxv_setup:[9,24],_lookup:30,_lookup_subscript_valu:30,_pars:30,_set_act:14,_string_typ:30,aarrai:18,about:[5,6,7,27,42],access:37,accord:37,acquir:27,action:[2,14,15,24,30],action_lookup_str:14,action_manag:[13,39],actionmanag:2,actions_uav:2,actions_ugv:2,add:42,addit:22,affin:22,agent:[12,13,18,27,39],all:[2,5,6,9,12,18,24,27,37,41,42],all_drones_po:18,alloc:2,allocate_act:15,allow:37,alwai:[42,45],angl:[5,6],angular:7,ani:[30,42],anyth:42,api:44,appear:37,applic:[37,46],apply_transform:33,appreci:42,appropri:37,apurvakumar:18,area:37,arg:7,arrai:[2,5,6,7,18,22,26,27,29],articl:42,assign:2,assum:42,ast:30,async_func:[11,25],attr:30,attribut:[2,9,24,30],attricut:2,audreyr:46,auto:39,autoapi:39,axi:7,back:[5,6],bar:37,base:[2,3,5,6,8,9,12,14,15,17,18,22,24,26,34,36,37,41],base_env:[12,13,39],base_env_simulation_reset:8,base_env_step:8,baseenv:[8,12],baseobject:34,befor:[30,34,42],before_draw:34,being:2,belong:27,best:42,between:[22,30],bit:42,block:41,blog:42,blue:29,blue_act:[12,14],blue_bas:[10,13,39],blue_team:[13,14,39],blue_team_act:1,blue_team_po:29,blueteam:9,bool:[2,30],borderless:37,bottom:34,branch:42,bugfix:42,build:27,building_info:27,bump2vers:42,button:[33,35,37],calcul:[7,18],calculate_vel:18,call:37,camera:[5,6,26],can:[37,42,45],cartesian:[22,27],cartesian_po:9,cartesian:22,centroid:[2,15,18,29],centroid_po:18,chang:42,check:[29,30,42],check_episode_don:12,check_perimet:29,checkout:42,circl:34,client:37,clone:[42,45],close:37,code:[2,18,41],color:34,colorprint:41,com:[42,45],combin:30,command:45,commit:42,common:41,compute_torqu:3,config:[1,5,6,8,9,12,14,22,24,27,29,37,40],config_path:40,configur:22,consecut:22,constraint:[5,6],contain:[2,5,6,18,27,29,39],content:44,context:37,contribut:44,control:[4,13,19,20,37,39],convent:37,convers:27,convert:22,convert_to_lat_lon:22,convert_to_obj_coordin:33,cookiecutt:46,coordin:22,copi:[42,45],copyright:30,core:[38,39],correspond:26,could:42,creat:[30,39,42,46],create_window:[34,36],credit:[42,44],cube:34,curl:45,current:[18,37],current_orin:3,current_po:3,current_tim:27,current_z_vel:3,date:18,decod:2,decor:37,default_act:[39,44],default_blue_act:40,delattr:30,delet:30,depend:[2,18],deploi:44,depth:[26,27],descript:42,desired_acc:3,desired_po:3,desired_vel:3,detail:42,develop:42,dict:[2,5,6,27,30],dictionari:[2,5,6,27,29],dimens:[22,34],distanc:[14,17,18],distribut:30,do_claim:35,do_draw:33,doc:42,docstr:42,document:[39,46],doing:30,don:45,done:[30,37,42],download:45,draw:[34,35],drawn:34,driven:42,durat:18,dynamic_properti:3,each:[2,22],easier:42,either:[2,45],empyt:2,enable_lightn:34,end:[22,34,41],engag:[13,20,39],enhanc:42,enhance_env:[13,39],enhanceenv:12,ensur:37,entir:37,entri:42,env:[39,44],environ:9,etc:27,even:42,everi:42,exampl:[2,37],except:41,execut:[2,9,15,18,24],execute_primit:15,exit:41,explain:42,extract:2,fals:[34,37],featur:44,file:[22,30,42],fill:37,find:22,find_homogenous_affine_transform:22,find_path:22,findkei:29,first:[37,43],flag:41,flake8:42,floor:27,fork:42,format:[13,15,20,39],formation_primit:15,formation_typ:18,formationcontrol:18,former:30,frame:37,free:46,from:[2,18,22,27,44],full:30,fullscreen:37,gener:[22,39],get:[5,6,15,18,26,27,30,44],get_act:[2,14],get_allocated_vehicl:2,get_attribut:[9,24],get_camera_imag:26,get_centroid:15,get_imag:[5,6,27],get_info:[5,6],get_initial_posit:[9,24],get_layout:37,get_origin:36,get_pos_and_orient:[5,6],get_reward:12,get_siz:36,get_stat:27,get_team_posit:14,getattr:30,git:[42,45],github:[42,45],given:[2,5,6,22,30,42],goal:27,graph:22,great:22,greatli:42,grid:27,group:18,gui:[39,40,44],gui_main:[38,39],guid:45,guidelin:44,hand:2,hand_cod:2,handl:37,handler:37,have:[37,42,45],heavyweight:37,height:[34,36,37],help:42,hemumanju:[42,45],here:42,higher:22,histori:[42,44],how:42,http:[42,45,46],human:46,idl:15,idx:27,imag:[5,6,22,26,27],image_typ:[5,6,26,27],imageview:32,implement:22,includ:[37,42],independ:37,index:[30,44],inform:[5,6,27,31,38,39],init_orient:[5,6],init_po:[5,6,24],initi:[1,2,5,6,27],initial_nodes_setup:1,input:[2,22],insert:22,instal:[42,44],instanc:[2,18],instead:30,interact:[13,28,39],interaction_manag:[13,39],interactionmanag:14,intermedi:22,interplo:22,is_insid:36,issu:42,item:34,its:[5,6],jairu:30,jani:18,june:30,just:42,kd_tran:3,keep:42,kei:[2,14,30],kind:[5,6],kp_rot:3,kp_tran:3,lat:[22,27],lat_lon:22,left:34,licens:[30,46],lightfv:[33,34,36],like:30,linear_refine_implicit:22,list:[2,18,29,30,42],littl:42,local:[37,42],locat:37,lon:[22,27],look:42,lookup:30,lower:34,magicattr:[13,28,39],mai:37,main:[39,44],maingui:37,maintain:42,major:42,make:[15,37,42],make_vehicles_idl:15,make_vehicles_nonidl:15,manag:2,mani:42,map:27,martin:30,mask:29,master:45,matrix:7,maximum:18,meet:42,member:2,messag:41,method:45,might:42,minim:37,minor:42,mit:[30,46],mkvirtualenv:42,modifi:[33,35],modul:44,more:42,most:45,move:[5,6],must:37,n_blue_team:14,n_red_team:14,n_split:22,n_team_blu:17,n_team_r:17,n_vehicl:2,name:[2,30,42],narrow:42,ndarrai:22,need:[30,37],nest:30,next:18,next_po:18,node:[1,22,27,29,30],node_info:27,non:[15,41],none:[1,2,32,41],notimplementederror:22,now:42,npt:22,number:[2,22,27],numpi:[5,6,7,22],obj:[30,31,38,39],obj_path:33,object:[2,3,5,6,8,9,14,15,17,18,24,26,30,34,36,37],obscur:37,occupi:37,offici:42,ojl:45,on_clos:37,on_key_press:[33,35],on_key_releas:35,on_mouse_drag:[33,35],on_mouse_mot:35,on_mouse_press:35,on_mouse_releas:[33,35],on_mouse_scrol:[33,35],onc:45,one:[2,37],onli:37,open:42,opengl:37,oper:[30,37,42],option:22,ordin:22,orient:[5,6],origin:42,other:[37,42],packag:46,page:[39,44],pan_rot:33,paramet:[2,5,6,18,22,27,29,30,41],pars:30,part:42,pass:42,patch:42,path:[15,18,22],path_point:22,path_vel:18,pathplan:22,peer:18,perform:[1,2,15,27],perform_action_alloc:2,perfrom:[2,27],perimet:27,physics_cli:[2,5,6,9,15,24],pip:[42,45],pitch:7,place:37,plan:[13,15,20,39],planner:[13,20,21,39],planning_primit:15,platform:37,platoon:[2,18,27],platoon_id:[5,6,27],platoon_typ:27,pleas:42,plot_path:15,point2d:34,point:[22,34],posit:[5,6,7,9,18,22,24,27,34],possibl:[37,42],post:42,postiion:2,prefer:45,prepare_project:[32,33],primit:[2,13,15,39],primitive_execut:2,primitive_manag:[13,39],primitivemanag:15,print_run:41,print_skip:41,print_warn:41,probabl:27,process:45,progress:27,project:[42,46,47],properti:[27,34],propos:42,pull:44,pull_request:42,push:42,push_ev:37,put:42,pybullet:22,pyglet:37,pypackag:46,pypi:[42,43],pytest:42,python:[42,45],radian:7,radiu:34,rais:22,ray_cast:26,readi:42,readm:42,readthedoc:46,recent:45,recommend:37,rectangl:34,red:29,red_act:[12,14],red_bas:[13,23,39],red_team:[13,14,39],red_team_act:1,red_team_po:29,redteam:24,refer:44,refin:22,region:[18,37],releas:[43,44],rememb:42,remind:42,remove_self:[5,6],render:37,repo:[42,45],repositori:45,repres:34,reproduc:42,request:44,requir:[2,27],reset:[5,6,9,12,24,32],resiz:[34,37],resourc:37,result:30,retriev:30,reward:[12,27],rgb:[26,27],right:34,ring:18,robot:[5,6,9,24],robot_id:[5,6],roll:7,rotat:[7,34],rotation_matrix:7,rst:42,run:[37,41,42,45],scene:[26,35],scope:42,screen:37,scroll_i:[33,35],scroll_x:[33,35],search:44,second:18,seg:27,segment:[22,26],self:[2,3,5,6,8,9,12,14,15,17,18,22,24,26,27,32,33,34,35,36,37],send:42,sensor:[13,39],set:[30,34,37,42],set_act:14,set_posit:[5,6],set_viewport:36,setattr:30,setup:[1,2,27,42,45],setup_bounding_box:36,shape:18,shape_util:[31,38,39],shasta:[42,45,47],shoot:[13,15,16,20,39],shoot_origin:17,shooting_primit:15,should:[5,6,22,42],show:37,simul:[22,46],singl:[5,6],skeleton:22,skip:41,skip_run:41,skipwith:41,softwar:[30,46],solid:18,sourc:[1,2,3,5,6,7,8,9,11,12,14,15,17,18,22,24,25,26,27,29,30,32,33,34,35,36,37,40,41,44],specif:[2,37],specifi:[2,5,6,18,22],sphere:34,sphinx:39,spline:22,split:22,stabl:44,start:[22,44],state:29,state_manag:[2,13,15,39],statemanag:27,step:[5,6,9,12,18,42],str:[2,5,6,18,27,41],string:30,subscript:30,subset:42,support:[30,42],sure:42,swarm:46,switch_to:37,symbol:[33,35],system:[22,37,42],tactic:2,tag:42,take:9,tarbal:45,target:[2,22,27],target_po:26,task:2,team:[14,29,46],team_typ:[1,5,6],templat:46,term:30,termin:45,test:42,test_shasta:42,text:32,than:22,thei:42,them:42,thi:[2,5,6,29,30,37,39,42,45,46],three:26,through:[42,45],time:18,timer:32,tip:44,titl:37,todo:46,top:34,tox:42,trajectori:22,transformation_matrix:7,transfrom:22,travi:42,troubleshoot:42,tupl:[26,30],two:22,type:[2,5,6,17,18,22,26,27,29,30,41,44],uav:[2,4,13,18,24,27,39],uav_p_1:2,uavpdcontrol:3,ugv:[2,4,5,13,18,24,27,39],under:30,unittest:42,updat:[12,18,32,33,42],update_act:14,upper:34,usag:44,use:[18,37,42,47],used:[2,18,30],useful:30,user:[31,37,38,39],using:[18,22,29],util:[4,10,13,23,31,38,39,44],uxv:18,uxv_p_:2,val:30,valid:30,valu:30,valueerror:22,variabl:2,vehicl:[2,5,6,15,18,27],vehicle_id:27,vehicles_id:2,vehicles_typ:2,veloc:18,version:42,via:37,viewport:[36,37],virtual:34,virtualenv:42,virtualenvwrapp:42,vmax:18,volunt:42,wai:42,want:42,web:42,websit:42,welcom:42,what:[5,6],when:[37,42],where:2,whether:[2,18,30,42],which:[2,5,6,27,29],whoever:42,widget:37,width:[34,36,37],window:37,window_height:37,window_width:37,work:42,world:34,would:42,x_po:32,y_po:32,yaml:22,yaw:[5,6,7],you:[30,37,42,45],your:[42,45],your_name_her:42,zero:22,zyx:7},titles:["__initi__","default_actions","envs.action_manager","envs.agents.control","envs.agents","envs.agents.uav","envs.agents.ugv","envs.agents.utils","envs.base_env","envs.blue_team.blue_base","envs.blue_team","envs.blue_team.utils","envs.enhance_env","envs","envs.interaction_manager","envs.primitive_manager","envs.primitives.engaging","envs.primitives.engaging.shooting","envs.primitives.formation.control","envs.primitives.formation","envs.primitives","envs.primitives.planning","envs.primitives.planning.planners","envs.red_team","envs.red_team.red_base","envs.red_team.utils","envs.sensors","envs.state_manager","envs.utils","envs.utils.interaction","envs.utils.magicattr","gui.core","gui.core.information","gui.core.obj","gui.core.shape_utils","gui.core.user","gui.core.utils","gui.gui_main","gui","API Reference","main","utils","Contributing","History","Welcome to shasta\u2019s documentation!","Installation","shasta","Usage"],titleterms:{"2020":43,"class":[2,3,5,6,8,9,12,14,15,17,18,22,24,26,27,32,33,34,35,36,37,41],"function":[1,7,9,11,24,25,29,30,34,36,37,41],__initi__:0,action_manag:2,agent:[3,4,5,6,7],api:39,base_env:8,blue_bas:9,blue_team:[9,10,11],bug:42,content:[1,2,3,5,6,7,8,9,11,12,14,15,17,18,22,24,25,26,27,29,30,32,33,34,35,36,37,40,41],contribut:42,control:[3,18],core:[31,32,33,34,35,36],credit:46,default_act:1,deploi:42,document:[42,44],engag:[16,17],enhance_env:12,env:[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],featur:[42,46],feedback:42,fix:42,format:[18,19],from:45,get:42,gui:[31,32,33,34,35,36,37,38],gui_main:37,guidelin:42,histori:43,implement:42,indic:44,inform:32,instal:45,interact:29,interaction_manag:14,magicattr:30,main:40,modul:[1,2,3,5,6,7,8,9,11,12,14,15,17,18,22,24,25,26,27,29,30,32,33,34,35,36,37,40,41],obj:33,plan:[21,22],planner:22,primit:[16,17,18,19,20,21,22],primitive_manag:15,pull:42,red_bas:24,red_team:[23,24,25],refer:39,releas:45,report:42,request:42,sensor:26,shape_util:34,shasta:[44,46],shoot:17,sourc:45,stabl:45,start:42,state_manag:27,submit:42,submodul:[4,10,13,16,19,21,23,28,31,38],subpackag:[13,20,38],tabl:44,tip:42,type:42,uav:5,ugv:6,usag:47,user:35,util:[7,11,25,28,29,30,36,41],welcom:44,write:42}}) \ No newline at end of file +Search.setIndex({"docnames": ["autoapi/index", "autoapi/shasta/actor/index", "autoapi/shasta/base_experiment/index", "autoapi/shasta/core/index", "autoapi/shasta/env/index", "autoapi/shasta/index", "autoapi/shasta/map/index", "autoapi/shasta/preprocessing/bake_texture/index", "autoapi/shasta/preprocessing/index", "autoapi/shasta/preprocessing/preprocess/index", "autoapi/shasta/preprocessing/utils/index", "autoapi/shasta/primitives/formation/index", "autoapi/shasta/primitives/index", "autoapi/shasta/primitives/path_planning/index", "autoapi/shasta/utils/index", "autoapi/shasta/visualize/index", "autoapi/shasta/world/index", "code_of_conduct", "contributing", "history", "index", "installation", "readme", "usage"], "filenames": ["autoapi/index.rst", "autoapi/shasta/actor/index.rst", "autoapi/shasta/base_experiment/index.rst", "autoapi/shasta/core/index.rst", "autoapi/shasta/env/index.rst", "autoapi/shasta/index.rst", "autoapi/shasta/map/index.rst", "autoapi/shasta/preprocessing/bake_texture/index.rst", "autoapi/shasta/preprocessing/index.rst", "autoapi/shasta/preprocessing/preprocess/index.rst", "autoapi/shasta/preprocessing/utils/index.rst", "autoapi/shasta/primitives/formation/index.rst", "autoapi/shasta/primitives/index.rst", "autoapi/shasta/primitives/path_planning/index.rst", "autoapi/shasta/utils/index.rst", "autoapi/shasta/visualize/index.rst", "autoapi/shasta/world/index.rst", "code_of_conduct.rst", "contributing.rst", "history.rst", "index.rst", "installation.rst", "readme.rst", "usage.rst"], "titles": ["API Reference", "shasta.actor", "shasta.base_experiment", "shasta.core", "shasta.env", "shasta", "shasta.map", "shasta.preprocessing.bake_texture", "shasta.preprocessing", "shasta.preprocessing.preprocess", "shasta.preprocessing.utils", "shasta.primitives.formation", "shasta.primitives", "shasta.primitives.path_planning", "shasta.utils", "shasta.visualize", "shasta.world", "Code of Conduct", "Contributing", "History", "Welcome to shasta\u2019s documentation!", "Installation", "Welcome", "Usage"], "terms": {"thi": [0, 1, 3, 4, 17, 18, 21, 22], "page": [0, 20], "contain": [0, 6, 11, 12], "auto": 0, "gener": [0, 12, 13, 18], "document": [0, 18, 22], "1": [0, 12, 13, 20], "shasta": [0, 18, 21, 23], "preprocess": [0, 5], "bake_textur": [0, 5, 8], "util": [0, 5, 8], "primit": [0, 5], "format": [0, 5, 12, 14, 18], "path_plan": [0, 5, 12], "actor": [0, 2, 3, 5, 14, 16], "base_experi": [0, 5], "core": [0, 2, 5], "env": [0, 5], "map": [0, 3, 5], "visual": [0, 5], "world": [0, 3, 5, 6], "creat": [0, 18], "sphinx": 0, "autoapi": 0, "baseactor": 1, "sourc": [1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 20, 22], "base": [1, 2, 4, 11, 12, 13], "with_metaclass": [1, 2], "abcmeta": [1, 2], "object": [1, 2, 3, 11, 12, 13, 16], "singl": [1, 17, 18], "ugv": [1, 11, 12], "robot": [1, 22], "physics_cli": 1, "_load": 1, "fals": [1, 10], "load": [1, 6, 16], "pybullet": [1, 6, 12, 13, 22], "return": [1, 2, 3, 4, 6, 11, 12, 13, 14, 16], "list": [1, 2, 3, 11, 12, 16], "bodi": [1, 17], "id": [1, 3, 6, 12, 13], "get_actor_id": 1, "get": [1, 3, 6, 11, 12], "The": [1, 2, 3, 6, 12, 13, 16, 17, 21, 22], "simul": [1, 2, 3, 4, 18, 20], "type": [1, 3, 4, 6, 11, 12, 13, 14, 16], "int": [1, 3, 6, 12, 13, 14], "abstract": [1, 2, 9, 12, 13], "load_asset": 1, "arg": [1, 2], "kwarg": 1, "assest": 1, "reset": [1, 2, 3, 4], "rais": [1, 6, 12, 13], "notimplementederror": [1, 12, 13], "get_observ": [1, 2], "observ": [1, 2, 4], "from": [1, 3, 11, 12, 16, 17, 18, 20, 22], "apply_act": [1, 2], "appli": [1, 2, 17], "action": [1, 2, 4, 17], "destroi": 1, "baseexperi": 2, "config": [2, 3, 4, 6, 11, 12, 15, 16], "experiment_config": [2, 3, 6], "none": [2, 3, 4, 6, 9, 11, 12, 16], "karg": 2, "call": 2, "begin": 2, "each": [2, 12, 13], "time": [2, 11, 12, 17, 22], "i": [2, 4, 6, 11, 12, 13, 17, 18, 21, 22], "get_action_spac": 2, "space": [2, 17], "get_observation_spac": 2, "get_act": 2, "given": [2, 3, 6, 12, 13, 16], "group": [2, 3, 11, 12], "individu": [2, 17], "paramet": [2, 3, 6, 11, 12, 13, 14, 15, 16], "valu": [2, 3], "output": 2, "polici": 2, "function": [2, 12, 13, 18], "do": [2, 18], "all": [2, 3, 4, 6, 11, 12, 17, 18], "post": [2, 17], "process": [2, 18, 21], "sensor": [2, 3], "data": [2, 3, 18], "sensor_data": 2, "dictionari": [2, 6], "sensor_nam": 2, "should": [2, 12, 13, 18], "tupl": 2, "two": [2, 12, 13], "item": 2, "well": [2, 4, 17, 22], "variabl": 2, "addit": [2, 12, 13], "inform": [2, 6, 17, 22], "about": [2, 6, 17], "can": [2, 18, 21], "empti": 2, "get_done_statu": 2, "whether": [2, 11, 12], "experi": [2, 6, 17, 22], "ha": 2, "end": [2, 12, 13], "compute_reward": 2, "comput": [2, 4], "reward": [2, 4], "kill_all_serv": 3, "kill": 3, "pid": 3, "start": [3, 12, 13, 18, 22], "carla": 3, "shastacor": 3, "actor_group": [3, 4], "dict": [3, 4, 6], "respons": [3, 4, 18], "handl": [3, 4], "differ": [3, 17], "server": 3, "client": 3, "connect": 3, "spawn": [3, 6, 16], "_setup_physics_cli": 3, "setup": [3, 6, 10, 21], "physic": [3, 17], "get_physics_cli": 3, "ge": 3, "bullet": 3, "init_serv": 3, "random": [3, 6], "port": 3, "setup_experi": 3, "initi": [3, 6, 10, 14], "hero": 3, "get_world": 3, "get_map": 3, "vehicl": [3, 11, 12], "its": 3, "spawn_actor": [3, 16], "walker": 3, "also": [3, 17, 18, 22], "set": [3, 17, 22], "up": 3, "traffic": 3, "manag": 3, "get_actor_group": 3, "kei": 3, "get_actors_by_group_id": 3, "group_id": 3, "A": [3, 6, 11, 12, 13, 17], "tick": [3, 4], "perform": [3, 4, 6], "one": [3, 4], "move": 3, "close_simul": 3, "close": [3, 4], "shastaenv": 4, "gym": [4, 18, 22], "environ": [4, 17, 18, 22], "relat": [4, 18], "step": [4, 11, 12], "train": 4, "descript": [4, 18], "order": 4, "new": [4, 18], "overrid": 4, "your": [4, 18, 21, 22], "subclass": 4, "ani": [4, 17, 18], "necessari": 4, "cleanup": 4, "automat": 4, "themselv": 4, "when": [4, 17, 22], "garbag": 4, "collect": [4, 22], "program": 4, "exit": 4, "directori": 6, "assets_root": 6, "_affine_transformation_and_graph": 6, "convers": 6, "lat": 6, "lon": 6, "cartesian": [6, 12, 13, 14], "_setup_building_info": 6, "e": [6, 17], "g": 6, "yaml": [6, 15], "file": [6, 15], "provid": [6, 15, 17, 22], "configur": [6, 15, 22], "filenotfounderror": 6, "If": [6, 18, 21, 22], "found": 6, "error": 6, "get_affine_transformation_and_graph": 6, "transform": 6, "matrix": 6, "node": [6, 12, 13, 15], "graph": [6, 12, 13, 15], "arrai": [6, 11, 12, 13, 14, 16], "get_node_graph": 6, "networkx": 6, "get_node_info": 6, "node_index": 6, "convert_to_lat_lon": 6, "point": [6, 12, 13, 14, 16], "convert": 6, "co": [6, 12, 13], "ordin": [6, 12, 13], "numpi": 6, "lat_lon": 6, "convert_to_cartesian": 6, "coordin": [6, 12, 13], "get_building_info": 6, "building_index": 6, "build": [6, 10], "perimet": 6, "posit": [6, 11, 12, 13, 14, 16, 17], "number": [6, 12, 13, 14], "floor": 6, "get_lat_lon_spawn_point": 6, "n_point": 6, "5": 6, "latitud": 6, "longitud": 6, "option": [6, 12, 13, 16], "default": [6, 12, 13, 16], "an": [6, 11, 12, 13, 14, 16, 17, 18, 22], "get_cartesian_node_posit": 6, "index": [6, 20], "get_lat_lon_node_posit": 6, "get_cartesian_spawn_point": 6, "get_all_build": 6, "datafram": 6, "get_transformation_matrix": 6, "op": 7, "scene": 7, "mesh": 7, "ob": 7, "ctx": 7, "imag": [7, 12, 13], "matslot": 7, "mat": 7, "tex": 7, "slot": 7, "osm_map_path": 9, "blender_path": 9, "_save_building_info": 9, "_save_graph_info": 9, "run_process": 9, "extract_building_info": 10, "osm_path": 10, "save_fig": 10, "perfrom": 10, "save_buildings_map": 10, "extract_path_info": 10, "control": [11, 12], "us": [11, 12, 13, 17, 22, 23], "region": [11, 12], "shape": [11, 12], "code": [11, 12, 20], "apurvakumar": [11, 12], "jani": [11, 12], "date": [11, 12], "18": [11, 12], "9": [11, 12], "2019": [11, 12], "calculate_vel": [11, 12], "dt": [11, 12], "all_drones_po": [11, 12], "centroid_po": [11, 12], "path_vel": [11, 12], "vmax": [11, 12], "formation_typ": [11, 12], "calcul": [11, 12], "veloc": [11, 12], "depend": [11, 12, 22], "peer": [11, 12], "instanc": [11, 12, 17, 18], "uxv": [11, 12], "agent": [11, 12], "float": [11, 12, 14, 16], "durat": [11, 12], "second": [11, 12], "next": [11, 12], "aarrai": [11, 12], "platoon": [11, 12], "specifi": [11, 12, 13, 17], "centroid": [11, 12], "path": [11, 12, 13, 16], "current": [11, 12], "maximum": [11, 12], "str": [11, 12, 16], "solid": [11, 12], "ring": [11, 12, 14], "updat": [11, 12], "execut": [11, 12, 13], "next_po": [11, 12], "uav": [11, 12], "x": [11, 12, 13], "y": [11, 12], "z": [11, 12], "distanc": [11, 12, 16], "pathplan": [12, 13], "env_map": [12, 13], "planner": [12, 13], "skeleton": [12, 13], "spline": [12, 13], "linear_refine_implicit": [12, 13], "n": [12, 13, 14], "2d": [12, 13], "ndarrai": [12, 13], "npt": [12, 13], "m": [12, 13, 18], "dimens": [12, 13], "insert": [12, 13], "2": [12, 13], "trajectori": [12, 13], "segment": [12, 13], "input": [12, 13], "intermedi": [12, 13], "between": [12, 13], "consecut": [12, 13], "interplo": [12, 13], "implement": [12, 13], "3d": [12, 13], "higher": [12, 13], "valueerror": [12, 13], "great": [12, 13], "than": [12, 13, 18], "zero": [12, 13], "find_path": [12, 13], "n_split": [12, 13], "find": [12, 13, 18], "split": [12, 13], "refin": [12, 13], "path_point": [12, 13], "system": [12, 13], "get_initial_posit": 14, "cartesian_po": 14, "r": [14, 22], "form": 14, "po": 14, "radiu": 14, "circl": 14, "plot_nod": 15, "load_world_model": 16, "read_path": 16, "urdf": 16, "model": 16, "change_camera_posit": 16, "camera_dist": 16, "150": 16, "0": [16, 17, 20], "camera_yaw": 16, "camera_pitch": 16, "89": 16, "999": 16, "camera_target_posit": 16, "30": 16, "chang": [16, 18], "camera": 16, "target": 16, "yaw": 16, "pitch": 16, "spawn_point": 16, "spawm": 16, "we": [17, 22], "member": 17, "leader": 17, "make": [17, 18], "particip": [17, 18, 22], "commun": [17, 18, 22], "harass": 17, "free": [17, 22], "everyon": [17, 18, 22], "regardless": 17, "ag": 17, "size": 17, "visibl": 17, "invis": 17, "disabl": 17, "ethnic": 17, "sex": 17, "characterist": 17, "gender": 17, "ident": 17, "express": 17, "level": 17, "educ": 17, "socio": 17, "econom": 17, "statu": 17, "nation": 17, "person": 17, "appear": 17, "race": 17, "religion": 17, "sexual": 17, "orient": 17, "act": 17, "interact": [17, 22], "wai": 17, "contribut": [17, 20], "open": [17, 22], "welcom": [17, 18], "divers": 17, "inclus": [17, 18, 22], "healthi": 17, "exampl": [17, 18], "behavior": [17, 22], "includ": [17, 18], "demonstr": 17, "empathi": 17, "kind": 17, "toward": 17, "other": 17, "peopl": 17, "Being": 17, "respect": [17, 18, 22], "opinion": 17, "viewpoint": 17, "give": 17, "gracefulli": 17, "accept": 17, "construct": 17, "feedback": [17, 18], "apolog": 17, "those": 17, "affect": 17, "mistak": 17, "learn": [17, 22], "focus": 17, "what": 17, "best": 17, "just": 17, "u": 17, "overal": 17, "unaccept": 17, "languag": 17, "imageri": 17, "attent": [17, 18], "advanc": 17, "troll": 17, "insult": 17, "derogatori": 17, "comment": [17, 18], "polit": 17, "attack": 17, "public": [17, 21], "privat": 17, "publish": 17, "email": 17, "address": [17, 18], "without": 17, "explicit": 17, "permiss": 17, "which": [17, 22], "could": 17, "reason": 17, "consid": [17, 18], "inappropri": 17, "profession": 17, "ar": [17, 18, 22], "clarifi": 17, "take": [17, 18], "appropri": 17, "fair": 17, "thei": [17, 18], "deem": 17, "threaten": 17, "offens": 17, "harm": 17, "have": [17, 21], "right": 17, "remov": 17, "edit": 17, "reject": 17, "commit": [17, 18], "wiki": 17, "issu": [17, 18], "align": 17, "moder": 17, "decis": 17, "within": 17, "offici": 17, "repres": 17, "mail": 17, "via": 17, "social": 17, "media": 17, "account": [17, 18], "appoint": 17, "onlin": 17, "offlin": 17, "event": 17, "abus": 17, "otherwis": 17, "mai": 17, "report": 17, "http": [17, 18, 22], "www": 17, "context": 17, "lab": [17, 22], "com": [17, 18, 21, 22], "contact": 17, "complaint": 17, "review": [17, 18, 22], "investig": 17, "promptli": 17, "fairli": 17, "oblig": 17, "privaci": 17, "secur": 17, "incid": 17, "follow": [17, 22], "impact": 17, "determin": 17, "consequ": 17, "violat": 17, "unprofession": 17, "unwelcom": 17, "written": 17, "clariti": 17, "around": 17, "natur": 17, "explan": 17, "why": 17, "wa": 17, "apologi": 17, "request": [17, 18], "through": [17, 21], "seri": 17, "continu": 17, "No": 17, "involv": [17, 18], "unsolicit": 17, "period": 17, "avoid": [17, 18], "extern": 17, "channel": 17, "like": 17, "term": 17, "lead": 17, "seriou": 17, "sustain": 17, "sort": 17, "allow": 17, "dure": [17, 18], "pattern": 17, "aggress": 17, "disparag": 17, "class": [17, 18], "adapt": 17, "version": 17, "avail": 17, "org": 17, "code_of_conduct": 17, "html": 17, "were": 17, "inspir": 17, "mozilla": 17, "": 17, "ladder": 17, "For": 17, "answer": 17, "common": 17, "question": 17, "see": 17, "faq": 17, "translat": 17, "thank": 18, "you": [18, 21, 22], "interest": [18, 22], "xplane": [18, 22], "collector": 18, "openai": [18, 22], "interfac": [18, 22], "project": [18, 22, 23], "help": 18, "improv": [18, 22], "enhanc": 18, "pleas": [18, 22], "moment": 18, "befor": 18, "submit": 18, "read": 18, "our": [18, 22], "expect": 18, "contributor": [18, 20], "ensur": 18, "fork": 18, "repositori": [18, 21, 22], "github": [18, 21, 22], "clone": [18, 21, 22], "local": [18, 22], "machin": [18, 22], "git": [18, 21, 22], "ub": [18, 22], "nsf": [18, 22], "hsi": [18, 22], "branch": 18, "checkout": 18, "b": 18, "featur": 18, "fix": 18, "clear": 18, "messag": 18, "add": 18, "push": 18, "origin": 18, "pull": 18, "pr": 18, "main": [18, 22], "titl": 18, "clearli": 18, "explain": 18, "purpos": [18, 22], "refer": [18, 20], "relev": 18, "applic": [18, 20], "discuss": 18, "onc": 18, "approv": 18, "merg": 18, "check": 18, "section": 18, "exist": 18, "need": [18, 22], "potenti": 18, "re": [18, 22], "ad": 18, "signific": 18, "propos": 18, "first": [18, 19], "reach": 18, "out": 18, "maintain": [18, 22], "write": 18, "comprehens": 18, "introduc": 18, "test": 18, "thoroughli": 18, "work": 18, "break": 18, "Be": 18, "patient": 18, "valuabl": 18, "qualiti": 18, "against": 18, "describ": 18, "pep": 18, "8": 18, "camelcas": 18, "snake_cas": 18, "n_sampl": 18, "rather": 18, "nsampl": 18, "charact": 18, "unless": 18, "insid": 18, "In": 18, "most": [18, 21], "case": 18, "look": 18, "figur": 18, "t": [18, 21], "consult": 18, "more": 18, "complic": 18, "embed": 18, "cite": 18, "render": 18, "mathemat": 18, "By": 18, "agre": 18, "licens": 18, "under": [18, 22], "apach": 18, "along": 18, "rest": 18, "nuplan": 18, "even": 18, "better": 18, "releas": [19, 20], "pypi": 19, "human": 20, "swarm": 20, "team": 20, "instal": 20, "stabl": 20, "guidelin": [20, 22], "conduct": 20, "coven": 20, "histori": 20, "2020": 20, "11": 20, "13": 20, "api": 20, "modul": 20, "search": 20, "To": [21, 23], "run": [21, 22], "command": [21, 22], "termin": 21, "pip": [21, 22], "prefer": 21, "method": 21, "alwai": 21, "recent": 21, "don": 21, "python": [21, 22], "guid": 21, "download": 21, "repo": 21, "either": 21, "hemumanju": 21, "py": [21, 22], "screenshot": 22, "illustr": 22, "onli": 22, "platform": 22, "studi": 22, "unifi": 22, "algorithm": 22, "uniqu": 22, "abil": 22, "physiolog": 22, "synchron": 22, "realist": 22, "power": 22, "signal": 22, "eeg": 22, "emg": 22, "ey": 22, "movement": 22, "etc": 22, "facil": 22, "built": 22, "stream": 22, "layer": 22, "reinforc": 22, "highli": 22, "customiz": 22, "easi": 22, "codebas": 22, "requir": 22, "txt": 22, "launch": 22, "want": 22, "particular": 22, "block": 22, "replac": 22, "skip": 22, "explor": 22, "adjust": 22, "fly": 22, "expand": 22, "adher": 22, "strive": 22, "mit": 22, "mean": 22, "modifi": 22, "distribut": 22, "hope": 22, "enjoi": 22, "happi": 22, "import": 23}, "objects": {"": [[5, 0, 0, "-", "shasta"]], "shasta": [[1, 0, 0, "-", "actor"], [2, 0, 0, "-", "base_experiment"], [3, 0, 0, "-", "core"], [4, 0, 0, "-", "env"], [6, 0, 0, "-", "map"], [8, 0, 0, "-", "preprocessing"], [12, 0, 0, "-", "primitives"], [14, 0, 0, "-", "utils"], [15, 0, 0, "-", "visualize"], [16, 0, 0, "-", "world"]], "shasta.actor": [[1, 1, 1, "", "BaseActor"]], "shasta.actor.BaseActor": [[1, 2, 1, "", "_load"], [1, 3, 1, "", "_loaded"], [1, 2, 1, "", "apply_action"], [1, 2, 1, "", "destroy"], [1, 2, 1, "", "get_actor_id"], [1, 2, 1, "", "get_observation"], [1, 2, 1, "", "load_asset"], [1, 3, 1, "", "physics_client"], [1, 2, 1, "", "reset"]], "shasta.base_experiment": [[2, 1, 1, "", "BaseExperiment"]], "shasta.base_experiment.BaseExperiment": [[2, 2, 1, "", "apply_actions"], [2, 2, 1, "", "compute_reward"], [2, 2, 1, "", "get_action_space"], [2, 2, 1, "", "get_actions"], [2, 2, 1, "", "get_done_status"], [2, 2, 1, "", "get_observation"], [2, 2, 1, "", "get_observation_space"], [2, 2, 1, "", "reset"]], "shasta.core": [[3, 1, 1, "", "ShastaCore"], [3, 4, 1, "", "kill_all_servers"]], "shasta.core.ShastaCore": [[3, 2, 1, "", "_setup_physics_client"], [3, 2, 1, "", "close_simulation"], [3, 2, 1, "", "get_actor_groups"], [3, 2, 1, "", "get_actors_by_group_id"], [3, 2, 1, "", "get_map"], [3, 2, 1, "", "get_physics_client"], [3, 2, 1, "", "get_world"], [3, 2, 1, "", "init_server"], [3, 2, 1, "", "reset"], [3, 2, 1, "", "setup_experiment"], [3, 2, 1, "", "spawn_actors"], [3, 2, 1, "", "tick"]], "shasta.env": [[4, 1, 1, "", "ShastaEnv"]], "shasta.env.ShastaEnv": [[4, 2, 1, "", "close"], [4, 2, 1, "", "reset"], [4, 2, 1, "", "step"]], "shasta.map": [[6, 1, 1, "", "Map"], [6, 5, 1, "", "assets_root"], [6, 5, 1, "", "directories"]], "shasta.map.Map": [[6, 2, 1, "", "_affine_transformation_and_graph"], [6, 2, 1, "", "_setup_building_info"], [6, 2, 1, "", "convert_to_cartesian"], [6, 2, 1, "", "convert_to_lat_lon"], [6, 2, 1, "", "get_affine_transformation_and_graph"], [6, 2, 1, "", "get_all_buildings"], [6, 2, 1, "", "get_building_info"], [6, 2, 1, "", "get_cartesian_node_position"], [6, 2, 1, "", "get_cartesian_spawn_points"], [6, 2, 1, "", "get_lat_lon_node_position"], [6, 2, 1, "", "get_lat_lon_spawn_points"], [6, 2, 1, "", "get_node_graph"], [6, 2, 1, "", "get_node_info"], [6, 2, 1, "", "get_transformation_matrix"], [6, 2, 1, "", "setup"]], "shasta.preprocessing": [[7, 0, 0, "-", "bake_texture"], [9, 0, 0, "-", "preprocess"], [10, 0, 0, "-", "utils"]], "shasta.preprocessing.bake_texture": [[7, 5, 1, "", "ctx"], [7, 5, 1, "", "image"], [7, 5, 1, "", "mat"], [7, 5, 1, "", "matslots"], [7, 5, 1, "", "mesh"], [7, 5, 1, "", "obs"], [7, 5, 1, "", "ops"], [7, 5, 1, "id0", "scene"], [7, 5, 1, "", "slot"], [7, 5, 1, "", "tex"]], "shasta.preprocessing.preprocess": [[9, 1, 1, "", "PreProcess"], [9, 5, 1, "", "preprocess"]], "shasta.preprocessing.preprocess.PreProcess": [[9, 2, 1, "", "_save_building_info"], [9, 2, 1, "", "_save_graph_info"], [9, 2, 1, "", "run_processing"]], "shasta.preprocessing.utils": [[10, 4, 1, "", "extract_building_info"], [10, 4, 1, "", "extract_path_info"], [10, 4, 1, "", "save_buildings_map"]], "shasta.primitives": [[12, 1, 1, "", "Formation"], [12, 1, 1, "", "PathPlanning"], [11, 0, 0, "-", "formation"], [13, 0, 0, "-", "path_planning"]], "shasta.primitives.Formation": [[12, 2, 1, "", "calculate_vel"], [12, 2, 1, "", "execute"]], "shasta.primitives.PathPlanning": [[12, 2, 1, "", "execute"], [12, 2, 1, "", "find_path"], [12, 2, 1, "", "linear_refine_implicit"]], "shasta.primitives.formation": [[11, 1, 1, "", "Formation"]], "shasta.primitives.formation.Formation": [[11, 2, 1, "", "calculate_vel"], [11, 2, 1, "", "execute"]], "shasta.primitives.path_planning": [[13, 1, 1, "", "PathPlanning"]], "shasta.primitives.path_planning.PathPlanning": [[13, 2, 1, "", "execute"], [13, 2, 1, "", "find_path"], [13, 2, 1, "", "linear_refine_implicit"]], "shasta.utils": [[14, 4, 1, "", "get_initial_positions"]], "shasta.visualize": [[15, 4, 1, "", "plot_nodes"]], "shasta.world": [[16, 1, 1, "", "World"]], "shasta.world.World": [[16, 2, 1, "", "change_camera_position"], [16, 2, 1, "", "load_world_model"], [16, 2, 1, "", "spawn_actor"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:function", "5": "py:data"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"], "5": ["py", "data", "Python data"]}, "titleterms": {"api": 0, "refer": 0, "shasta": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 22], "actor": 1, "modul": [1, 2, 3, 4, 6, 7, 9, 10, 11, 13, 14, 15, 16], "content": [1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 20, 22], "class": [1, 2, 3, 4, 6, 9, 11, 12, 13, 16], "base_experi": 2, "core": 3, "function": [3, 10, 14, 15], "env": 4, "subpackag": 5, "submodul": [5, 8, 12], "map": 6, "attribut": [6, 9, 17, 18], "preprocess": [7, 8, 9, 10], "bake_textur": 7, "util": [10, 14], "primit": [11, 12, 13], "format": 11, "packag": 12, "path_plan": 13, "visual": 15, "world": 16, "code": [17, 18, 22], "conduct": [17, 18, 22], "contributor": 17, "coven": 17, "our": 17, "pledg": 17, "standard": [17, 18], "enforc": 17, "respons": 17, "scope": 17, "guidelin": [17, 18], "1": [17, 19], "correct": 17, "2": 17, "warn": 17, "3": 17, "temporari": 17, "ban": 17, "4": 17, "perman": 17, "contribut": [18, 22], "how": 18, "tip": 18, "style": 18, "adher": 18, "python": 18, "us": 18, "consist": 18, "variabl": 18, "name": 18, "we": 18, "mostli": 18, "follow": 18, "numpi": 18, "docstr": 18, "histori": 19, "0": 19, "2020": 19, "11": 19, "13": 19, "welcom": [20, 22], "": 20, "document": 20, "indic": 20, "tabl": [20, 22], "instal": [21, 22], "stabl": 21, "releas": 21, "from": 21, "sourc": 21, "simul": 22, "human": 22, "swarm": 22, "team": 22, "applic": 22, "featur": 22, "usag": [22, 23], "licens": 22}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"API Reference": [[0, "api-reference"]], "shasta.actor": [[1, "module-shasta.actor"]], "Module Contents": [[1, "module-contents"], [2, "module-contents"], [3, "module-contents"], [4, "module-contents"], [6, "module-contents"], [7, "module-contents"], [9, "module-contents"], [10, "module-contents"], [11, "module-contents"], [13, "module-contents"], [14, "module-contents"], [15, "module-contents"], [16, "module-contents"]], "Classes": [[1, "classes"], [2, "classes"], [3, "classes"], [4, "classes"], [6, "classes"], [9, "classes"], [11, "classes"], [12, "classes"], [13, "classes"], [16, "classes"]], "shasta.base_experiment": [[2, "module-shasta.base_experiment"]], "shasta.core": [[3, "module-shasta.core"]], "Functions": [[3, "functions"], [10, "functions"], [14, "functions"], [15, "functions"]], "shasta.env": [[4, "module-shasta.env"]], "shasta": [[5, "module-shasta"]], "Subpackages": [[5, "subpackages"]], "Submodules": [[5, "submodules"], [8, "submodules"], [12, "submodules"]], "shasta.map": [[6, "module-shasta.map"]], "Attributes": [[6, "attributes"], [9, "attributes"]], "shasta.preprocessing.bake_texture": [[7, "module-shasta.preprocessing.bake_texture"]], "shasta.preprocessing": [[8, "module-shasta.preprocessing"]], "shasta.preprocessing.preprocess": [[9, "module-shasta.preprocessing.preprocess"]], "shasta.preprocessing.utils": [[10, "module-shasta.preprocessing.utils"]], "shasta.primitives.formation": [[11, "module-shasta.primitives.formation"]], "shasta.primitives": [[12, "module-shasta.primitives"]], "Package Contents": [[12, "package-contents"]], "shasta.primitives.path_planning": [[13, "module-shasta.primitives.path_planning"]], "shasta.utils": [[14, "module-shasta.utils"]], "shasta.visualize": [[15, "module-shasta.visualize"]], "shasta.world": [[16, "module-shasta.world"]], "Code of Conduct": [[17, "code-of-conduct"], [18, "code-of-conduct"], [22, "code-of-conduct"]], "Contributor Covenant Code of Conduct": [[17, "contributor-covenant-code-of-conduct"]], "Our Pledge": [[17, "our-pledge"]], "Our Standards": [[17, "our-standards"]], "Enforcement Responsibilities": [[17, "enforcement-responsibilities"]], "Scope": [[17, "scope"]], "Enforcement": [[17, "enforcement"]], "Enforcement Guidelines": [[17, "enforcement-guidelines"]], "1. Correction": [[17, "correction"]], "2. Warning": [[17, "warning"]], "3. Temporary Ban": [[17, "temporary-ban"]], "4. Permanent Ban": [[17, "permanent-ban"]], "Attribution": [[17, "attribution"], [18, "attribution"]], "Contributing": [[18, "contributing"], [22, "contributing"]], "Contributing Guidelines": [[18, "contributing-guidelines"]], "How to Contribute": [[18, "how-to-contribute"]], "Tips for Contributing": [[18, "tips-for-contributing"]], "Code style": [[18, "code-style"]], "Adhere to standard Python style guidelines": [[18, "adhere-to-standard-python-style-guidelines"]], "Use consistent variable naming": [[18, "use-consistent-variable-naming"]], "We (mostly) follow NumPy style for docstrings": [[18, "we-mostly-follow-numpy-style-for-docstrings"]], "History": [[19, "history"]], "0.1.0 (2020-11-13)": [[19, "id1"]], "Welcome to shasta\u2019s documentation!": [[20, "welcome-to-shasta-s-documentation"]], "Contents:": [[20, null]], "Indices and tables": [[20, "indices-and-tables"]], "Installation": [[21, "installation"], [22, "installation"]], "Stable release": [[21, "stable-release"]], "From sources": [[21, "from-sources"]], "Welcome": [[22, "welcome"]], "SHaSTA (Simulator for Human and Swarm Team Applications)": [[22, "shasta-simulator-for-human-and-swarm-team-applications"]], "Table of Contents": [[22, "table-of-contents"]], "Features": [[22, "features"]], "Usage": [[22, "usage"], [23, "usage"]], "License": [[22, "license"]]}, "indexentries": {"baseactor (class in shasta.actor)": [[1, "shasta.actor.BaseActor"]], "_load() (baseactor method)": [[1, "shasta.actor.BaseActor._load"]], "_loaded (baseactor attribute)": [[1, "shasta.actor.BaseActor._loaded"]], "apply_action() (baseactor method)": [[1, "shasta.actor.BaseActor.apply_action"]], "destroy() (baseactor method)": [[1, "shasta.actor.BaseActor.destroy"]], "get_actor_id() (baseactor method)": [[1, "shasta.actor.BaseActor.get_actor_id"]], "get_observation() (baseactor method)": [[1, "shasta.actor.BaseActor.get_observation"]], "load_asset() (baseactor method)": [[1, "shasta.actor.BaseActor.load_asset"]], "module": [[1, "module-shasta.actor"], [2, "module-shasta.base_experiment"], [3, "module-shasta.core"], [4, "module-shasta.env"], [5, "module-shasta"], [6, "module-shasta.map"], [7, "module-shasta.preprocessing.bake_texture"], [8, "module-shasta.preprocessing"], [9, "module-shasta.preprocessing.preprocess"], [10, "module-shasta.preprocessing.utils"], [11, "module-shasta.primitives.formation"], [12, "module-shasta.primitives"], [13, "module-shasta.primitives.path_planning"], [14, "module-shasta.utils"], [15, "module-shasta.visualize"], [16, "module-shasta.world"]], "physics_client (baseactor attribute)": [[1, "shasta.actor.BaseActor.physics_client"]], "reset() (baseactor method)": [[1, "shasta.actor.BaseActor.reset"]], "shasta.actor": [[1, "module-shasta.actor"]], "baseexperiment (class in shasta.base_experiment)": [[2, "shasta.base_experiment.BaseExperiment"]], "apply_actions() (baseexperiment method)": [[2, "shasta.base_experiment.BaseExperiment.apply_actions"]], "compute_reward() (baseexperiment method)": [[2, "shasta.base_experiment.BaseExperiment.compute_reward"]], "get_action_space() (baseexperiment method)": [[2, "shasta.base_experiment.BaseExperiment.get_action_space"]], "get_actions() (baseexperiment method)": [[2, "shasta.base_experiment.BaseExperiment.get_actions"]], "get_done_status() (baseexperiment method)": [[2, "shasta.base_experiment.BaseExperiment.get_done_status"]], "get_observation() (baseexperiment method)": [[2, "shasta.base_experiment.BaseExperiment.get_observation"]], "get_observation_space() (baseexperiment method)": [[2, "shasta.base_experiment.BaseExperiment.get_observation_space"]], "reset() (baseexperiment method)": [[2, "shasta.base_experiment.BaseExperiment.reset"]], "shasta.base_experiment": [[2, "module-shasta.base_experiment"]], "shastacore (class in shasta.core)": [[3, "shasta.core.ShastaCore"]], "_setup_physics_client() (shastacore method)": [[3, "shasta.core.ShastaCore._setup_physics_client"]], "close_simulation() (shastacore method)": [[3, "shasta.core.ShastaCore.close_simulation"]], "get_actor_groups() (shastacore method)": [[3, "shasta.core.ShastaCore.get_actor_groups"]], "get_actors_by_group_id() (shastacore method)": [[3, "shasta.core.ShastaCore.get_actors_by_group_id"]], "get_map() (shastacore method)": [[3, "shasta.core.ShastaCore.get_map"]], "get_physics_client() (shastacore method)": [[3, "shasta.core.ShastaCore.get_physics_client"]], "get_world() (shastacore method)": [[3, "shasta.core.ShastaCore.get_world"]], "init_server() (shastacore method)": [[3, "shasta.core.ShastaCore.init_server"]], "kill_all_servers() (in module shasta.core)": [[3, "shasta.core.kill_all_servers"]], "reset() (shastacore method)": [[3, "shasta.core.ShastaCore.reset"]], "setup_experiment() (shastacore method)": [[3, "shasta.core.ShastaCore.setup_experiment"]], "shasta.core": [[3, "module-shasta.core"]], "spawn_actors() (shastacore method)": [[3, "shasta.core.ShastaCore.spawn_actors"]], "tick() (shastacore method)": [[3, "shasta.core.ShastaCore.tick"]], "shastaenv (class in shasta.env)": [[4, "shasta.env.ShastaEnv"]], "close() (shastaenv method)": [[4, "shasta.env.ShastaEnv.close"]], "reset() (shastaenv method)": [[4, "shasta.env.ShastaEnv.reset"]], "shasta.env": [[4, "module-shasta.env"]], "step() (shastaenv method)": [[4, "shasta.env.ShastaEnv.step"]], "shasta": [[5, "module-shasta"]], "map (class in shasta.map)": [[6, "shasta.map.Map"]], "_affine_transformation_and_graph() (map method)": [[6, "shasta.map.Map._affine_transformation_and_graph"]], "_setup_building_info() (map method)": [[6, "shasta.map.Map._setup_building_info"]], "assets_root (in module shasta.map)": [[6, "shasta.map.assets_root"]], "convert_to_cartesian() (map method)": [[6, "shasta.map.Map.convert_to_cartesian"]], "convert_to_lat_lon() (map method)": [[6, "shasta.map.Map.convert_to_lat_lon"]], "directories (in module shasta.map)": [[6, "shasta.map.directories"]], "get_affine_transformation_and_graph() (map method)": [[6, "shasta.map.Map.get_affine_transformation_and_graph"]], "get_all_buildings() (map method)": [[6, "shasta.map.Map.get_all_buildings"]], "get_building_info() (map method)": [[6, "shasta.map.Map.get_building_info"]], "get_cartesian_node_position() (map method)": [[6, "shasta.map.Map.get_cartesian_node_position"]], "get_cartesian_spawn_points() (map method)": [[6, "shasta.map.Map.get_cartesian_spawn_points"]], "get_lat_lon_node_position() (map method)": [[6, "shasta.map.Map.get_lat_lon_node_position"]], "get_lat_lon_spawn_points() (map method)": [[6, "shasta.map.Map.get_lat_lon_spawn_points"]], "get_node_graph() (map method)": [[6, "shasta.map.Map.get_node_graph"]], "get_node_info() (map method)": [[6, "shasta.map.Map.get_node_info"]], "get_transformation_matrix() (map method)": [[6, "shasta.map.Map.get_transformation_matrix"]], "setup() (map method)": [[6, "shasta.map.Map.setup"]], "shasta.map": [[6, "module-shasta.map"]], "ctx (in module shasta.preprocessing.bake_texture)": [[7, "shasta.preprocessing.bake_texture.ctx"]], "image (in module shasta.preprocessing.bake_texture)": [[7, "shasta.preprocessing.bake_texture.image"]], "mat (in module shasta.preprocessing.bake_texture)": [[7, "shasta.preprocessing.bake_texture.mat"]], "matslots (in module shasta.preprocessing.bake_texture)": [[7, "shasta.preprocessing.bake_texture.matslots"]], "mesh (in module shasta.preprocessing.bake_texture)": [[7, "shasta.preprocessing.bake_texture.mesh"]], "obs (in module shasta.preprocessing.bake_texture)": [[7, "shasta.preprocessing.bake_texture.obs"]], "ops (in module shasta.preprocessing.bake_texture)": [[7, "shasta.preprocessing.bake_texture.ops"]], "scene (in module shasta.preprocessing.bake_texture)": [[7, "id0"], [7, "shasta.preprocessing.bake_texture.scene"]], "shasta.preprocessing.bake_texture": [[7, "module-shasta.preprocessing.bake_texture"]], "slot (in module shasta.preprocessing.bake_texture)": [[7, "shasta.preprocessing.bake_texture.slot"]], "tex (in module shasta.preprocessing.bake_texture)": [[7, "shasta.preprocessing.bake_texture.tex"]], "shasta.preprocessing": [[8, "module-shasta.preprocessing"]], "preprocess (class in shasta.preprocessing.preprocess)": [[9, "shasta.preprocessing.preprocess.PreProcess"]], "_save_building_info() (preprocess method)": [[9, "shasta.preprocessing.preprocess.PreProcess._save_building_info"]], "_save_graph_info() (preprocess method)": [[9, "shasta.preprocessing.preprocess.PreProcess._save_graph_info"]], "preprocess (in module shasta.preprocessing.preprocess)": [[9, "shasta.preprocessing.preprocess.preprocess"]], "run_processing() (preprocess method)": [[9, "shasta.preprocessing.preprocess.PreProcess.run_processing"]], "shasta.preprocessing.preprocess": [[9, "module-shasta.preprocessing.preprocess"]], "extract_building_info() (in module shasta.preprocessing.utils)": [[10, "shasta.preprocessing.utils.extract_building_info"]], "extract_path_info() (in module shasta.preprocessing.utils)": [[10, "shasta.preprocessing.utils.extract_path_info"]], "save_buildings_map() (in module shasta.preprocessing.utils)": [[10, "shasta.preprocessing.utils.save_buildings_map"]], "shasta.preprocessing.utils": [[10, "module-shasta.preprocessing.utils"]], "formation (class in shasta.primitives.formation)": [[11, "shasta.primitives.formation.Formation"]], "calculate_vel() (formation method)": [[11, "shasta.primitives.formation.Formation.calculate_vel"], [12, "shasta.primitives.Formation.calculate_vel"]], "execute() (formation method)": [[11, "shasta.primitives.formation.Formation.execute"], [12, "shasta.primitives.Formation.execute"]], "shasta.primitives.formation": [[11, "module-shasta.primitives.formation"]], "formation (class in shasta.primitives)": [[12, "shasta.primitives.Formation"]], "pathplanning (class in shasta.primitives)": [[12, "shasta.primitives.PathPlanning"]], "execute() (pathplanning method)": [[12, "shasta.primitives.PathPlanning.execute"], [13, "shasta.primitives.path_planning.PathPlanning.execute"]], "find_path() (pathplanning method)": [[12, "shasta.primitives.PathPlanning.find_path"], [13, "shasta.primitives.path_planning.PathPlanning.find_path"]], "linear_refine_implicit() (pathplanning method)": [[12, "shasta.primitives.PathPlanning.linear_refine_implicit"], [13, "shasta.primitives.path_planning.PathPlanning.linear_refine_implicit"]], "shasta.primitives": [[12, "module-shasta.primitives"]], "pathplanning (class in shasta.primitives.path_planning)": [[13, "shasta.primitives.path_planning.PathPlanning"]], "shasta.primitives.path_planning": [[13, "module-shasta.primitives.path_planning"]], "get_initial_positions() (in module shasta.utils)": [[14, "shasta.utils.get_initial_positions"]], "shasta.utils": [[14, "module-shasta.utils"]], "plot_nodes() (in module shasta.visualize)": [[15, "shasta.visualize.plot_nodes"]], "shasta.visualize": [[15, "module-shasta.visualize"]], "world (class in shasta.world)": [[16, "shasta.world.World"]], "change_camera_position() (world method)": [[16, "shasta.world.World.change_camera_position"]], "load_world_model() (world method)": [[16, "shasta.world.World.load_world_model"]], "shasta.world": [[16, "module-shasta.world"]], "spawn_actor() (world method)": [[16, "shasta.world.World.spawn_actor"]]}}) \ No newline at end of file diff --git a/docs/html/usage.html b/docs/html/usage.html index 60de259..754892c 100644 --- a/docs/html/usage.html +++ b/docs/html/usage.html @@ -1,227 +1,268 @@ + + + + + + + + + Usage - SHaSTA 0.1.0 documentation + + + + + + - - - - + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark mode + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    - - - - - - -
    -
    -
    -
    - -
    -

    UsageΒΆ

    +
    + +
    + +
    +
    +
    +

    Usage#

    To use shasta in a project:

    import shasta
     
    -
    + - -
    - + +
    +
    - - -
    - -
    -

    - - © Copyright 2020, Hemanth Manjunatha - -

    -
    - - - - Built with Sphinx using a - - theme - - provided by Read the Docs. - - - -
    -
    - - - +
    - - - - - - - - - - + + + + + \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 3cf3bb5..ba4a499 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,8 +7,8 @@ Welcome to shasta's documentation! readme installation - usage contributing + code_of_conduct history Indices and tables diff --git a/docs/installation.rst b/docs/installation.rst index 729dd20..edbe5a3 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -34,18 +34,9 @@ You can either clone the public repository: $ git clone git://github.com/hemumanju/shasta -Or download the `tarball`_: - -.. code-block:: console - - $ curl -OJL https://github.com/hemumanju/shasta/tarball/master - -Once you have a copy of the source, you can install it with: - .. code-block:: console $ python setup.py install .. _Github repo: https://github.com/hemumanju/shasta -.. _tarball: https://github.com/hemumanju/shasta/tarball/master diff --git a/docs/readme.rst b/docs/readme.rst index 72a3355..95cacbc 100644 --- a/docs/readme.rst +++ b/docs/readme.rst @@ -1 +1,4 @@ -.. include:: ../README.rst +Welcome +=========== +.. include:: ../README.md + :parser: myst_parser.sphinx_