Unverified Commit 359cdc9c authored by -T.K.-'s avatar -T.K.- Committed by GitHub

Fixes importing MotionViewer from external scripts (#2195)

# Description

The `MotionViewer` class is not imported in `__init__.py`, preventing
external scripts from using this class. This PR fixes this issue such
that the MotionViewer class can be imported by external scripts.

The example usage would look like:

```python
from isaaclab.app import AppLauncher

# launch omniverse app
app_launcher = AppLauncher(headless=True)
simulation_app = app_launcher.app

"""Rest everything follows."""

from isaaclab_tasks.direct.humanoid_amp.motions import MotionViewer
```

Fixes #2196 

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [ ] 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
parent 742d8b44
......@@ -8,3 +8,4 @@ AMP Motion Loader and motion files.
"""
from .motion_loader import MotionLoader
from .motion_viewer import MotionViewer
......@@ -10,7 +10,11 @@ import numpy as np
import torch
import mpl_toolkits.mplot3d # noqa: F401
from motion_loader import MotionLoader
try:
from .motion_loader import MotionLoader
except ImportError:
from motion_loader import MotionLoader
class MotionViewer:
......
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