Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KincoActuatorIsaacLab
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kevin
KincoActuatorIsaacLab
Commits
5d39e0ed
Commit
5d39e0ed
authored
May 01, 2024
by
Mayank Mittal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds documentation on adding your own learning library
parent
17d781ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
0 deletions
+92
-0
add_own_library.rst
docs/source/how-to/add_own_library.rst
+91
-0
index.rst
docs/source/how-to/index.rst
+1
-0
No files found.
docs/source/how-to/add_own_library.rst
0 → 100644
View file @
5d39e0ed
Adding your own learning library
================================
Orbit comes pre-integrated with a number of libraries (such as RSL-RL , RL-Games, Stable Baselines, etc.).
However, you may want to integrate your own library with Orbit or use a different version of the libraries than
the one installed by Orbit. This is possible as long as the library is available as Python package that supports
the Python version used by the underlying simulator. For instance, if you are using Isaac Sim 2023.1.1, you need
to ensure that the library is available for Python 3.10.
Using a different version of a library
--------------------------------------
If you want to use a different version of a library than the one installed by Orbit, you can install the library
by building it from source or using a different version of the library available on PyPI.
For instance, if you want to use your own modified version of the `rsl-rl`_ library, you can follow these steps:
1. Follow the instructions for installing Orbit. This will install the default version of the ``rsl-rl`` library.
2. Clone the ``rsl-rl`` library from the GitHub repository:
.. code-block:: bash
git clone git@github.com:leggedrobotics/rsl_rl.git
3. Install the library in your Python environment:
.. code-block:: bash
# Assuming you are in the root directory of the Orbit repository
cd orbit
# Note: If you are using a virtual environment, make sure to activate it before running the following command
./orbit.sh -p -m pip install -e /path/to/rsl_rl
In this case, the ``rsl-rl`` library will be installed in the Python environment used by Orbit. You can now use the
``rsl-rl`` library in your experiments. To check the library version and other details, you can use the following
command:
.. code-block:: bash
./orbit.sh -p -m pip show rsl-rl
This should now show the location of the ``rsl-rl`` library as the directory where you cloned the library.
For instance, if you cloned the library to ``/home/user/git/rsl_rl``, the output of the above command should be:
.. code-block:: bash
Name: rsl_rl
Version: 2.0.2
Summary: Fast and simple RL algorithms implemented in pytorch
Home-page: https://github.com/leggedrobotics/rsl_rl
Author: ETH Zurich, NVIDIA CORPORATION
Author-email:
License: BSD-3
Location: /home/user/git/rsl_rl
Requires: torch, torchvision, numpy, GitPython, onnx
Required-by:
Integrating a new library
-------------------------
Adding a new library to Orbit is similar to using a different version of a library. You can install the library
in your Python environment and use it in your experiments. However, if you want to integrate the library with
Orbit, you can will first need to make a wrapper for the library, as explained in
:ref:`how-to-env-wrappers`.
The following steps can be followed to integrate a new library with Orbit:
1. Add your library as an extra-dependency in the ``setup.py`` for the extension ``omni.isaac.orbit_tasks``.
This will ensure that the library is installed when you install Orbit or it will complain if the library is not
installed or available.
2. Install your library in the Python environment used by Orbit. You can do this by following the steps mentioned
in the previous section.
3. Create a wrapper for the library. You can check the module :mod:`omni.isaac.orbit_tasks.utils.wrappers`
for examples of wrappers for different libraries. You can create a new wrapper for your library and add it to the
module. You can also create a new module for the wrapper if you prefer.
4. Create workflow scripts for your library to train and evaluate agents. You can check the existing workflow scripts
in the ``source/standalone/workflows`` directory for examples. You can create new workflow
scripts for your library and add them to the directory.
Optionally, you can also add some tests and documentation for the wrapper. This will help ensure that the wrapper
works as expected and can guide users on how to use the wrapper.
* Add some tests to ensure that the wrapper works as expected and remains compatible with the library.
These tests can be added to the ``source/extensions/omni.isaac.orbit_tasks/test/wrappers`` directory.
* Add some documentation for the wrapper. You can add the API documentation to the
``docs/source/api/orbit_tasks/omni.isaac.orbit_tasks.utils.wrappers.rst`` file.
.. _rsl-rl: https://github.com/leggedrobotics/rsl_rl
docs/source/how-to/index.rst
View file @
5d39e0ed
...
...
@@ -19,5 +19,6 @@ use Orbit. If you are new to Orbit, we recommend you start with the tutorials.
save_camera_output
draw_markers
wrap_rl_env
add_own_library
master_omniverse
record_animation
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment