Commit ca13a749 authored by peterd-NV's avatar peterd-NV Committed by Kelly Guo

Adds mimic extension and recorder manager to API docs (#217)

# Description

Adds Isaac Lab Mimic and Recorder Manager to API docs


<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- This change requires a documentation update

## Screenshots

Please attach before and after screenshots of the change if applicable.

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------
Signed-off-by: 's avatarpeterd-NV <peterd@nvidia.com>
Signed-off-by: 's avatarKelly Guo <kellyg@nvidia.com>
Signed-off-by: 's avatarKelly Guo <kellyguo123@hotmail.com>
Signed-off-by: 's avatarAshwin Varghese Kuruttukulam <123109010+ashwinvkNV@users.noreply.github.com>
Co-authored-by: 's avatarCY Chen <cyc@nvidia.com>
Co-authored-by: 's avataroahmednv <oahmed@Nvidia.com>
Co-authored-by: 's avatarToni-SM <aserranomuno@nvidia.com>
Co-authored-by: 's avatarKelly Guo <kellyg@nvidia.com>
Co-authored-by: 's avatarKelly Guo <kellyguo123@hotmail.com>
Co-authored-by: 's avatarrwiltz <165190220+rwiltz@users.noreply.github.com>
Co-authored-by: 's avatarnv-cupright <92540563+nv-cupright@users.noreply.github.com>
Co-authored-by: 's avatarAlexander Poddubny <143108850+nv-apoddubny@users.noreply.github.com>
Co-authored-by: 's avatarchengronglai <chengrongl@nvidia.com>
Co-authored-by: 's avatarDavid Hoeller <dhoeller@nvidia.com>
Co-authored-by: 's avatarmatthewtrepte <mtrepte@nvidia.com>
Co-authored-by: 's avatarAshwin Varghese Kuruttukulam <123109010+ashwinvkNV@users.noreply.github.com>
Co-authored-by: 's avatarKarsten Patzwaldt <kpatzwaldt@nvidia.com>
parent f30d819b
...@@ -59,3 +59,17 @@ The following wrappers are available in the ``isaaclab_rl`` extension: ...@@ -59,3 +59,17 @@ The following wrappers are available in the ``isaaclab_rl`` extension:
.. autosummary:: .. autosummary::
:toctree: lab_rl :toctree: lab_rl
isaaclab_mimic extension
------------------------
The following modules are available in the ``isaaclab_mimic`` extension:
.. currentmodule:: isaaclab_mimic
.. autosummary::
:toctree: lab_mimic
datagen
envs
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
DirectRLEnvCfg DirectRLEnvCfg
DirectMARLEnv DirectMARLEnv
DirectMARLEnvCfg DirectMARLEnvCfg
ManagerBasedRLMimicEnv
MimicEnvCfg
ViewerCfg ViewerCfg
Manager Based Environment Manager Based Environment
...@@ -76,6 +78,20 @@ Direct Multi-Agent RL Environment ...@@ -76,6 +78,20 @@ Direct Multi-Agent RL Environment
:show-inheritance: :show-inheritance:
:exclude-members: __init__, class_type :exclude-members: __init__, class_type
Mimic Environment
-----------------
.. autoclass:: ManagerBasedRLMimicEnv
:members:
:inherited-members:
:show-inheritance:
.. autoclass:: MimicEnvCfg
:members:
:inherited-members:
:show-inheritance:
:exclude-members: __init__, class_type
Common Common
------ ------
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
TerminationTermCfg TerminationTermCfg
CurriculumManager CurriculumManager
CurriculumTermCfg CurriculumTermCfg
RecorderManager
RecorderTermCfg
Scene Entity Scene Entity
------------ ------------
...@@ -144,3 +146,15 @@ Curriculum Manager ...@@ -144,3 +146,15 @@ Curriculum Manager
.. autoclass:: CurriculumTermCfg .. autoclass:: CurriculumTermCfg
:members: :members:
:exclude-members: __init__ :exclude-members: __init__
Recorder Manager
----------------
.. autoclass:: RecorderManager
:members:
:inherited-members:
:show-inheritance:
.. autoclass:: RecorderTermCfg
:members:
:exclude-members: __init__
isaaclab_mimic.datagen
======================
.. automodule:: isaaclab_mimic.datagen
.. rubric:: Classes
.. autosummary::
DataGenerator
DatagenInfo
DataGenInfoPool
SelectionStrategy
RandomStrategy
NearestNeighborObjectStrategy
NearestNeighborRobotDistanceStrategy
Waypoint
WaypointSequence
WaypointTrajectory
Data Generator
--------------
.. autoclass:: DataGenerator
:members:
:inherited-members:
Datagen Info
------------
.. autoclass:: DatagenInfo
:members:
:inherited-members:
Datagen Info Pool
-----------------
.. autoclass:: DataGenInfoPool
:members:
:inherited-members:
Selection Strategy
------------------
.. autoclass:: SelectionStrategy
:members:
:inherited-members:
Random Strategy
---------------
.. autoclass:: RandomStrategy
:members:
:inherited-members:
Nearest Neighbor Object Strategy
--------------------------------
.. autoclass:: NearestNeighborObjectStrategy
:members:
:inherited-members:
Nearest Neighbor Robot Distance Strategy
----------------------------------------
.. autoclass:: NearestNeighborRobotDistanceStrategy
:members:
:inherited-members:
Waypoint
--------
.. autoclass:: Waypoint
:members:
:inherited-members:
Waypoint Sequence
-----------------
.. autoclass:: WaypointSequence
:members:
:inherited-members:
Waypoint Trajectory
-------------------
.. autoclass:: WaypointTrajectory
:members:
:inherited-members:
isaaclab_mimic.envs
===================
.. automodule:: isaaclab_mimic.envs
.. rubric:: Classes
.. autosummary::
FrankaCubeStackIKRelMimicEnv
FrankaCubeStackIKRelMimicEnvCfg
Franka Cube Stack IK Rel Mimic Env
----------------------------------
.. autoclass:: FrankaCubeStackIKRelMimicEnv
:members:
:inherited-members:
Franka Cube Stack IK Rel Mimic Env Cfg
--------------------------------------
.. autoclass:: FrankaCubeStackIKRelMimicEnvCfg
:members:
:inherited-members:
:show-inheritance:
...@@ -163,7 +163,7 @@ Creating Your Own Isaac Lab Mimic Compatible Environments ...@@ -163,7 +163,7 @@ Creating Your Own Isaac Lab Mimic Compatible Environments
In order to use Isaac Lab Mimic to generate additional demonstrations automatically with an existing Isaac Lab environment, the environment In order to use Isaac Lab Mimic to generate additional demonstrations automatically with an existing Isaac Lab environment, the environment
needs to be made "Mimic compatible" by implementing additional functions which are used during data generation. needs to be made "Mimic compatible" by implementing additional functions which are used during data generation.
Mimic compatible environments are derived from the ``ManagerBasedRLMimicEnv`` base class and must implement the following functions: Mimic compatible environments are derived from the :class:`~isaaclab.envs.ManagerBasedRLMimicEnv` base class and must implement the following functions:
* ``get_robot_eef_pose``: Returns the current robot end effector pose in the same frame as used by the robot end effector controller. * ``get_robot_eef_pose``: Returns the current robot end effector pose in the same frame as used by the robot end effector controller.
...@@ -179,13 +179,11 @@ Mimic compatible environments are derived from the ``ManagerBasedRLMimicEnv`` ba ...@@ -179,13 +179,11 @@ Mimic compatible environments are derived from the ``ManagerBasedRLMimicEnv`` ba
* ``is_success``: Returns a boolean indicator of whether the task has been successfully completed. * ``is_success``: Returns a boolean indicator of whether the task has been successfully completed.
The class ``FrankaCubeStackIKRelMimicEnv`` shows an example of creating a Mimic compatible environment from an existing Isaac Lab environment. The class :class:`~isaaclab_mimic.envs.FrankaCubeStackIKRelMimicEnv` shows an example of creating a Mimic compatible environment from an existing Isaac Lab environment.
It can be found under ``source/isaaclab_mimic/isaaclab_mimic/envs``.
A Mimic compatible environment config class must also be created by extending the existing environment config with additional Mimic required parameters. A Mimic compatible environment config class must also be created by extending the existing environment config with additional Mimic required parameters.
All Mimic required config parameters are specified in the ``MimicEnvCfg`` class found under ``source/isaaclab/isaaclab/envs``. All Mimic required config parameters are specified in the :class:`~isaaclab.envs.MimicEnvCfg` class.
The config class ``FrankaCubeStackIKRelMimicEnvCfg`` shows an example of creating a Mimic compatible environment config class for the Franka stacking task The config class :class:`~isaaclab_mimic.envs.FrankaCubeStackIKRelMimicEnvCfg` shows an example of creating a Mimic compatible environment config class for the Franka stacking task.
and can be found under ``source/isaaclab_mimic/isaaclab_mimic/envs``.
Once both Mimic compatible environment and environment config classes have been created, a new Mimic compatible environment can be registered using ``gym.register`` and used Once both Mimic compatible environment and environment config classes have been created, a new Mimic compatible environment can be registered using ``gym.register`` and used
with Isaac Lab Mimic data generation. For the Franka stacking task in the examples above, the Mimic environment is registered as ``Isaac-Stack-Cube-Franka-IK-Rel-Mimic-v0``. with Isaac Lab Mimic data generation. For the Franka stacking task in the examples above, the Mimic environment is registered as ``Isaac-Stack-Cube-Franka-IK-Rel-Mimic-v0``.
...@@ -3,4 +3,6 @@ ...@@ -3,4 +3,6 @@
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
"""Package containing implementation of Isaac Lab Mimic data generation."""
__version__ = "1.0.0" __version__ = "1.0.0"
...@@ -2,3 +2,11 @@ ...@@ -2,3 +2,11 @@
# All rights reserved. # All rights reserved.
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
"""Sub-package with core implementation logic for Isaac Lab Mimic."""
from .data_generator import *
from .datagen_info import *
from .datagen_info_pool import *
from .selection_strategy import *
from .waypoint import *
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
"""Sub-package with environment wrappers for Isaac Lab Mimic."""
import gymnasium as gym import gymnasium as gym
from .franka_stack_ik_rel_mimic_env import FrankaCubeStackIKRelMimicEnv from .franka_stack_ik_rel_mimic_env import FrankaCubeStackIKRelMimicEnv
......
...@@ -12,6 +12,9 @@ from isaaclab_tasks.manager_based.manipulation.stack.mdp import cubes_stacked ...@@ -12,6 +12,9 @@ from isaaclab_tasks.manager_based.manipulation.stack.mdp import cubes_stacked
class FrankaCubeStackIKRelMimicEnv(ManagerBasedRLMimicEnv): class FrankaCubeStackIKRelMimicEnv(ManagerBasedRLMimicEnv):
"""
Isaac Lab Mimic environment wrapper class for Franka Cube Stack IK Rel env.
"""
def get_robot_eef_pose(self, env_ind=0): def get_robot_eef_pose(self, env_ind=0):
""" """
......
...@@ -11,6 +11,9 @@ from isaaclab_tasks.manager_based.manipulation.stack.config.franka.stack_ik_rel_ ...@@ -11,6 +11,9 @@ from isaaclab_tasks.manager_based.manipulation.stack.config.franka.stack_ik_rel_
@configclass @configclass
class FrankaCubeStackIKRelMimicEnvCfg(FrankaCubeStackEnvCfg, MimicEnvCfg): class FrankaCubeStackIKRelMimicEnvCfg(FrankaCubeStackEnvCfg, MimicEnvCfg):
"""
Isaac Lab Mimic environment config class for Franka Cube Stack IK Rel env.
"""
def __post_init__(self): def __post_init__(self):
# post init of parents # post init of parents
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment