Skip to content

Commit

Permalink
Add rsts
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulero committed Jun 28, 2024
1 parent cf1c30f commit 27d3b15
Show file tree
Hide file tree
Showing 27 changed files with 736 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/source/_templates/custom-class-template.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:
:private-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 %}
75 changes: 75 additions & 0 deletions docs/source/_templates/custom-module-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}

{% block attributes %}
{% if attributes %}
.. rubric:: Module Attributes

.. autosummary::
:toctree:
{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:toctree:
:template: custom-class-template.rst
{% for item in classes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block inheritance %}
{% if classes %}

.. inheritance-diagram:: {{ fullname }}
:caption: Inheritance Relationship
:parts: -1
{% endif %}
{% endblock %}

{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
:toctree:
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
:toctree:
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block modules %}
{% if modules %}
.. rubric:: Modules

.. autosummary::
:toctree:
:template: custom-module-template.rst
:recursive:
{% for item in modules %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
51 changes: 51 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.. adam documentation master file, created by
sphinx-quickstart on Fri Jun 28 14:10:15 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
adam
----

**Automatic Differentiation for rigid-body-dynamics AlgorithMs**

**adam** implements a collection of algorithms for calculating rigid-body dynamics for **floating-base** robots, in mixed and body fixed representations using:

.. create rst list with links to the following libraries
- `Jax <https://github.com/google/jax>`_
- `CasADi <https://web.casadi.org/>`_
- `PyTorch <https://github.com/pytorch/pytorch>`_
- `NumPy <https://numpy.org/>`_


**adam** employs the automatic differentiation capabilities of these frameworks to compute, if needed, gradients, Jacobian, Hessians of rigid-body dynamics quantities. This approach enables the design of optimal control and reinforcement learning strategies in robotics.
Thanks to the `jax.vmap`-ing and `jax.jit`-ing capabilities, the algorithms can be run on batches of inputs, which are possibly converted to PyTorch using the `jax2torch` conversion functions.


**adam** is based on **Roy Featherstone's Rigid Body Dynamics Algorithms**.

Examples
--------

Have a look at the examples `folder in the repository <https://github.com/ami-iit/adam/tree/main/examples>`_!


License
-------

`BSD-3-Clause <https://choosealicense.com/licenses/bsd-3-clause/>`_


.. toctree::
:maxdepth: 2
:caption: Getting started:

installation
quickstart/index

.. toctree::
:maxdepth: 2
:caption: API:

modules/index
34 changes: 34 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Installation
============
This is the installation guide for the project.


Prerequisites
-------------

adam requires python 3.7 or later.


🐍 Conda installation
------------------

We suggest to install adam using `conda <https://anaconda.org/>`_:

.. code-block:: bash
conda install adam-robotics -c conda-forge
📦 Pip installation
------------------

You can also install adam using `pip <https://pypi.org/project/pip/>`_:

.. code-block:: bash
pip install adam-robotics
If you want to install all the dependencies install ``adam-robotics[all]``.

.. note::

If the GPU support for ``JAX`` is needed, follow the instructions in the `Jax documentation <https://jax.readthedocs.io/en/latest/installation.html#conda-community-supported>`_.
28 changes: 28 additions & 0 deletions docs/source/modules/adam.core.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
adam.core package
=================

Submodules
----------

adam.core.constants module
--------------------------

.. automodule:: adam.core.constants
:members:
:undoc-members:
:show-inheritance:

adam.core.rbd\_algorithms module
--------------------------------

.. automodule:: adam.core.rbd_algorithms
:members:
:show-inheritance:

adam.core.spatial\_math module
------------------------------

.. automodule:: adam.core.spatial_math
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/source/modules/adam.geometry.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
adam.geometry package
=====================

Submodules
----------

adam.geometry.utils module
--------------------------

.. automodule:: adam.geometry.utils
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: adam.geometry
:members:
:undoc-members:
:show-inheritance:
29 changes: 29 additions & 0 deletions docs/source/modules/adam.model.std_factories.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
adam.model.std\_factories package
=================================

Submodules
----------

adam.model.std\_factories.std\_joint module
-------------------------------------------

.. automodule:: adam.model.std_factories.std_joint
:members:
:undoc-members:
:show-inheritance:

adam.model.std\_factories.std\_link module
------------------------------------------

.. automodule:: adam.model.std_factories.std_link
:members:
:undoc-members:
:show-inheritance:

adam.model.std\_factories.std\_model module
-------------------------------------------

.. automodule:: adam.model.std_factories.std_model
:members:
:undoc-members:
:show-inheritance:
13 changes: 13 additions & 0 deletions docs/source/modules/adam.parametric.casadi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
adam.parametric.casadi package
==============================

Submodules
----------

adam.parametric.casadi.computations\_parametric module
------------------------------------------------------

.. automodule:: adam.parametric.casadi.computations_parametric
:members:
:undoc-members:
:show-inheritance:
13 changes: 13 additions & 0 deletions docs/source/modules/adam.parametric.jax.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
adam.parametric.jax package
===========================

Submodules
----------

adam.parametric.jax.computations\_parametric module
---------------------------------------------------

.. automodule:: adam.parametric.jax.computations_parametric
:members:
:undoc-members:
:show-inheritance:
29 changes: 29 additions & 0 deletions docs/source/modules/adam.parametric.model.parametric_factories.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
adam.parametric.model.parametric\_factories package
===================================================

Submodules
----------

adam.parametric.model.parametric\_factories.parametric\_joint module
--------------------------------------------------------------------

.. automodule:: adam.parametric.model.parametric_factories.parametric_joint
:members:
:undoc-members:
:show-inheritance:

adam.parametric.model.parametric\_factories.parametric\_link module
-------------------------------------------------------------------

.. automodule:: adam.parametric.model.parametric_factories.parametric_link
:members:
:undoc-members:
:show-inheritance:

adam.parametric.model.parametric\_factories.parametric\_model module
--------------------------------------------------------------------

.. automodule:: adam.parametric.model.parametric_factories.parametric_model
:members:
:undoc-members:
:show-inheritance:
10 changes: 10 additions & 0 deletions docs/source/modules/adam.parametric.model.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
adam.parametric.model package
=============================

Subpackages
-----------

.. toctree::
:maxdepth: 4

adam.parametric.model.parametric_factories
13 changes: 13 additions & 0 deletions docs/source/modules/adam.parametric.numpy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
adam.parametric.numpy package
=============================

Submodules
----------

adam.parametric.numpy.computations\_parametric module
-----------------------------------------------------

.. automodule:: adam.parametric.numpy.computations_parametric
:members:
:undoc-members:
:show-inheritance:
13 changes: 13 additions & 0 deletions docs/source/modules/adam.parametric.pytorch.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
adam.parametric.pytorch package
===============================

Submodules
----------

adam.parametric.pytorch.computations\_parametric module
-------------------------------------------------------

.. automodule:: adam.parametric.pytorch.computations_parametric
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 27d3b15

Please sign in to comment.