Skip to content

Commit

Permalink
deploy: e219519
Browse files Browse the repository at this point in the history
  • Loading branch information
ramdya committed Nov 13, 2024
0 parents commit 8e630fb
Show file tree
Hide file tree
Showing 172 changed files with 48,268 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 5b5a45ef54eeffa5f91a1a24e317bc7c
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/api_ref/arena.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/camera.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api_ref/examples/index.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/examples/locomotion.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/examples/olfaction.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api_ref/examples/vision.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/fly.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/index.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/legacy.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/mdp_specs.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/olfaction.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/preprogrammed.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/simulation.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/state.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/utils.doctree
Binary file not shown.
Binary file added .doctrees/api_ref/vision.doctree
Binary file not shown.
Binary file added .doctrees/changelog.doctree
Binary file not shown.
Binary file added .doctrees/contributing.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/gallery/index.doctree
Binary file not shown.
Binary file added .doctrees/gallery/video_10_odour_taxis.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/gallery/video_14_fly_follow_fly.doctree
Binary file not shown.
Binary file added .doctrees/gallery/video_3_forces.doctree
Binary file not shown.
Binary file added .doctrees/gallery/video_4_climbing.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/gallery/video_9_visual_taxis.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/installation.doctree
Binary file not shown.
Binary file added .doctrees/neuromechfly.doctree
Binary file not shown.
Binary file added .doctrees/tutorials/advanced_olfaction.doctree
Binary file not shown.
Binary file added .doctrees/tutorials/advanced_vision.doctree
Binary file not shown.
Binary file added .doctrees/tutorials/cpg_controller.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/tutorials/head_stabilization.doctree
Binary file not shown.
Binary file added .doctrees/tutorials/hybrid_controller.doctree
Binary file not shown.
Binary file added .doctrees/tutorials/index.doctree
Binary file not shown.
Binary file added .doctrees/tutorials/olfaction_basics.doctree
Binary file not shown.
Binary file added .doctrees/tutorials/path_integration.doctree
Binary file not shown.
Binary file added .doctrees/tutorials/rule_based_controller.doctree
Binary file not shown.
Binary file added .doctrees/tutorials/turning.doctree
Binary file not shown.
Binary file added .doctrees/tutorials/vision_basics.doctree
Binary file not shown.
Binary file added .doctrees/workshop.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
neuromechfly.org
Binary file added _images/fly_anatomy.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/neuromechfly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions _sources/api_ref/arena.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Arena
=====

An arena is a physical environment in which the simulated fly is placed. Arenas can have rugged surfaces, visual features, odor features, or any combination thereof. The user can implement their own arenas by inheriting from the ``flygym.arena.BaseArena`` class.

This page provides the API reference for the ``BaseArena`` abstract class as well as the preprogrammed arenas.

Base arena
----------
.. autoclass:: flygym.arena.BaseArena
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autoclass:: flygym.arena.FlatTerrain

Preprogrammed complex terrain arenas
------------------------------------

.. autoclass:: flygym.arena.GappedTerrain

.. autoclass:: flygym.arena.BlocksTerrain

.. autoclass:: flygym.arena.MixedTerrain

Preprogrammed arenas with sensory features
------------------------------------------

.. autoclass:: flygym.arena.OdorArena
41 changes: 41 additions & 0 deletions _sources/api_ref/camera.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Camera
======

The ``Camera`` class defines how images should be rendered from a camera in the world model. Note that the ``Camera`` class does not by itself add a camera to the MuJoCo model — the camera must have already existed and can be referenced by its name. The camera can be added in two ways:

1. By adding a camera to the MuJoCo model file. Refer to the `section on camera <https://mujoco.readthedocs.io/en/stable/XMLreference.html#body-camera>`_ in the MuJoCo XML reference for more information. As an example, the following XML code adds a tracking camera to the MuJoCo model:

.. code-block:: xml
<worldbody>
<!-- ... other things ... -->
<camera name="camera_top" class="nmf" mode="track" ipd="0.068" pos="0 0 8" euler="0 0 0"/>
</worldbody>
2. By calling ``.worldbody.add()`` on the root element of the MuJoCo model programmatically in Python. Practically, this can be done by extending an existing FlyGym Arena class and adding the camera in the ``__init__`` method. For example, the following code adds a stationary bird's eye camera to the MuJoCo model:

.. code-block:: python3
from flygym.arena import BaseArena
class MyArena(BaseArena):
def __init__(self):
super().__init__()
self.birdeye_cam = self.root_element.worldbody.add(
"camera",
name="birdseye_cam",
mode="fixed",
pos=(20, 0, 20),
euler=(0, 0, 0),
fovy=60,
)
# ... other things ...
Once the camera is added to the MuJoCo model, it can be referenced by its name to initialize the ``Camera`` object with additional parameters assigned to it. These can include: rendering rate in frames-per-second (FPS), window size, play speed, etc. Furthermore, the ``Camera`` class has useful methods such as ``.save_video``, ``.reset``, etc. Logics such as rotating the camera in tilted terrain are also implemented in the ``Camera`` class. The ``.render`` method is the main point of entry for fetching images from the camera.

The full API reference of the ``Camera`` class is as follows:

.. autoclass:: flygym.camera.Camera
:members:
:undoc-members:
:show-inheritance:
31 changes: 31 additions & 0 deletions _sources/api_ref/examples/head_stabilization.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Head Stabilization
==================

Model
-----
.. autoclass:: flygym.examples.head_stabilization.JointAngleScaler
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autoclass:: flygym.examples.head_stabilization.WalkingDataset
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: flygym.examples.head_stabilization.ThreeLayerMLP
:members:
:show-inheritance:

.. autoclass:: flygym.examples.head_stabilization.HeadStabilizationInferenceWrapper
:members:
:undoc-members:
:show-inheritance:
:inherited-members:


Utilities
---------
.. autofunction:: flygym.examples.head_stabilization.util.get_head_stabilization_model_paths

14 changes: 14 additions & 0 deletions _sources/api_ref/examples/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FlyGym Examples
===============

This section of the documentation provides the complete API reference for the examples accompanying the FlyGym package.


.. toctree::
:maxdepth: 2

locomotion
vision
olfaction
path_integration
head_stabilization
58 changes: 58 additions & 0 deletions _sources/api_ref/examples/locomotion.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Locomotion
==========

Preprogrammed steps
-------------------

.. autoclass:: flygym.examples.locomotion.PreprogrammedSteps
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

CPG controller
--------------

.. autoclass:: flygym.examples.locomotion.CPGNetwork
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Rule-based controller
---------------------

.. autoclass:: flygym.examples.locomotion.RuleBasedController
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Hybrid turning controller
-------------------------

.. autoclass:: flygym.examples.locomotion.HybridTurningController
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Hybrid turning fly
------------------

.. autoclass:: flygym.examples.locomotion.HybridTurningFly
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Utility class for coloring body segments of the fly
---------------------------------------------------

The following utility class is a wrapper around the ``Fly`` class that facilitates the recoloring of specific segments. This is useful for, as an example, recoloring parts of the leg depending on the activation of specific correction rules.

.. autoclass:: flygym.examples.locomotion.ColorableFly
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
40 changes: 40 additions & 0 deletions _sources/api_ref/examples/olfaction.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Advanced Olfaction
==================

Arenas
------

.. autoclass:: flygym.examples.vision.arena.ObstacleOdorArena
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
:noindex:

.. autoclass:: flygym.examples.olfaction.OdorPlumeArena
:members:
:undoc-members:
:show-inheritance:
:inherited-members:


Tracking complex plumes
-----------------------

.. autoclass:: flygym.examples.olfaction.PlumeNavigationTask
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autoclass:: flygym.examples.olfaction.WalkingState
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autoclass:: flygym.examples.olfaction.PlumeNavigationController
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
52 changes: 52 additions & 0 deletions _sources/api_ref/examples/path_integration.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Path Integration
================

Arena
-----

.. autoclass:: flygym.examples.path_integration.PathIntegrationArenaBase
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autoclass:: flygym.examples.path_integration.PathIntegrationArenaFlat
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: flygym.examples.path_integration.PathIntegrationArenaBlocks
:members:
:undoc-members:
:show-inheritance:

Controller
----------
.. autoclass:: flygym.examples.path_integration.RandomExplorationController
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autoclass:: flygym.examples.path_integration.PathIntegrationController
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Model
-----
.. autoclass:: flygym.examples.path_integration.LinearModel
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autofunction:: flygym.examples.path_integration.path_integrate

Utilities
---------
.. autofunction:: flygym.examples.path_integration.util.get_leg_mask

.. autofunction:: flygym.examples.path_integration.util.extract_variables

60 changes: 60 additions & 0 deletions _sources/api_ref/examples/vision.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Advanced Vision
===============

Arenas
------
.. autoclass:: flygym.examples.vision.arena.MovingObjArena
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autoclass:: flygym.examples.vision.arena.MovingFlyArena
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autoclass:: flygym.examples.vision.arena.MovingBarArena
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autoclass:: flygym.examples.vision.arena.ObstacleOdorArena
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Simple visual taxis
-------------------

.. autoclass:: flygym.examples.vision.simple_visual_taxis.VisualTaxis
:members:
:undoc-members:
:show-inheritance:

Connectome-constrained vision model
-----------------------------------

.. autoclass:: flygym.examples.vision.RealTimeVisionNetwork
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: flygym.examples.vision.RealTimeVisionNetworkView
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: flygym.examples.vision.RetinaMapper
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. autoclass:: flygym.examples.vision.RealisticVisionFly
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions _sources/api_ref/fly.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Fly
===

An object of the ``Fly`` class is an instance of a simulated fly. There can be multiple flies in a `Simulation <simulation.html>`_. The ``Fly`` object contains parameters related to the fly but not the whole simulation: for example, the set of actuated joints, spawn position, joint actuator parameters (stiffness, damping, etc.), and initial pose.

.. autoclass:: flygym.Fly
:members:
21 changes: 21 additions & 0 deletions _sources/api_ref/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
API Reference
=============

This section of the documentation provides the complete API reference for the FlyGym package.


.. toctree::
:maxdepth: 2

mdp_specs
fly
arena
camera
simulation
state
vision
olfaction
utils
preprogrammed
examples/index
legacy
11 changes: 11 additions & 0 deletions _sources/api_ref/legacy.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Legacy API
==========

.. warning::

This API, inherited from the 0.x.x versions, is deprecated and will be removed in a future release. Please use the new API (the rest of the documentation) instead.

.. automodule:: flygym.core
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 8e630fb

Please sign in to comment.