Merge branch 'og-develop' into curobo
This commit is contained in:
commit
3232a45cbc
|
@ -0,0 +1,38 @@
|
|||
# This workflow will upload a Python Package using Twine when a release is created
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
name: Upload Python Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
pypi-publish:
|
||||
name: Upload release to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/p/omnigibson
|
||||
permissions:
|
||||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools wheel twine
|
||||
- name: Build package
|
||||
run: python setup.py sdist
|
||||
- name: Publish package distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@v1.10.2
|
|
@ -72,6 +72,7 @@ gibson/assets
|
|||
notebook
|
||||
build
|
||||
dist
|
||||
omnigibson.egg-info
|
||||
|
||||
# Directories used for QC pipeline
|
||||
omnigibson/utils/data_utils/mesh_decimation/collision
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
-------
|
||||
|
||||
### Latest Updates
|
||||
- [10/01/24] **v1.1.0**: Major improvements, stability fixes, pip installation, and much more! [[release notes]](https://github.com/StanfordVL/OmniGibson/releases/tag/v1.1.0)
|
||||
|
||||
- [03/17/24] **v1.0.0**: First full release with 1,004 pre-sampled tasks, all 50 scenes, and many new objects! [[release notes]](https://github.com/StanfordVL/OmniGibson/releases/tag/v1.0.0)
|
||||
|
||||
- [08/04/23] **v0.2.0**: More assets! 600 pre-sampled tasks, 7 new scenes, and many new objects 📈 [[release notes]](https://github.com/StanfordVL/OmniGibson/releases/tag/v0.2.0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM nvcr.io/nvidia/isaac-sim:4.0.0
|
||||
FROM nvcr.io/nvidia/isaac-sim:4.1.0
|
||||
|
||||
# Set up all the prerequisites.
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
Binary file not shown.
Before Width: | Height: | Size: 700 KiB After Width: | Height: | Size: 1.8 MiB |
|
@ -21,30 +21,45 @@ Please make sure your system meets the following specs:
|
|||
|
||||
There are three ways to setup **`OmniGibson`**, all built upon different ways of installing NVIDIA Isaac Sim:
|
||||
|
||||
- **🐍 Pip Install (Linux / Windows, Recommended)**: You can clone **`Omnigibson`** and automatically install Isaac Sim through pip for the fastest startup.
|
||||
- **🐍 Install with pip (Linux / Windows, Recommended)**: You can install **`Omnigibson`** and automatically install Isaac Sim through pip for the fastest startup.
|
||||
- **🐳 Install with Docker (Linux only)**: You can quickly get **`OmniGibson`** immediately up and running from our pre-built docker image that includes Isaac Sim.
|
||||
- **🧪 Install with Omniverse Launcher (Linux / Windows)**: You can install Isaac Sim via the Omniverse launcher and hook **`OmniGibson`** up to it.
|
||||
|
||||
!!! tip ""
|
||||
=== "🐍 Pip Install (Linux / Windows)"
|
||||
=== "🐍 Install with pip (Linux / Windows)"
|
||||
|
||||
<div class="annotate" markdown>
|
||||
|
||||
1. Create a conda environment with Python version **`3.10`**:
|
||||
1. Create a conda environment with Python version **`3.10`** and numpy and PyTorch:
|
||||
|
||||
```shell
|
||||
conda create -n omnigibson python=3.10
|
||||
conda create -n omnigibson python=3.10 pytorch torchvision torchaudio pytorch-cuda=12.1 "numpy<2" -c pytorch -c nvidia
|
||||
conda activate omnigibson
|
||||
```
|
||||
|
||||
2. Install OmniGibson with the optional Isaac Sim dependency:
|
||||
??? question "What should I do if `conda create` fails?"
|
||||
|
||||
Sometimes, conda will fail to resolve dependencies. In that case, you can create a Python-only conda environment
|
||||
first, and then install numpy<2 and PyTorch via pip.
|
||||
|
||||
If the default PyTorch version does not work for you due to a CUDA version compatibility issue, follow instructions
|
||||
on [the PyTorch website](https://pytorch.org/get-started/locally/) to add the correct index option to the pip install
|
||||
line to get a different pytorch version.
|
||||
|
||||
```shell
|
||||
conda create -n omnigibson python=3.10
|
||||
conda activate omnigibson
|
||||
pip install "numpy<2" torch torchvision torchaudio
|
||||
```
|
||||
|
||||
2. Install OmniGibson:
|
||||
|
||||
<div class="grid" markdown>
|
||||
|
||||
!!! note "Install from PyPI (source not editable)"
|
||||
|
||||
```shell
|
||||
pip install --no-cache-dir omnigibson[isaac]
|
||||
pip install omnigibson
|
||||
```
|
||||
|
||||
!!! example "Install from GitHub (source editable)"
|
||||
|
@ -52,38 +67,24 @@ There are three ways to setup **`OmniGibson`**, all built upon different ways of
|
|||
```shell
|
||||
git clone https://github.com/StanfordVL/OmniGibson.git
|
||||
cd OmniGibson
|
||||
pip install --no-cache-dir -e .[isaac]
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
If this step fails, we recommend trying the [source installation](#-install-from-source-linux--windows) method.
|
||||
!!! note "Nightly build"
|
||||
|
||||
4. Run Isaac Sim to accept the EULA:
|
||||
The main branch contains the stable version of **`OmniGibson`**. For our latest developed (yet not fully tested) features and bug fixes, please clone from the `og-develop` branch.
|
||||
|
||||
```shell
|
||||
isaacsim
|
||||
3. Run the installation script to install Isaac Sim as well as **`OmniGibson`** dataset and assets:
|
||||
|
||||
```{.shell .annotate}
|
||||
python -m omnigibson.install # (1)!
|
||||
```
|
||||
|
||||
!!! important "EULA Acceptance"
|
||||
It is necessary to accept the Omniverse License Agreement (EULA) in order to use Isaac Sim.
|
||||
The first time `isaacsim` is imported, you will be prompted to accept the EULA:
|
||||
1. You can apply additional flag `--no-install-datasets` to skip dataset install.
|
||||
|
||||
```
|
||||
By installing or using Omniverse Kit, I agree to the terms of NVIDIA OMNIVERSE LICENSE AGREEMENT (EULA)
|
||||
in https://docs.omniverse.nvidia.com/platform/latest/common/NVIDIA_Omniverse_License_Agreement.html
|
||||
Do you accept the EULA? (Yes/No)
|
||||
```
|
||||
|
||||
You must respond with 'Yes' to proceed. Once the EULA is accepted, it should not appear on subsequent Isaac Sim calls. If the EULA is not accepted, the execution will be terminated.
|
||||
|
||||
**You might get some error dialogs that are safe to ignore. After accepting the EULA, you can close Isaac Sim.**
|
||||
|
||||
5. Download **`OmniGibson`** dataset and assets:
|
||||
|
||||
```shell
|
||||
python -m omnigibson.download_datasets
|
||||
```
|
||||
If this step fails, we recommend considering the [source installation](#__tabbed_1_3) method.
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -146,87 +147,87 @@ There are three ways to setup **`OmniGibson`**, all built upon different ways of
|
|||
|
||||
Docker containers are unable to access NFS or AFS drives, so if `run_docker.sh` are located on an NFS / AFS partition, please set `<DATA_PATH>` to an alternative data directory located on a non-NFS / AFS partition.
|
||||
|
||||
=== "🧪 Install from source (Linux / Windows)"
|
||||
=== "🧪 Install with Omniverse Launcher (Linux / Windows)"
|
||||
|
||||
Install **`OmniGibson`** from source is supported for both **🐧 Linux (bash)** and **📁 Windows (powershell/cmd)**.
|
||||
!!! example ""
|
||||
=== "🐧 Linux (bash)"
|
||||
Install **`OmniGibson`** with Omniverse Launcher is supported for both **🐧 Linux (bash)** and **📁 Windows (powershell/cmd)**.
|
||||
|
||||
<div class="annotate" markdown>
|
||||
<div class="annotate" markdown>
|
||||
|
||||
1. Install [Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) and NVIDIA's [Omniverse Isaac Sim](https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/install_workstation.html)
|
||||
1. Install [Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) and NVIDIA's [Omniverse Isaac Sim](https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/install_workstation.html)
|
||||
|
||||
!!! warning "Please make sure you have the latest version of Isaac Sim (2023.1.1) installed."
|
||||
!!! warning "Please make sure you have the currently supported version of Isaac Sim (4.1.0) installed."
|
||||
|
||||
For Ubuntu 22.04, you need to [install FUSE](https://github.com/AppImage/AppImageKit/wiki/FUSE) to run the Omniverse Launcher AppImage.
|
||||
For Ubuntu 22.04, you need to [install FUSE](https://github.com/AppImage/AppImageKit/wiki/FUSE) to run the Omniverse Launcher AppImage.
|
||||
|
||||
2. Clone [**`OmniGibson`**](https://github.com/StanfordVL/OmniGibson) and move into the directory:
|
||||
2. Create a conda environment with Python version **`3.10`**:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/StanfordVL/OmniGibson.git
|
||||
cd OmniGibson
|
||||
```
|
||||
```shell
|
||||
conda create -n omnigibson python=3.10 pytorch torchvision torchaudio pytorch-cuda=12.1 "numpy<2" -c pytorch -c nvidia
|
||||
conda activate omnigibson
|
||||
```
|
||||
|
||||
??? question "What should I do if `conda create` fails?"
|
||||
|
||||
Sometimes, conda will fail to resolve dependencies. In that case, you can create a Python-only conda environment
|
||||
first, and then install numpy<2 and PyTorch via pip.
|
||||
|
||||
??? note "Nightly build"
|
||||
If the default PyTorch version does not work for you due to a CUDA version compatibility issue, follow instructions
|
||||
on [the PyTorch website](https://pytorch.org/get-started/locally/) to add the correct index option to the pip install
|
||||
line to get a different pytorch version.
|
||||
|
||||
The main branch contains the stable version of **`OmniGibson`**. For our latest developed (yet not fully tested) features and bug fixes, please clone from the `og-develop` branch.
|
||||
```shell
|
||||
conda create -n omnigibson python=3.10
|
||||
conda activate omnigibson
|
||||
pip install "numpy<2" torch torchvision torchaudio
|
||||
```
|
||||
|
||||
3. Setup a virtual conda environment to run **`OmniGibson`**:
|
||||
3. Install OmniGibson:
|
||||
|
||||
```{.shell .annotate}
|
||||
./scripts/setup.sh # (1)!
|
||||
```
|
||||
<div class="grid" markdown>
|
||||
|
||||
1. The script will ask you which Isaac Sim to use. If you installed it in the default location, it should be `~/.local/share/ov/pkg/isaac_sim-2023.1.1`
|
||||
!!! note "Install from PyPI (source not editable)"
|
||||
|
||||
This will create a conda env with `omnigibson` installed. Simply call `conda activate` to activate it.
|
||||
```shell
|
||||
pip install omnigibson
|
||||
```
|
||||
|
||||
4. Download **`OmniGibson`** dataset (within the conda env):
|
||||
!!! example "Install from GitHub (source editable)"
|
||||
|
||||
```shell
|
||||
python -m omnigibson.download_datasets
|
||||
```
|
||||
```shell
|
||||
git clone https://github.com/StanfordVL/OmniGibson.git
|
||||
cd OmniGibson
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
!!! note "Nightly build"
|
||||
|
||||
=== "📁 Windows (powershell/cmd)"
|
||||
The main branch contains the stable version of **`OmniGibson`**. For our latest developed (yet not fully tested) features and bug fixes, please clone from the `og-develop` branch.
|
||||
|
||||
<div class="annotate" markdown>
|
||||
4. Run the installation script to hook the environment up to Isaac Sim as well as **`OmniGibson`** dataset and assets:
|
||||
|
||||
1. Install [Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) and NVIDIA's [Omniverse Isaac Sim](https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/install_workstation.html)
|
||||
```{.shell .annotate}
|
||||
python -m omnigibson.install --launcher-install # (1)!
|
||||
```
|
||||
|
||||
!!! warning "Please make sure you have the latest version of Isaac Sim (2023.1.1) installed."
|
||||
1. You can specify your Isaac Sim install location using the argument `--isaac-sim-path` if it differs from the default. You can also apply additional flag `--no-install-datasets` to skip dataset install.
|
||||
|
||||
2. Clone [**`OmniGibson`**](https://github.com/StanfordVL/OmniGibson) and move into the directory:
|
||||
!!! note "What does this do?"
|
||||
|
||||
```shell
|
||||
git clone https://github.com/StanfordVL/OmniGibson.git
|
||||
cd OmniGibson
|
||||
```
|
||||
When you install OmniGibson this way, it will modify your conda environment setup to hook it up to the launcher-installed Isaac Sim.
|
||||
|
||||
??? note "Nightly build"
|
||||
5. Deactivate and reactivate the conda environment:
|
||||
|
||||
The main branch contains the stable version of **`OmniGibson`**. For our latest developed (yet not fully tested) features and bug fixes, please clone from the `og-develop` branch.
|
||||
Because the environment was modified by the installer to hook it up to the launcher-installed Isaac Sim, you need to reactivate it.
|
||||
|
||||
3. Setup a virtual conda environment to run **`OmniGibson`**:
|
||||
```shell
|
||||
conda deactivate
|
||||
conda activate omnigibson
|
||||
```
|
||||
|
||||
```{.powershell .annotate}
|
||||
.\scripts\setup.bat # (1)!
|
||||
```
|
||||
</div>
|
||||
|
||||
1. The script will ask you which Isaac Sim to use. If you installed it in the default location, it should be `C:\Users\<USER_NAME>\AppData\Local\ov\pkg\isaac_sim-2023.1.1`
|
||||
|
||||
This will create a conda env with `omnigibson` installed. Simply call `conda activate` to activate it.
|
||||
|
||||
4. Download **`OmniGibson`** dataset (within the conda env):
|
||||
|
||||
```powershell
|
||||
python -m omnigibson.download_datasets
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
## 🌎 **Explore `OmniGibson`!**
|
||||
|
@ -237,7 +238,18 @@ There are three ways to setup **`OmniGibson`**, all built upon different ways of
|
|||
|
||||
The process could take up to 5 minutes. This is expected behavior, and should only occur once!
|
||||
|
||||
**`OmniGibson`** is now successfully installed! Try exploring some of our new scenes interactively:
|
||||
**`OmniGibson`** is now successfully installed! You can try teleoperating one of our robots:
|
||||
|
||||
```{.shell .annotate}
|
||||
python -m omnigibson.examples.robots.robot_control_example --quickstart # (1)!
|
||||
```
|
||||
|
||||
1. This demo lets you choose a scene, robot, and set of controllers, and then teleoperate the robot using your keyboard.
|
||||
The `--quickstart` flag will automatically select the scene and robot for you - remove that if you want to change
|
||||
the scene or robot.
|
||||
|
||||
|
||||
You can also try exploring some of our new scenes interactively:
|
||||
|
||||
```{.shell .annotate}
|
||||
python -m omnigibson.examples.scenes.scene_selector # (1)!
|
||||
|
@ -245,14 +257,6 @@ python -m omnigibson.examples.scenes.scene_selector # (1)!
|
|||
|
||||
1. This demo lets you choose a scene and interactively move around using your keyboard and mouse. Hold down **`Shift`** and then **`Left-click + Drag`** an object to apply forces!
|
||||
|
||||
You can also try teleoperating one of our robots:
|
||||
|
||||
```{.shell .annotate}
|
||||
python -m omnigibson.examples.robots.robot_control_example # (1)!
|
||||
```
|
||||
|
||||
1. This demo lets you choose a scene, robot, and set of controllers, and then teleoperate the robot using your keyboard.
|
||||
|
||||
***
|
||||
|
||||
**Next:** Get quickly familiarized with **`OmniGibson`** from our [Quickstart Guide](./quickstart.md)!
|
||||
|
@ -266,4 +270,23 @@ python -m omnigibson.examples.robots.robot_control_example # (1)!
|
|||
|
||||
??? question "OmniGibson is stuck at `HydraEngine rtx failed creating scene renderer.`"
|
||||
|
||||
`OmniGibson` is likely using an unsupported GPU (default is id 0). Run `nvidia-smi` to see the active list of GPUs, and select an NVIDIA-supported GPU and set its corresponding ID when running `OmniGibson` with `export OMNIGIBSON_GPU_ID=<ID NUMBER>`.
|
||||
`OmniGibson` is likely using an unsupported GPU (default is id 0). Run `nvidia-smi` to see the active list of GPUs, and select an NVIDIA-supported GPU and set its corresponding ID when running `OmniGibson` with `export OMNIGIBSON_GPU_ID=<ID NUMBER>`.
|
||||
|
||||
??? question "I'm getting the error `AttributeError: module 'x509' has no attribute 'Store'`"
|
||||
|
||||
This happens because launcher-based versions of Isaac Sim ship with a faulty copy of the `cryptography` module. You can simply look at the stack trace for the path of your copy of
|
||||
the cryptography module, e.g. if it shows an error that looks like this:
|
||||
|
||||
```
|
||||
File "c:/users/cem/appdata/local/ov/pkg/isaac-sim-4.1.0/exts/omni.pip.cloud/pip_prebundle/cryptography/hazmat/backends/openssl/__init__.py", line 7, in <module>
|
||||
from cryptography.hazmat.backends.openssl.backend import backend
|
||||
File "c:/users/cem/appdata/local/ov/pkg/isaac-sim-4.1.0/exts/omni.pip.cloud/pip_prebundle/cryptography/hazmat/backends/openssl/backend.py", line 12, in <module>
|
||||
from cryptography import utils, x509
|
||||
File "c:/users/cem/appdata/local/ov/pkg/isaac-sim-4.1.0/exts/omni.pip.cloud/pip_prebundle/cryptography/x509/__init__.py", line 7, in <module>
|
||||
from cryptography.x509 import certificate_transparency, verification
|
||||
File "c:/users/cem/appdata/local/ov/pkg/isaac-sim-4.1.0/exts/omni.pip.cloud/pip_prebundle/cryptography/x509/verification.py", line 20, in <module>
|
||||
Store = rust_x509.Store
|
||||
AttributeError: module 'x509' has no attribute 'Store'
|
||||
```
|
||||
|
||||
You can simply remove the `c:/users/cem/appdata/local/ov/pkg/isaac-sim-4.1.0/exts/omni.pip.cloud/pip_prebundle/cryptography` directory and this issue should be resolved.
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
icon: material/email
|
||||
---
|
||||
|
||||
# **Contact**
|
||||
|
||||
If you have any questions, comments, or concerns, please feel free to reach out to us by joining our Discord server:
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
icon: material/arm-flex
|
||||
---
|
||||
|
||||
# **Contribution Guidelines**
|
||||
|
||||
We sincerely welcome contributions of any form to OmniGibson, as our aim is to make it a more robust and useful resource for the community. We have always held the belief that a collective effort from the community is essential to tailor BEHAVIOR/OmniGibson to meet diverse needs and unlock its full potential.
|
||||
|
@ -48,4 +52,18 @@ The BEHAVIOR suite has continuous integration running via Github Actions in cont
|
|||
* Docs builds are run on the behavior-website repo along with the rest of the website.
|
||||
* When GitHub releases are created, a source distribution will be packed and shipped on PyPI by a hosted runner
|
||||
|
||||
For more information about the workflows and runners, please reach out on our Discord channel.
|
||||
For more information about the workflows and runners, please reach out on our Discord channel.
|
||||
|
||||
## **Release Process**
|
||||
At the time of each release, we follow the below process:
|
||||
|
||||
1. Update the version of OmniGibson in the pyproject.toml and __init__.py files.
|
||||
2. Add a release note on the README.md file
|
||||
3. Push to `og-develop`
|
||||
4. Wait for all tests to finish, confirm they are passing, confirm docs build on behavior-website
|
||||
5. Push `og-develop` to `main`
|
||||
6. Click on create release on GitHub, tag the version starting with the letter `v`
|
||||
7. Create release notes. You can use the automated release notes but edit to include the important info.
|
||||
8. Create the release.
|
||||
9. Wait for docker and PyPI releases to finish, confirm success
|
||||
10. Announce on Discord, user channels.
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
icon: material/file-question
|
||||
---
|
||||
|
||||
# **Frequently Asked Questions**
|
||||
|
||||
## **What is the relationship between BEHAVIOR-1K and OmniGibson?**
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
icon: octicons/question-16
|
||||
---
|
||||
|
||||
# **Known Issues & Troubleshooting**
|
||||
|
||||
## 🤔 **Known Issues**
|
||||
|
|
|
@ -80,7 +80,7 @@ Controllers and sensors can be accessed directly via the `controllers` and `sens
|
|||
|
||||
|
||||
## Types
|
||||
**`OmniGibson`** currently supports 9 robots, consisting of 4 mobile robots, 2 manipulation robots, 2 mobile manipulation robots, and 1 anthropomorphic "robot" (a bimanual agent proxy used for VR teleoperation). Below, we provide a brief overview of each model:
|
||||
**`OmniGibson`** currently supports 12 robots, consisting of 4 mobile robots, 3 manipulation robots, 4 mobile manipulation robots, and 1 anthropomorphic "robot" (a bimanual agent proxy used for VR teleoperation). Below, we provide a brief overview of each model:
|
||||
|
||||
### Mobile Robots
|
||||
These are navigation-only robots (an instance of [`LocomotionRobot`](../reference/robots/locomotion_robot.md)) that solely consist of a base that can move.
|
||||
|
@ -170,6 +170,19 @@ These are manipulation-only robots (an instance of [`ManipulationRobot`](../refe
|
|||
<img src="../assets/robots/VX300S.png" alt="rgb">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="60%">
|
||||
[**`A1`**](../reference/robots/A1.md)<br><br>
|
||||
The 6-DOF A1 model equipped with a Inspire-Robots Dexterous Hand.<br><br>
|
||||
<ul>
|
||||
<li>_Controllers_: Arm, Gripper</li>
|
||||
<li>_Sensors_: Wrist Camera</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<img src="../assets/robots/A1.png" alt="rgb">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
@ -203,6 +216,32 @@ These are robots that can both navigate and manipulate (and inherit from both [`
|
|||
<img src="../assets/robots/Tiago.png" alt="rgb">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="60%">
|
||||
[**`Stretch`**](../reference/robots/stretch.md)<br><br>
|
||||
The <a href="https://hello-robot.com/stretch-3-product">Stretch</a> model from Hello Robot, composed of a two-wheeled base, 2-DOF head, 5-DOF arm, and 1-DOF gripper.<br><br>
|
||||
<ul>
|
||||
<li>_Controllers_: Base, Head, Arm, Gripper</li>
|
||||
<li>_Sensors_: Head Camera</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<img src="../assets/robots/Stretch.png" alt="rgb">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="60%">
|
||||
[**`R1`**](../reference/robots/R1.md)<br><br>
|
||||
The bimanual R1 model, composed of a holonomic base (which we model as a 3-DOF (x,y,rz) set of joints), 4-DOF torso, x2 6-DOF arm, and x2 2-DOF parallel jaw grippers.<br><br>
|
||||
<ul>
|
||||
<li>_Controllers_: Base, Left Arm, Right Arm, Left Gripper, Right Gripper</li>
|
||||
<li>_Sensors_: Head Camera</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<img src="../assets/robots/R1.png" alt="rgb">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### Additional Robots
|
||||
|
|
|
@ -34,3 +34,75 @@ action = teleop_sys.get_action(teleop_sys.get_obs())
|
|||
```
|
||||
|
||||
to get the action based on the user teleoperation input, and pass the action to the `env.step` function.
|
||||
|
||||
## Data Collection and Playback
|
||||
|
||||
OmniGibson provides tools for collecting demonstration data and playing it back for further analysis, training, or evaluation. This is implemented via two environment wrapper classes: `DataCollectionWrapper` and `DataPlaybackWrapper`.
|
||||
|
||||
### DataCollectionWrapper
|
||||
|
||||
The `DataCollectionWrapper` is used to collect data during environment interactions. It wraps around an existing OmniGibson environment and records relevant information at each step.
|
||||
|
||||
Key features:
|
||||
|
||||
- Records actions, states, rewards, and termination conditions
|
||||
- Optimizes the simulator for data collection
|
||||
- Tracks object and system transitions within the environment
|
||||
|
||||
Example usage:
|
||||
|
||||
```python
|
||||
import omnigibson as og
|
||||
from omnigibson.envs import DataCollectionWrapper
|
||||
|
||||
# Create your OmniGibson environment
|
||||
env = og.Environment(configs=your_config)
|
||||
|
||||
# Wrap it with DataCollectionWrapper
|
||||
wrapped_env = DataCollectionWrapper(
|
||||
env=env,
|
||||
output_path="path/to/save/data.hdf5",
|
||||
only_successes=False, # Set to True to only save successful episodes
|
||||
)
|
||||
|
||||
# Use the wrapped environment as you would normally
|
||||
obs, info = wrapped_env.reset()
|
||||
for _ in range(num_steps):
|
||||
action = your_policy(obs)
|
||||
obs, reward, terminated, truncated, info = wrapped_env.step(action)
|
||||
|
||||
# Save the collected data
|
||||
wrapped_env.save_data()
|
||||
```
|
||||
|
||||
### DataPlaybackWrapper
|
||||
|
||||
The `DataPlaybackWrapper` is used to replay collected data and optionally record additional observations. This is particularly useful for gathering visual data or other sensor information that wasn't collected during the initial demonstration.
|
||||
|
||||
Key features:
|
||||
- Replays episodes from collected data
|
||||
- Can record additional observation modalities during playback
|
||||
- Supports custom robot sensor configurations and external sensors
|
||||
|
||||
Example usage:
|
||||
|
||||
```python
|
||||
from omnigibson.envs import DataPlaybackWrapper
|
||||
|
||||
# Create a playback environment
|
||||
playback_env = DataPlaybackWrapper.create_from_hdf5(
|
||||
input_path="path/to/collected/data.hdf5",
|
||||
output_path="path/to/save/playback/data.hdf5",
|
||||
robot_obs_modalities=["proprio", "rgb", "depth_linear"],
|
||||
robot_sensor_config=your_robot_sensor_config,
|
||||
external_sensors_config=your_external_sensors_config,
|
||||
n_render_iterations=5,
|
||||
only_successes=False,
|
||||
)
|
||||
|
||||
# Playback the entire dataset and record observations
|
||||
playback_env.playback_dataset(record=True)
|
||||
|
||||
# Save the recorded playback data
|
||||
playback_env.save_data()
|
||||
```
|
|
@ -131,9 +131,9 @@ nav:
|
|||
- FAQ: miscellaneous/faq.md
|
||||
- Known Issues & Troubleshooting: miscellaneous/known_issues.md
|
||||
- Contributing: miscellaneous/contributing.md
|
||||
- Changelog: https://github.com/StanfordVL/OmniGibson/releases
|
||||
- Contact Us: miscellaneous/contact.md
|
||||
- API Reference: reference/*
|
||||
- Changelog: https://github.com/StanfordVL/OmniGibson/releases
|
||||
|
||||
extra:
|
||||
analytics:
|
||||
|
|
|
@ -28,7 +28,7 @@ import nest_asyncio
|
|||
|
||||
nest_asyncio.apply()
|
||||
|
||||
__version__ = "1.0.0"
|
||||
__version__ = "1.1.0"
|
||||
|
||||
root_path = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ def main():
|
|||
print(
|
||||
f"If you want to install data under a different path, please change the DATA_PATH variable in omnigibson/macros.py and rerun omnigibson/download_datasets.py."
|
||||
)
|
||||
if click.confirm("Do you want to continue?"):
|
||||
if click.confirm("Do you want to continue?", default=True):
|
||||
# Only download if the dataset path doesn't exist
|
||||
if not dataset_exists:
|
||||
print("Downloading dataset...")
|
||||
|
|
|
@ -0,0 +1,396 @@
|
|||
import os
|
||||
import platform
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import urllib.request
|
||||
from importlib.util import find_spec
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
|
||||
import click
|
||||
import tqdm
|
||||
|
||||
# List of NVIDIA PyPI packages needed for OmniGibson
|
||||
ISAAC_SIM_PACKAGES = [
|
||||
"omniverse_kit-106.0.1.126909",
|
||||
"isaacsim_kernel-4.1.0.0",
|
||||
"isaacsim_app-4.1.0.0",
|
||||
"isaacsim_core-4.1.0.0",
|
||||
"isaacsim_gui-4.1.0.0",
|
||||
"isaacsim_utils-4.1.0.0",
|
||||
"isaacsim_storage-4.1.0.0",
|
||||
"isaacsim_asset-4.1.0.0",
|
||||
"isaacsim_sensor-4.1.0.0",
|
||||
"isaacsim_robot_motion-4.1.0.0",
|
||||
"isaacsim_robot-4.1.0.0",
|
||||
"isaacsim_benchmark-4.1.0.0",
|
||||
"isaacsim_code_editor-4.1.0.0",
|
||||
"isaacsim_ros1-4.1.0.0",
|
||||
"isaacsim_cortex-4.1.0.0",
|
||||
"isaacsim_example-4.1.0.0",
|
||||
"isaacsim_replicator-4.1.0.0",
|
||||
"isaacsim_rl-4.1.0.0",
|
||||
"isaacsim_robot_setup-4.1.0.0",
|
||||
"isaacsim_ros2-4.1.0.0",
|
||||
"isaacsim_template-4.1.0.0",
|
||||
"isaacsim_test-4.1.0.0",
|
||||
"isaacsim-4.1.0.0",
|
||||
"isaacsim_extscache_physics-4.1.0.0",
|
||||
"isaacsim_extscache_kit-4.1.0.0",
|
||||
"isaacsim_extscache_kit_sdk-4.1.0.0",
|
||||
]
|
||||
BASE_URL = "https://pypi.nvidia.com"
|
||||
|
||||
|
||||
def _find_isaac_sim_path():
|
||||
"""Try to find the path of a launcher-based Isaac Sim installation."""
|
||||
if platform.system() == "Windows":
|
||||
base_path = Path.home() / "AppData" / "Local" / "ov" / "pkg"
|
||||
else:
|
||||
base_path = Path.home() / ".local" / "share" / "ov" / "pkg"
|
||||
|
||||
# If the pkg dir is missing, we definitely can't find an Isaac Sim installation
|
||||
if not base_path.exists():
|
||||
return None
|
||||
|
||||
isaac_dirs = list(base_path.glob("isaac*"))
|
||||
if not isaac_dirs:
|
||||
return None
|
||||
|
||||
return isaac_dirs[-1]
|
||||
|
||||
|
||||
def _get_filename(package: str, temp_dir: Path):
|
||||
if platform.system() == "Windows":
|
||||
return temp_dir / f"{package}-cp310-none-win_amd64.whl"
|
||||
return temp_dir / f"{package}-cp310-none-manylinux_2_34_x86_64.whl"
|
||||
|
||||
|
||||
def _download_package(url: str, filename: Path):
|
||||
try:
|
||||
urllib.request.urlretrieve(url, filename)
|
||||
except Exception as e:
|
||||
raise ValueError(f"Failed to download {url}") from e
|
||||
|
||||
|
||||
def _rename_if_necessary(filename: Path):
|
||||
"""
|
||||
Rename the file if the system's GLIBC version is older than the one used in the NVIDIA PyPI packages.
|
||||
|
||||
This is permissible because the manylinux wheels are compatible with older GLIBC versions even though
|
||||
the filename suggests not - so we apply this hacky workaround. This allows pip to try to install them.
|
||||
"""
|
||||
if platform.system() == "Linux" and _is_glibc_older():
|
||||
return filename.with_name(filename.name.replace("manylinux_2_34", "manylinux_2_31"))
|
||||
return filename
|
||||
|
||||
|
||||
def _is_glibc_older():
|
||||
"""Check if the system's GLIBC version is older than the one used in the NVIDIA PyPI packages."""
|
||||
try:
|
||||
dist_info = subprocess.check_output(["ldd", "--version"]).decode("utf-8")
|
||||
if any(version in dist_info for version in ["2.31", "2.32", "2.33"]):
|
||||
return True
|
||||
elif any(version in dist_info for version in ["2.34", "2.35", "2.36", "2.37", "2.38", "2.39"]):
|
||||
return False
|
||||
else:
|
||||
raise ValueError("Incompatible GLIBC version")
|
||||
except subprocess.CalledProcessError:
|
||||
raise ValueError("Failed to check GLIBC version. `ldd` was not accessible. Try running it yourself to see why.")
|
||||
|
||||
|
||||
def _pip_install(filenames: List[Path]):
|
||||
"""Install a package using pip."""
|
||||
try:
|
||||
subprocess.run(["pip", "install"] + [str(x) for x in filenames], check=True)
|
||||
except subprocess.CalledProcessError:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def _download_isaac_sim_package(package: str, temp_dir: Path):
|
||||
package_name = package.split("-")[0].replace("_", "-")
|
||||
filename = _get_filename(package, temp_dir)
|
||||
url = f"{BASE_URL}/{package_name}/{filename.name}"
|
||||
|
||||
try:
|
||||
_download_package(url, filename)
|
||||
except Exception as e:
|
||||
click.echo(f"Failed to download {package}: {str(e)}")
|
||||
raise
|
||||
|
||||
return _rename_if_necessary(filename)
|
||||
|
||||
|
||||
def _setup_windows_conda_env(isaac_sim_path: Path, conda_prefix: Path):
|
||||
# Create directories
|
||||
for dir_name in ["activate.d", "deactivate.d"]:
|
||||
os.makedirs(conda_prefix / "etc" / "conda" / dir_name, exist_ok=True)
|
||||
|
||||
# Create empty files
|
||||
for file_name in ["env_vars.bat", "env_vars.ps1"]:
|
||||
for dir_name in ["activate.d", "deactivate.d"]:
|
||||
(conda_prefix / "etc" / "conda" / dir_name / file_name).touch()
|
||||
|
||||
# Setup CMD activation script
|
||||
cmd_act_file = conda_prefix / "etc" / "conda" / "activate.d" / "env_vars.bat"
|
||||
with cmd_act_file.open("w") as f:
|
||||
f.write("@echo off\n")
|
||||
f.write("set PYTHONPATH_OLD=%PYTHONPATH%\n")
|
||||
f.write(f"set PYTHONPATH=%PYTHONPATH%;{isaac_sim_path}\\site\n")
|
||||
f.write(f"set CARB_APP_PATH={isaac_sim_path}\\kit\n")
|
||||
f.write(f"set EXP_PATH={isaac_sim_path}\\apps\n")
|
||||
f.write(f"set ISAAC_PATH={isaac_sim_path}\n")
|
||||
|
||||
# Setup CMD deactivation script
|
||||
cmd_deact_file = conda_prefix / "etc" / "conda" / "deactivate.d" / "env_vars.bat"
|
||||
with cmd_deact_file.open("w") as f:
|
||||
f.write("@echo off\n")
|
||||
f.write("set PYTHONPATH=%PYTHONPATH_OLD%\n")
|
||||
f.write('set PYTHONPATH_OLD=""\n')
|
||||
|
||||
# Setup PowerShell activation script
|
||||
ps_act_file = conda_prefix / "etc" / "conda" / "activate.d" / "env_vars.ps1"
|
||||
with ps_act_file.open("w") as f:
|
||||
f.write('$env:PYTHONPATH_OLD="$env:PYTHONPATH"\n')
|
||||
f.write(f'$env:PYTHONPATH="$env:PYTHONPATH;{isaac_sim_path}\\site"\n')
|
||||
f.write(f'$env:CARB_APP_PATH="{isaac_sim_path}\\kit"\n')
|
||||
f.write(f'$env:EXP_PATH="{isaac_sim_path}\\apps"\n')
|
||||
f.write(f'$env:ISAAC_PATH="{isaac_sim_path}"\n')
|
||||
|
||||
# Setup PowerShell deactivation script
|
||||
ps_deact_file = conda_prefix / "etc" / "conda" / "deactivate.d" / "env_vars.ps1"
|
||||
with ps_deact_file.open("w") as f:
|
||||
f.write('$env:PYTHONPATH="$env:PYTHONPATH_OLD"\n')
|
||||
f.write('$env:PYTHONPATH_OLD="$null"\n')
|
||||
|
||||
|
||||
def _setup_unix_conda_env(isaac_sim_path: Path, conda_prefix: Path):
|
||||
# Set up conda environment files
|
||||
for dir_name in ["activate.d", "deactivate.d"]:
|
||||
os.makedirs(conda_prefix / "etc" / "conda" / dir_name, exist_ok=True)
|
||||
|
||||
# Create activation script
|
||||
with open(conda_prefix / "etc" / "conda" / "activate.d" / "env_vars.sh", "w") as f:
|
||||
f.write("#!/bin/sh\n")
|
||||
f.write("export LD_LIBRARY_PATH_OLD=$LD_LIBRARY_PATH\n")
|
||||
f.write("export PYTHONPATH_OLD=$PYTHONPATH\n")
|
||||
f.write(f"source {isaac_sim_path}/setup_conda_env.sh\n")
|
||||
|
||||
# Create deactivation script
|
||||
with open(conda_prefix / "etc" / "conda" / "deactivate.d" / "env_vars.sh", "w") as f:
|
||||
f.write("#!/bin/sh\n")
|
||||
f.write("export LD_LIBRARY_PATH=$LD_LIBRARY_PATH_OLD\n")
|
||||
f.write("export PYTHONPATH=$PYTHONPATH_OLD\n")
|
||||
f.write("unset ISAAC_PATH\n")
|
||||
f.write("unset CARB_APP_PATH\n")
|
||||
f.write("unset LD_LIBRARY_PATH_OLD\n")
|
||||
f.write("unset PYTHONPATH_OLD\n")
|
||||
|
||||
|
||||
def _launcher_based_install(isaac_sim_path: Optional[Path]):
|
||||
# If we are using a launcher-based installation, we need to find the path to the Isaac Sim installation
|
||||
if isaac_sim_path is None:
|
||||
isaac_sim_path = _find_isaac_sim_path()
|
||||
|
||||
# If it's not at the provided or default path, remove it
|
||||
if isaac_sim_path is None or not list(Path(isaac_sim_path).glob("isaac*.*")):
|
||||
return False
|
||||
|
||||
# Check the version string
|
||||
version_file_path = isaac_sim_path / "VERSION"
|
||||
if not version_file_path.exists():
|
||||
click.echo(f"Isaac Sim version file not found at {version_file_path}")
|
||||
return False
|
||||
|
||||
with open(version_file_path, "r") as file:
|
||||
version_content = file.read().strip()
|
||||
isaac_version_str = version_content.split("-")[0]
|
||||
isaac_version_tuple = tuple(map(int, isaac_version_str.split(".")[:3]))
|
||||
|
||||
if isaac_version_tuple not in ((4, 0, 0), (4, 1, 0)):
|
||||
click.echo(f"Isaac Sim version {isaac_version_str} is not supported by OmniGibson.")
|
||||
return False
|
||||
|
||||
# Update conda environment files to point to the specified Isaac Sim installation
|
||||
conda_prefix = Path(os.environ["CONDA_PREFIX"])
|
||||
if platform.system() == "Windows":
|
||||
_setup_windows_conda_env(isaac_sim_path, conda_prefix)
|
||||
else:
|
||||
_setup_unix_conda_env(isaac_sim_path, conda_prefix)
|
||||
|
||||
# Temporarily apply the env vars to this script, too
|
||||
sys.path.append(str(isaac_sim_path / "site"))
|
||||
os.environ["CARB_APP_PATH"] = str(isaac_sim_path / "kit")
|
||||
os.environ["EXP_PATH"] = str(isaac_sim_path / "apps")
|
||||
os.environ["ISAAC_PATH"] = str(isaac_sim_path)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def _pip_based_install():
|
||||
try:
|
||||
# Create a temporary directory to download the packages
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
temp_dir_path = Path(temp_dir)
|
||||
|
||||
# Download all required packages
|
||||
package_filenames = []
|
||||
for package in tqdm.tqdm(ISAAC_SIM_PACKAGES, desc="Downloading Isaac Sim packages"):
|
||||
package_filenames.append(_download_isaac_sim_package(package, temp_dir_path))
|
||||
|
||||
# Install the packages
|
||||
click.echo("Installing Isaac Sim packages...")
|
||||
if not _pip_install(package_filenames):
|
||||
return False
|
||||
|
||||
# Check that it can now be imported
|
||||
os.environ["OMNI_KIT_ACCEPT_EULA"] = "YES"
|
||||
import isaacsim
|
||||
except ImportError:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def attempt_launcher_install(isaac_sim_path: Optional[Path]):
|
||||
click.echo("Checking for an existing launcher-based Isaac Sim installation...")
|
||||
success = _launcher_based_install(isaac_sim_path)
|
||||
if success:
|
||||
click.echo("Successfully found and attached to launcher-based Isaac Sim installation.")
|
||||
else:
|
||||
click.echo("We did not find a compatible Isaac Sim installed via the launcher.")
|
||||
return success
|
||||
|
||||
|
||||
def attempt_pip_install():
|
||||
click.echo("Installing Isaac Sim via pip.")
|
||||
success = _pip_based_install()
|
||||
if success:
|
||||
click.echo("Successfully installed Isaac Sim via pip.")
|
||||
else:
|
||||
click.echo("Something went wrong during the pip installation.")
|
||||
return success
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option(
|
||||
"--install-datasets", default=True, help="Install the OmniGibson dataset and assets after installing Isaac Sim"
|
||||
)
|
||||
@click.option(
|
||||
"--launcher-install/--pip-install",
|
||||
default=False,
|
||||
help="Hook up to a launcher-installed Isaac Sim installation instead of installing via pip",
|
||||
)
|
||||
@click.option(
|
||||
"--isaac-sim-path",
|
||||
type=click.Path(exists=True, dir_okay=True, file_okay=False, writable=True, readable=True, path_type=Path),
|
||||
default=None,
|
||||
help="Path to the existing launcher-based Isaac Sim installation directory, to force the setup script to use it",
|
||||
)
|
||||
def setup_omnigibson(install_datasets: bool, launcher_install: bool, isaac_sim_path: Optional[Path]):
|
||||
# Check that we are in a conda environment
|
||||
if "CONDA_PREFIX" not in os.environ:
|
||||
click.echo("Please run this script from within a conda environment.")
|
||||
click.echo("You can create one by running `conda create -n omnigibson python=3.10`.")
|
||||
return
|
||||
|
||||
# Check that the current interpreter is Python 3.10
|
||||
if sys.version_info[:2] != (3, 10):
|
||||
click.echo("Please run this script with Python 3.10.")
|
||||
return
|
||||
|
||||
# Check that we do not have an EXP_PATH, CARB_APP_PATH or ISAAC_PATH set
|
||||
if any(env_var in os.environ for env_var in ["EXP_PATH", "CARB_APP_PATH", "ISAAC_PATH"]):
|
||||
click.echo(
|
||||
"Please unset the EXP_PATH, CARB_APP_PATH and ISAAC_PATH environment variables before running this script."
|
||||
)
|
||||
click.echo("These can stem from a dirty environment from an existing Isaac Sim installation.")
|
||||
click.echo("We recommend starting a new conda environment and running this script there.")
|
||||
click.echo("You can do this by running `conda create -n omnigibson python=3.10`.")
|
||||
return
|
||||
|
||||
# Check if the isaacsim package is already installed
|
||||
try:
|
||||
os.environ["OMNI_KIT_ACCEPT_EULA"] = "YES"
|
||||
import isaacsim
|
||||
|
||||
click.echo("Isaac Sim is already installed via pip in your current env.")
|
||||
click.echo("If you need to download the datasets, please run omnigibson/download_datasets.py.")
|
||||
return
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Do the actual work
|
||||
if launcher_install:
|
||||
if not attempt_launcher_install(isaac_sim_path):
|
||||
click.echo("Failed to hook environment up to launcher-based Isaac Sim installation.")
|
||||
click.echo("Please make sure you have installed Isaac Sim correctly before running this setup script.")
|
||||
return
|
||||
else:
|
||||
if not attempt_pip_install():
|
||||
click.echo("Failed to install Isaac Sim. Please check the installation requirements and try again.")
|
||||
return
|
||||
|
||||
# Try to resolve the bug that occurs when `cryptography` is imported from Isaac Sim.
|
||||
# This is a known issue on Windows and the workaround is removing the copy of cryptography
|
||||
# shipped with Isaac Sim, usually included in the omni.kit.cloud package.
|
||||
cryptography_path = Path(os.environ["ISAAC_PATH"]) / "exts/omni.pip.cloud/pip_prebundle/cryptography"
|
||||
if cryptography_path.exists():
|
||||
shutil.rmtree(str(cryptography_path))
|
||||
|
||||
click.echo("Isaac Sim has been successfully installed.")
|
||||
|
||||
# Now prompt the user to install the dataset and assets
|
||||
if install_datasets:
|
||||
click.echo("We will now install the datasets.")
|
||||
|
||||
# We import these now to avoid OmniGibson imports before torch is installed etc.
|
||||
from omnigibson.macros import gm
|
||||
from omnigibson.utils.asset_utils import download_assets, download_og_dataset
|
||||
|
||||
# Only execute if the dataset path or asset path does not exist
|
||||
dataset_exists, assets_exist = os.path.exists(gm.DATASET_PATH), os.path.exists(gm.ASSET_PATH)
|
||||
if not (dataset_exists and assets_exist):
|
||||
# Ask user which dataset to install
|
||||
click.echo(f"OmniGibson will now install data under the following locations:")
|
||||
click.echo(f" dataset (~25GB): {gm.DATASET_PATH}")
|
||||
click.echo(f" assets (~2.5GB): {gm.ASSET_PATH}")
|
||||
click.echo(
|
||||
f"If you want to install data under a different path, please change the DATA_PATH variable in omnigibson/macros.py and "
|
||||
f"rerun omnigibson/download_datasets.py."
|
||||
)
|
||||
if click.confirm("Do you want to continue?", default=True):
|
||||
# Only download if the dataset path doesn't exist
|
||||
if not dataset_exists:
|
||||
click.echo("Downloading dataset...")
|
||||
download_og_dataset()
|
||||
|
||||
# Only download if the asset path doesn't exist
|
||||
if not assets_exist:
|
||||
click.echo("Downloading assets...")
|
||||
download_assets()
|
||||
else:
|
||||
click.echo(
|
||||
"You chose not to install dataset for now. You can install it later by running python omnigibson/download_datasets.py."
|
||||
)
|
||||
|
||||
click.echo(
|
||||
"\nOmniGibson setup completed! You can now run your experiments. "
|
||||
"Visit https://behavior.stanford.edu/omnigibson/getting_started/examples.html for some examples, "
|
||||
"and https://behavior.stanford.edu/omnigibson-develop/getting_started/quickstart.html for a quickstart "
|
||||
"guide for working with OmniGibson APIs."
|
||||
)
|
||||
|
||||
# If this is a launcher install, we need to tell the user to deactivate and reactivate
|
||||
if launcher_install:
|
||||
click.echo(
|
||||
"IMPORTANT: Please deactivate and reactivate your conda environment to ensure the Isaac Sim environment variables are set correctly."
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
setup_omnigibson()
|
|
@ -1,7 +1,6 @@
|
|||
from abc import abstractmethod
|
||||
from copy import deepcopy
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import torch as th
|
||||
|
||||
import omnigibson.utils.transform_utils as T
|
||||
|
@ -416,6 +415,8 @@ class BaseRobot(USDObject, ControllableObject, GymObservable):
|
|||
print(f"Modalities: {remaining_obs_modalities} cannot be visualized, skipping...")
|
||||
|
||||
# Write all the frames to a plot
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
for sensor_name, sensor_frames in frames.items():
|
||||
n_sensor_frames = len(sensor_frames)
|
||||
if n_sensor_frames > 0:
|
||||
|
|
|
@ -2,7 +2,6 @@ import itertools
|
|||
|
||||
import networkx as nx
|
||||
import torch as th
|
||||
from matplotlib import pyplot as plt
|
||||
from PIL import Image
|
||||
|
||||
from omnigibson import object_states
|
||||
|
@ -300,6 +299,8 @@ def visualize_scene_graph(scene, G, show_window=True, cartesian_positioning=Fals
|
|||
figwidth = imgwidth / figdpi
|
||||
|
||||
# Draw the graph onto the figure.
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
fig = plt.figure(figsize=(figwidth, figheight), dpi=figdpi)
|
||||
_draw_graph()
|
||||
fig.canvas.draw()
|
||||
|
|
|
@ -110,6 +110,7 @@ def _launch_app():
|
|||
# if we are using the pip installed version, all the ISAAC_PATH etc. env vars are set correctly.
|
||||
# On the regular omniverse launcher version this should not have any impact.
|
||||
try:
|
||||
os.environ["OMNI_KIT_ACCEPT_EULA"] = "YES"
|
||||
import isaacsim # noqa: F401
|
||||
except ImportError:
|
||||
isaacsim = None
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import os
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import cv2
|
||||
import torch as th
|
||||
import trimesh
|
||||
|
||||
|
@ -212,7 +210,7 @@ class MacroParticleSystem(BaseSystem):
|
|||
else:
|
||||
diffuse_texture = self.particle_object.material.diffuse_texture
|
||||
color = (
|
||||
plt.imread(diffuse_texture).mean(dim=(0, 1))
|
||||
cv2.imread(diffuse_texture).mean()
|
||||
if diffuse_texture
|
||||
else self.particle_object.material.diffuse_color_constant
|
||||
)
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
@echo off
|
||||
:: Make sure that the ISAAC_SIM_PATH variable is set correctly
|
||||
dir /b /o:-n %userprofile%\AppData\Local\ov\pkg\isaac_sim* > NUL
|
||||
if errorlevel 0 (
|
||||
for /f "tokens=* usebackq" %%f in (`dir /b /o:n %userprofile%\AppData\Local\ov\pkg\isaac_sim*`) do set ISAAC_SIM_PATH=%userprofile%\AppData\Local\ov\pkg\%%f
|
||||
setlocal enabledelayedexpansion
|
||||
echo We found Isaac Sim installed at [4m!ISAAC_SIM_PATH![0m. OmniGibson will use it by default.
|
||||
endlocal
|
||||
set /p ISAAC_SIM_PATH=If you want to use a different one, please type in the path containing isaac-sim.bat here ^(press enter to skip^) ^>^>^>
|
||||
) else (
|
||||
echo We did not find Isaac Sim under %userprofile%\AppData\Local\ov\pkg.
|
||||
echo If you haven't installed Isaac Sim yet, please do so before running this setup script.
|
||||
set /p ISAAC_SIM_PATH=If you have already installed it in a custom location, please type in the path containing isaac-sim.bat here ^>^>^>
|
||||
)
|
||||
:check_isaac_sim_path
|
||||
if not exist %ISAAC_SIM_PATH%\isaac*.bat (
|
||||
set /p ISAAC_SIM_PATH=isaac*.bat not found in [4m%ISAAC_SIM_PATH%[0m! Make sure you have entered the correct path ^>^>^>
|
||||
goto :check_isaac_sim_path
|
||||
)
|
||||
echo:
|
||||
echo Using Isaac Sim at [4m%ISAAC_SIM_PATH%[0m
|
||||
echo:
|
||||
|
||||
:: Choose venv name
|
||||
set conda_name=omnigibson
|
||||
echo The new conda environment will be named [4momnigibson[0m by default.
|
||||
set /p conda_name=If you want to use a different name, please type in here ^(press enter to skip^) ^>^>^>
|
||||
echo:
|
||||
echo Using [4m%conda_name%[0m as the conda environment name
|
||||
echo:
|
||||
|
||||
:: Get Python version from Isaac Sim
|
||||
FOR /F "tokens=*" %%g IN ('%ISAAC_SIM_PATH%\python.bat -c "import platform; print(platform.python_version())"') do (SET ISAAC_PYTHON_VERSION=%%g)
|
||||
echo Using Python version [4m%ISAAC_PYTHON_VERSION%[0m matching your current Isaac Sim version
|
||||
|
||||
:: Create a conda environment with the appropriate python version
|
||||
call conda create -y -n %conda_name% python=%ISAAC_PYTHON_VERSION% || goto :error
|
||||
call conda activate %conda_name% || goto :error
|
||||
|
||||
:: We add some preprocessing information so that the Isaac Sim paths are linked to this environment upon startup
|
||||
:: See https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#macos-and-linux for reference
|
||||
mkdir %CONDA_PREFIX%\etc\conda\activate.d
|
||||
mkdir %CONDA_PREFIX%\etc\conda\deactivate.d
|
||||
type NUL>%CONDA_PREFIX%\etc\conda\activate.d\env_vars.bat
|
||||
type NUL>%CONDA_PREFIX%\etc\conda\deactivate.d\env_vars.bat
|
||||
type NUL>%CONDA_PREFIX%\etc\conda\activate.d\env_vars.ps1
|
||||
type NUL>%CONDA_PREFIX%\etc\conda\deactivate.d\env_vars.ps1
|
||||
|
||||
:: Add support for cmd
|
||||
set CONDA_ACT_FILE_CMD=%CONDA_PREFIX%\etc\conda\activate.d\env_vars.bat
|
||||
echo @echo off>>%CONDA_ACT_FILE_CMD%
|
||||
echo set PYTHONPATH_OLD=%%PYTHONPATH%%>>%CONDA_ACT_FILE_CMD%
|
||||
echo set PYTHONPATH=%%PYTHONPATH%%;%ISAAC_SIM_PATH%\site>>%CONDA_ACT_FILE_CMD%
|
||||
echo set CARB_APP_PATH=%ISAAC_SIM_PATH%\kit>>%CONDA_ACT_FILE_CMD%
|
||||
echo set EXP_PATH=%ISAAC_SIM_PATH%\apps>>%CONDA_ACT_FILE_CMD%
|
||||
echo set ISAAC_PATH=%ISAAC_SIM_PATH%>>%CONDA_ACT_FILE_CMD%
|
||||
|
||||
set CONDA_DEACT_FILE_CMD=%CONDA_PREFIX%\etc\conda\deactivate.d\env_vars.bat
|
||||
echo @echo off>>%CONDA_DEACT_FILE_CMD%
|
||||
echo set PYTHONPATH=%%PYTHONPATH_OLD%%>>%CONDA_DEACT_FILE_CMD%
|
||||
echo set PYTHONPATH_OLD="">>%CONDA_DEACT_FILE_CMD%
|
||||
|
||||
:: Add support for powershell
|
||||
set CONDA_ACT_FILE_PWSH=%CONDA_PREFIX%\etc\conda\activate.d\env_vars.ps1
|
||||
echo $env:PYTHONPATH_OLD="$env:PYTHONPATH">>%CONDA_ACT_FILE_PWSH%
|
||||
echo $env:PYTHONPATH="$env:PYTHONPATH;%ISAAC_SIM_PATH%\site">>%CONDA_ACT_FILE_PWSH%
|
||||
echo $env:CARB_APP_PATH="%ISAAC_SIM_PATH%\kit">>%CONDA_ACT_FILE_PWSH%
|
||||
echo $env:EXP_PATH="%ISAAC_SIM_PATH%\apps">>%CONDA_ACT_FILE_PWSH%
|
||||
echo $env:ISAAC_PATH="%ISAAC_SIM_PATH%">>%CONDA_ACT_FILE_PWSH%
|
||||
|
||||
set CONDA_DEACT_FILE_PWSH=%CONDA_PREFIX%\etc\conda\deactivate.d\env_vars.ps1
|
||||
echo $env:PYTHONPATH="$env:PYTHONPATH_OLD">>%CONDA_DEACT_FILE_PWSH%
|
||||
echo $env:PYTHONPATH_OLD="$null">>%CONDA_DEACT_FILE_PWSH%
|
||||
|
||||
|
||||
:: Install omnigibson!
|
||||
call pip install -e . || goto :error
|
||||
|
||||
:: Cycle conda environment so that all dependencies are propagated
|
||||
call conda deactivate || goto :error
|
||||
goto :end
|
||||
|
||||
:error
|
||||
echo:
|
||||
echo An error occurred during installation. Please check the error message above.
|
||||
echo:
|
||||
exit /b
|
||||
|
||||
:end
|
||||
echo:
|
||||
echo OmniGibson successfully installed! Please run [4mconda activate %conda_name%[0m to activate the environment.
|
||||
echo:
|
|
@ -1,68 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eo &> /dev/null
|
||||
|
||||
# Make sure that the ISAAC_SIM_PATH variable is set correctly
|
||||
if [[ -d ~/.local/share/ov/pkg ]] && [[ $(ls ~/.local/share/ov/pkg | grep isaac) ]];
|
||||
then
|
||||
FOUND_ISAAC_SIM_PATH=$(ls -d ~/.local/share/ov/pkg/* | grep isaac | tail -n 1)
|
||||
echo "We found Isaac Sim installed at [4m$FOUND_ISAAC_SIM_PATH[0m. OmniGibson will use it by default."
|
||||
read -p "If you want to use a different one, please type in the path containing isaac-sim.sh here (press enter to skip) >>> " ISAAC_SIM_PATH
|
||||
ISAAC_SIM_PATH=${ISAAC_SIM_PATH:-$FOUND_ISAAC_SIM_PATH}
|
||||
else
|
||||
echo "We did not find Isaac Sim under ~/.local/share/ov/pkg."
|
||||
echo "If you haven't installed Isaac Sim yet, please do so before running this setup script."
|
||||
read -p "If you have already installed it in a custom location, please type in the path containing isaac-sim.sh here >>> " ISAAC_SIM_PATH
|
||||
fi
|
||||
|
||||
while [[ ! -n $(find "${ISAAC_SIM_PATH}" -maxdepth 1 -name "isaac*.sh" 2>/dev/null) ]]; do
|
||||
read -p "isaac*.sh not found in [4m$ISAAC_SIM_PATH[0m! Make sure you have entered the correct path >>> " ISAAC_SIM_PATH
|
||||
done
|
||||
echo -e "\nUsing Isaac Sim at [4m$ISAAC_SIM_PATH[0m\n"
|
||||
|
||||
|
||||
# Choose venv name
|
||||
echo "The new conda environment will be named [4momnigibson[0m by default."
|
||||
read -p "If you want to use a different name, please type in here (press enter to skip) >>> " conda_name
|
||||
conda_name=${conda_name:-omnigibson}
|
||||
echo -e "\nUsing [4m$conda_name[0m as the conda environment name\n"
|
||||
|
||||
# Get Python version from Isaac Sim
|
||||
ISAAC_PYTHON_VERSION=$(${ISAAC_SIM_PATH}/python.sh -c "import platform; print(platform.python_version())")
|
||||
ISAAC_PYTHON_VERSION="${ISAAC_PYTHON_VERSION##*$'\n'}" # get rid of conda activation warnings
|
||||
echo Using Python version [4m$ISAAC_PYTHON_VERSION[0m matching your current Isaac Sim version
|
||||
|
||||
# Create a conda environment with the appropriate python version
|
||||
source $(conda info --base)/etc/profile.d/conda.sh
|
||||
conda create -y -n $conda_name python=${ISAAC_PYTHON_VERSION}
|
||||
|
||||
# Now activate the omnigibson environment
|
||||
conda activate $conda_name
|
||||
|
||||
mkdir -p ${CONDA_PREFIX}/etc/conda/activate.d
|
||||
mkdir -p ${CONDA_PREFIX}/etc/conda/deactivate.d
|
||||
touch ${CONDA_PREFIX}/etc/conda/activate.d/env_vars.sh
|
||||
touch ${CONDA_PREFIX}/etc/conda/deactivate.d/env_vars.sh
|
||||
# We add some preprocessing information so that the Isaac Sim paths are linked to this environment upon startup
|
||||
# See https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#macos-and-linux for reference
|
||||
CONDA_ACT_FILE="${CONDA_PREFIX}/etc/conda/activate.d/env_vars.sh"
|
||||
echo '#!/bin/sh' > ${CONDA_ACT_FILE}
|
||||
echo "export LD_LIBRARY_PATH_OLD=\$LD_LIBRARY_PATH" >> ${CONDA_ACT_FILE}
|
||||
echo "export PYTHONPATH_OLD=\$PYTHONPATH" >> ${CONDA_ACT_FILE}
|
||||
echo "source ${ISAAC_SIM_PATH}/setup_conda_env.sh" >> ${CONDA_ACT_FILE}
|
||||
|
||||
CONDA_DEACT_FILE="${CONDA_PREFIX}/etc/conda/deactivate.d/env_vars.sh"
|
||||
echo '#!/bin/sh' > ${CONDA_DEACT_FILE}
|
||||
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH_OLD" >> ${CONDA_DEACT_FILE}
|
||||
echo "export PYTHONPATH=\$PYTHONPATH_OLD" >> ${CONDA_DEACT_FILE}
|
||||
echo "unset ISAAC_PATH" >> ${CONDA_DEACT_FILE}
|
||||
echo "unset CARB_APP_PATH" >> ${CONDA_DEACT_FILE}
|
||||
echo "unset LD_LIBRARY_PATH_OLD" >> ${CONDA_DEACT_FILE}
|
||||
echo "unset PYTHONPATH_OLD" >> ${CONDA_DEACT_FILE}
|
||||
|
||||
# Install omnigibson!
|
||||
pip install -e .
|
||||
|
||||
# Cycle conda environment so that all dependencies are propagated
|
||||
conda deactivate
|
||||
|
||||
echo -e "\nOmniGibson successfully installed! Please run [4mconda activate $conda_name[0m to activate the environment.\n"
|
7
setup.py
7
setup.py
|
@ -13,7 +13,7 @@ long_description = "".join(lines)
|
|||
|
||||
setup(
|
||||
name="omnigibson",
|
||||
version="1.0.0",
|
||||
version="1.1.0",
|
||||
author="Stanford University",
|
||||
long_description_content_type="text/markdown",
|
||||
long_description=long_description,
|
||||
|
@ -47,10 +47,9 @@ setup(
|
|||
"rtree~=1.2.0",
|
||||
"graphviz~=0.20",
|
||||
"numba>=0.60.0",
|
||||
"matplotlib>=3.0.0",
|
||||
],
|
||||
extras_require={
|
||||
"isaac": ["isaacsim-for-omnigibson>=4.1.0"],
|
||||
},
|
||||
extras_require={},
|
||||
tests_require=[],
|
||||
python_requires=">=3",
|
||||
include_package_data=True,
|
||||
|
|
Loading…
Reference in New Issue