Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildingAtom committed Feb 27, 2024
1 parent a3fd000 commit d0bb432
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 8 deletions.
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,17 @@ urdfs/
.vscode/

# sphinx
docs/build/
docs/build/

# Generated documentation
_build/
docs/build/
docs/source/**/generated/
docs/_site
_site
docs/dev

# MACOS
.ds_store
.DS_Store
.DS_STORE
33 changes: 33 additions & 0 deletions docs/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:show-inheritance:
:inherited-members:
:undoc-members:

{% block methods %}
.. automethod:: __init__

{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
{% for item in methods %}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Attributes') }}

.. autosummary::
{% for item in attributes %}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
58 changes: 57 additions & 1 deletion docs/source/planner/armour.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
Example RTD Planner Implementation of ARMOUR
============================================
============================================

ArmourPlanner and these related components define the ARMOUR planner as described by Michaux et. al. in https://arxiv.org/abs/2301.13308.
This planner requires the use of the matching robust controller.
Currently a kinematics-only minimal version of this is implemented.

The Base ARMOUR Planner
-----------------------
.. autoclass:: armour.ArmourPlanner.ArmourPlanner
:show-inheritance:
:members:
:undoc-members:

Reachable Set Generation
------------------------
.. automodule:: armour.reachsets
:show-inheritance:
:members:
:undoc-members:
.. currentmodule:: armour.reachsets

Generation of reachable sets are implemented as constraint generating classes, with the following classes generating instances for the constraints.

.. autosummary::
:toctree: generated
:nosignatures:

JRSGenerator
JLSGenerator
FOGenerator
IRSGenerator

.. autosummary::
:toctree: generated
:nosignatures:

JRSInstance
JLSInstance
FOInstance
IRSInstance

Trajectory Types and Factory
----------------------------
.. automodule:: armour.trajectory
:show-inheritance:
:members:
:undoc-members:
.. currentmodule:: armour.trajectory

.. autosummary::
:toctree: generated
:nosignatures:

ZeroHoldArmTrajectory
PiecewiseArmTrajectory
BernsteinArmTrajectory
ArmTrajectoryFactory
67 changes: 66 additions & 1 deletion docs/source/planner/rtd.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,67 @@
RTD Planner Interfaces and Base Classes
=======================================
=======================================

The core components to any mid-level RTD Planner.

The RTD Planner
---------------

This is an interface to specify the midlevel planner.
It's written to be relatively isolated from the rest of the simulation package.

.. autoclass:: rtd.planner.RtdPlanner
:show-inheritance:
:members:
:undoc-members:

Reachable Sets Generation Interfaces
------------------------------------
.. automodule:: rtd.planner.reachsets
:show-inheritance:
:members:
:undoc-members:
.. currentmodule:: rtd.planner.reachsets

.. autosummary::
:toctree: generated
:nosignatures:

ReachSetGenerator
ReachSetInstance

Trajectory Interfaces
---------------------
.. automodule:: rtd.planner.trajectory
:show-inheritance:
:members:
:undoc-members:
.. currentmodule:: rtd.planner.trajectory

.. autosummary::
:toctree: generated
:nosignatures:

Trajectory
InvalidTrajectory
TrajectoryFactory
TrajectoryContainer
BadTrajectoryException

Trajectory Optimization Interfaces & Components
-----------------------------------------------
.. automodule:: rtd.planner.trajopt
:show-inheritance:
:members:
:undoc-members:
.. currentmodule:: rtd.planner.trajopt

.. autosummary::
:toctree: generated
:nosignatures:

TrajOptProps
Objective
GenericArmObjective
OptimizationEngine
ScipyOptimizationEngine
RtdTrajOpt
38 changes: 33 additions & 5 deletions docs/source/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,38 @@ Setup Guide

*rtd-code-python requires Python 3 or higher. For best results, use Python 3.11.3*

General Setup
-------------

1. Clone the repository and open a terminal in the root directory
2. Install *virtualenv* with `py -m pip install virtualenv`
3. Create a new Virtual Environment with `py -m venv rtd_venv`
4. Activate the Virtual Environment with `rtd_venv\scripts\activate`
5. Install *rtd-code-python* and its dependencies with `py -m pip install -r requirements.txt`
6. Optionally, open a terminal inside `scripts\demos` and run the demo scripts
2. Install *virtualenv* with ``py -m pip install virtualenv``
3. Create a new Virtual Environment with ``py -m venv rtd_venv``
4. Activate the Virtual Environment with ``rtd_venv\scripts\activate``
5. Install *rtd-code-python* and its dependencies with ``py -m pip install -r requirements.txt``
6. Optionally, open a terminal inside ``scripts\demos`` and run the demo scripts

(Alternative) Conda Quickstart
------------------------------

Another way to setup rtd-code-python is through the creation and use of a conda environment.
In your desired folder, run the following commands to get a conda environment called ``rtd-code`` setup

.. code-block:: bash
# Create conda environment and install python 3.11.3 & pytorch 2.0.1
# Adjust the torch packages according to your system
conda create -n rtd-code python==3.11.3 pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
conda activate rtd-code
# Clone zonopy dependencies and RTD-Code, and install
git clone [email protected]:roahmlab/zonopy.git
git clone [email protected]:roahmlab/zonopy-robots.git
git clone [email protected]:roahmlab/rtd-code-python.git
pip install -r rtd-code-python/requirements.txt -e zonopy/ -e zonopy-robots/ -e rtd-code-python/
Obtaining URDFs
---------------

To obtain the URDFs used in the demos, please visit the `ARMOUR <https://github.com/roahmlab/armour>`_ repository and download the ``urdfs`` folder.
Place the ``urdfs`` folder in the parent directory of the rtd-code-python repository in order to run ``scripts\demos\planner_demo.py``.

0 comments on commit d0bb432

Please sign in to comment.