-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8e630fb
Showing
172 changed files
with
48,268 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
neuromechfly.org |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
Oops, something went wrong.