From 6c845a93d3e8cb01b1b89e6a2c6ae742b23e627f Mon Sep 17 00:00:00 2001 From: mqjinwon Date: Wed, 6 Nov 2024 12:53:37 +0000 Subject: [PATCH 1/2] docs: Initialization Documentation v0.0.1 --- Asset/docker_install/image-1.png | 3 + Asset/docker_install/image-2.png | 3 + Asset/docker_install/image.png | 3 + Asset/{ => readme}/image-1.png | 0 Asset/{ => readme}/image-2.png | 0 Asset/{ => readme}/image.png | 0 DOCKER_INSTALL.md | 127 ++++++++++++++++++++++++++ README.md | 147 +++++++++++++++---------------- README_backup.md | 82 ----------------- 9 files changed, 205 insertions(+), 160 deletions(-) create mode 100644 Asset/docker_install/image-1.png create mode 100644 Asset/docker_install/image-2.png create mode 100644 Asset/docker_install/image.png rename Asset/{ => readme}/image-1.png (100%) rename Asset/{ => readme}/image-2.png (100%) rename Asset/{ => readme}/image.png (100%) create mode 100644 DOCKER_INSTALL.md delete mode 100644 README_backup.md diff --git a/Asset/docker_install/image-1.png b/Asset/docker_install/image-1.png new file mode 100644 index 0000000..16c2552 --- /dev/null +++ b/Asset/docker_install/image-1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9eab1b50e77e42b63deaace4fcbfc1b031c7cdf6d4520d7bc500c4b6ecae3981 +size 44127 diff --git a/Asset/docker_install/image-2.png b/Asset/docker_install/image-2.png new file mode 100644 index 0000000..65bc9af --- /dev/null +++ b/Asset/docker_install/image-2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63826addf74dd4389418ac5a17b67da12fa159461853de959df7b3075704fd9e +size 254572 diff --git a/Asset/docker_install/image.png b/Asset/docker_install/image.png new file mode 100644 index 0000000..6f73b60 --- /dev/null +++ b/Asset/docker_install/image.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:138fc6e2a823aa4833591342b97d55a11f5c0b4af794625678540004df035bc5 +size 34778 diff --git a/Asset/image-1.png b/Asset/readme/image-1.png similarity index 100% rename from Asset/image-1.png rename to Asset/readme/image-1.png diff --git a/Asset/image-2.png b/Asset/readme/image-2.png similarity index 100% rename from Asset/image-2.png rename to Asset/readme/image-2.png diff --git a/Asset/image.png b/Asset/readme/image.png similarity index 100% rename from Asset/image.png rename to Asset/readme/image.png diff --git a/DOCKER_INSTALL.md b/DOCKER_INSTALL.md new file mode 100644 index 0000000..7cc3ead --- /dev/null +++ b/DOCKER_INSTALL.md @@ -0,0 +1,127 @@ +# StrideSim Docker Installation Guide + +## Graphic Driver Installation + +To install the NVIDIA graphic driver, execute the following commands: + +```bash +sudo apt-get update +sudo apt install build-essential -y +wget https://us.download.nvidia.com/XFree86/Linux-x86_64/535.129.03/NVIDIA-Linux-x86_64-535.129.03.run +chmod +x NVIDIA-Linux-x86_64-535.129.03.run +sudo ./NVIDIA-Linux-x86_64-535.129.03.run +``` + +![alt text](Asset/docker_install/image-2.png) +> I tried to install *nvidia driver-550*, and it also works. + +## Docker Installation + +To install Docker, execute the following commands: + +```bash +# Docker installation using the convenience script +curl -fsSL https://get.docker.com -o get-docker.sh +sudo sh get-docker.sh + +# Post-install steps for Docker +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker + +# Verify Docker +docker run hello-world +``` + +## Nvidia Container Toolkit Installation + +```bash +#Configure the repository +curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ + && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ + sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ + sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list \ + && \ + sudo apt-get update + +#Install the NVIDIA Container Toolkit packages +sudo apt-get install -y nvidia-container-toolkit +sudo systemctl restart docker + +#Configure the container runtime +sudo nvidia-ctk runtime configure --runtime=docker +sudo systemctl restart docker + +#Verify NVIDIA Container Toolkit +docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi +``` + +## Get NGC Key +You can follow this [official documentation](https://docs.nvidia.com/ngc/gpu-cloud/ngc-user-guide/index.html#generating-api-key) to get the NGC key. + +1. Go to [NGC](https://ngc.nvidia.com/signin) + +2. Click on the **Setup** button on the top right. + + ![alt text](Asset/docker_install/image.png) + +3. Click on the **Generate API Key** button. + + ![alt text](Asset/docker_install/image-1.png) + +4. Copy the API Key. + +```bash +docker login nvcr.io +``` + +```bash +Username: $oauthtoken +Password: API키 +``` + +## Get Isaac Sim Docker Image + +```bash +docker pull nvcr.io/nvidia/isaac-sim:4.0.0 +``` + +## Run StrideSim Docker Container + +1. Build Docker Image + +```bash +docker build -t stride-sim:v0.0.1 docker +``` + +2. Run Docker Container + +```bash +docker run --name stride-sim-0.0.1 --entrypoint bash -it --runtime=nvidia --gpus all -e "ACCEPT_EULA=Y" --network=host --privileged \ + -e "PRIVACY_CONSENT=Y" \ + -e DISPLAY=$DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw \ + -v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw \ + -v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw \ + -v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw \ + -v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw \ + -v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw \ + -v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw \ + -v ~/docker/isaac-sim/documents:/root/Documents:rw \ + -v /dev/shm:/dev/shm \ + stride-sim:v0.0.1 +``` + +Now you can run StrideSim Docker Container. + +It contains the Isaac Sim, StrideSim, IsaacLab and ROS2 Humble!! + +ENJOY! + +*Back to [README](README.md)* + +## Reference + +- [Container Installation](https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_container.html) +- [NGC Key](https://docs.nvidia.com/ngc/gpu-cloud/ngc-user-guide/index.html#generating-api-key) diff --git a/README.md b/README.md index 96caa59..789abe7 100644 --- a/README.md +++ b/README.md @@ -1,125 +1,116 @@ # StrideSim +## Table of Contents + +- [Overview](#overview) +- [Installation](#installation) + - [Docker Installation (Recommended)](#docker-installation-recommended) + - [Local Installation](#local-installation) +- [Tips](#tips) +- [Usage](#usage) + + [![IsaacSim](https://img.shields.io/badge/IsaacSim-4.0.0-silver.svg)](https://docs.omniverse.nvidia.com/isaacsim/latest/overview.html) [![Isaac Lab](https://img.shields.io/badge/IsaacLab-1.0.0-silver)](https://isaac-sim.github.io/IsaacLab) [![Python](https://img.shields.io/badge/python-3.10-blue.svg)](https://docs.python.org/3/whatsnew/3.10.html) [![License](https://img.shields.io/badge/license-MIT-yellow.svg)](https://opensource.org/license/mit) -## 개요 +## Overview -StrideSim은 Isaac Lab을 기반으로 한 프로젝트입니다. 이 저장소는 Isaac Lab의 핵심 저장소 외부에서 독립적인 환경에서 개발할 수 있도록 설계되었습니다. +StrideSim is a project based on Isaac Lab. This repository is designed to allow development in an independent environment outside the core repository of Isaac Lab. -## 설치 +## Docker Installation (Recommended) -1. Isaac Sim 4.0.0 설치: [설치 가이드](https://docs.omniverse.nvidia.com/isaacsim/latest/overview.html) 참조 +You can build and run the container using the Dockerfile. -2. [Isaac Lab v1.0.0](https://github.com/isaac-sim/IsaacLab/tree/v1.0.0) 설치: [설치 가이드](https://isaac-sim.github.io/IsaacLab/source/setup/installation/index.html) 참조 +[Docker Installation Guide](DOCKER_INSTALL.md) -3. StrideSim 설치 +## Local Installation -```bash -git clone https://github.com/AuTURBO/StrideSim.git -``` +1. Install Isaac Sim 4.0.0: Refer to the [Installation Guide](https://docs.omniverse.nvidia.com/isaacsim/latest/overview.html). -```bash -sudo apt-get install -y git-lfs -git lfs install +2. Install [Isaac Lab v1.0.0](https://github.com/isaac-sim/IsaacLab/tree/v1.0.0): Refer to the [Installation Guide](https://isaac-sim.github.io/IsaacLab/source/setup/installation/index.html). -cd StrideSim -git lfs pull -``` +3. Install StrideSim: -## 꿀팁 + ```bash + git clone https://github.com/AuTURBO/StrideSim.git + ``` -1. 환경변수 설정 + ```bash + sudo apt-get install -y git-lfs + git lfs install -```bash -# Isaac Sim root directory -export ISAACSIM_PATH="${HOME}/.local/share/ov/pkg/isaac-sim-4.0.0" -# Isaac Sim python executable -alias ISAACSIM_PYTHON="${ISAACSIM_PATH}/python.sh" -# Isaac Sim app -alias ISAACSIM="${ISAACSIM_PATH}/isaac-sim.sh" -``` + cd StrideSim + git lfs pull + ``` -## 사용법 +## Tips -1. 강화학습 라이브러리 설치 +1. Set environment variables: -```bash -cd rl -python -m pip install -e . -``` + ```bash + # Isaac Sim root directory + export ISAACSIM_PATH="${HOME}/.local/share/ov/pkg/isaac-sim-4.0.0" + # Isaac Sim python executable + alias ISAACSIM_PYTHON="${ISAACSIM_PATH}/python.sh" + # Isaac Sim app + alias ISAACSIM="${ISAACSIM_PATH}/isaac-sim.sh" + ``` -2. 강화학습 단독 실행 +## Usage -```bash -python rl/train.py --task Template-Isaac-Velocity-Rough-Anymal-D-v0 -``` +1. Install the reinforcement learning library: -3. StrideSim 실행 + ```bash + cd rl + python -m pip install -e . + ``` -3-1. 프로그램 실행 +2. Run reinforcement learning independently: ```bash - # 환경변수 설정 후 - ISAACSIM + python rl/train.py --task Template-Isaac-Velocity-Rough-Anymal-D-v0 ``` -3-2. 확장 프로그램 설정 +3. Run StrideSim: + + 3-1. Execute the program: + + ```bash + # After setting environment variables + ISAACSIM + ``` -3-2-1. window -> extension 창으로 이동 -3-2-2. 삼지창 버튼을 눌러 확장 프로그램 경로 삽입 (본 프로젝트의 exts까지 넣으면 된다.) -![alt text](Asset/image.png) + 3-2. Configure the extension program: -3-2-3. 좌측에 시뮬레이션 버튼을 클릭 (이때, AUTOLOAD를 활성화하면 편하다.) + - Navigate to window -> extension. + - Click the trident button to insert the extension program path (include up to the exts of this project). + - Click the simulation button on the left (enabling AUTOLOAD is convenient). -3-3. 확장 프로그램 실행 -![alt text](Asset/image-1.png) -이제 Isaac Examples 탭에 StrideSim_AnymalD 탭이 나오는 것을 확인할 수 있다. + 3-3. Run the extension program: + ![Description of image](Asset/readme/image-1.png) + You can now see the StrideSim_AnymalD tab in the Isaac Examples tab. -![alt text](Asset/image-2.png) -버튼을 누르면 위와 같은 장면을 볼수 있고, anymalD를 부르는 것부터해서 학습 및 병렬 실행도 가능하다. + ![Description of image](Asset/readme/image-2.png) + By clicking the button, you can view scenes like the one above, and perform tasks such as calling anymalD, training, and parallel execution. -## 코드 포맷팅 +## Code Formatting -pre-commit 훅을 사용하여 코드 포맷팅을 자동화합니다. +pre-commit hook is used to automate code formatting. -pre-commit 설치: +Install pre-commit: ```bash pip install pre-commit ``` -pre-commit 실행: +Run pre-commit: ```bash pre-commit run --all-files ``` -## Docker - -Dockerfile을 통해 컨테이너를 빌드하고 실행할 수 있습니다. - -```bash -docker build -t stride-sim:v0.0.1 docker - -docker run --name stride-sim-0.0.1 --entrypoint bash -it --runtime=nvidia --gpus all -e "ACCEPT_EULA=Y" --network=host --privileged \ - -e "PRIVACY_CONSENT=Y" \ - -e DISPLAY=$DISPLAY \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw \ - -v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw \ - -v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw \ - -v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw \ - -v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw \ - -v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw \ - -v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw \ - -v ~/docker/isaac-sim/documents:/root/Documents:rw \ - -v /dev/shm:/dev/shm \ - stride-sim:v0.0.1 -``` - -## 라이선스 +## License -이 프로젝트는 MIT 라이선스 하에 배포됩니다. +This project is distributed under the MIT license. diff --git a/README_backup.md b/README_backup.md deleted file mode 100644 index 74dcd90..0000000 --- a/README_backup.md +++ /dev/null @@ -1,82 +0,0 @@ -# Template for Isaac Lab Projects - -[![IsaacSim](https://img.shields.io/badge/IsaacSim-4.0.0-silver.svg)](https://docs.omniverse.nvidia.com/isaacsim/latest/overview.html) -[![Isaac Lab](https://img.shields.io/badge/IsaacLab-1.0.0-silver)](https://isaac-sim.github.io/IsaacLab) -[![Python](https://img.shields.io/badge/python-3.10-blue.svg)](https://docs.python.org/3/whatsnew/3.10.html) -[![Linux platform](https://img.shields.io/badge/platform-linux--64-orange.svg)](https://releases.ubuntu.com/20.04/) -[![Windows platform](https://img.shields.io/badge/platform-windows--64-orange.svg)](https://www.microsoft.com/en-us/) -[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://pre-commit.com/) -[![License](https://img.shields.io/badge/license-MIT-yellow.svg)](https://opensource.org/license/mit) - -## Overview - -This repository serves as a template for building projects or extensions based on Isaac Lab. It allows you to develop in an isolated environment, outside of the core Isaac Lab repository. - -**Key Features:** - -- `Isolation` Work outside the core Isaac Lab repository, ensuring that your development efforts remain self-contained. -- `Flexibility` This template is set up to allow your code to be run as an extension in Omniverse. - -**Keywords:** extension, template, isaaclab - - -### Installation - - -- Throughout the repository, the name `StrideSim` only serves as an example and we provide a script to rename all the references to it automatically: - -``` -# Rename all occurrences of StrideSim (in files/directories) to your_fancy_extension_name -python scripts/rename_template.py your_fancy_extension_name -``` - -- Install Isaac Lab, see the [installation guide](https://isaac-sim.github.io/IsaacLab/source/setup/installation/index.html). - -- Using a python interpreter that has Isaac Lab installed, install the library - -``` -cd exts/StrideSim -python -m pip install -e . -``` - -#### Set up IDE (Optional) - -To setup the IDE, please follow these instructions: - -- Run VSCode Tasks, by pressing `Ctrl+Shift+P`, selecting `Tasks: Run Task` and running the `setup_python_env` in the drop down menu. When running this task, you will be prompted to add the absolute path to your Isaac Lab installation. - -If everything executes correctly, it should create a file .python.env in the .vscode directory. The file contains the python paths to all the extensions provided by Isaac Sim and Omniverse. This helps in indexing all the python modules for intelligent suggestions while writing code. - - -#### Setup as Omniverse Extension (Optional) - -We provide an example UI extension that will load upon enabling your extension defined in `exts/StrideSim/StrideSim/ui_extension_example.py`. For more information on UI extensions, enable and check out the source code of the `omni.isaac.ui_template` extension and refer to the introduction on [Isaac Sim Workflows 1.2.3. GUI](https://docs.omniverse.nvidia.com/isaacsim/latest/introductory_tutorials/tutorial_intro_workflows.html#gui). - -To enable your extension, follow these steps: - -1. **Add the search path of your repository** to the extension manager: - - Navigate to the extension manager using `Window` -> `Extensions`. - - Click on the **Hamburger Icon** (☰), then go to `Settings`. - - In the `Extension Search Paths`, enter the absolute path to `IsaacLabExtensionTemplate/exts` - - If not already present, in the `Extension Search Paths`, enter the path that leads to Isaac Lab's extension directory directory (`IsaacLab/source/extensions`) - - Click on the **Hamburger Icon** (☰), then click `Refresh`. - -2. **Search and enable your extension**: - - Find your extension under the `Third Party` category. - - Toggle it to enable your extension. - - -## Code formatting - -We have a pre-commit template to automatically format your code. -To install pre-commit: - -```bash -pip install pre-commit -``` - -Then you can run pre-commit with: - -```bash -pre-commit run --all-files -``` From 0ae2dadcacf6078eaa617cea266a664196cd45bf Mon Sep 17 00:00:00 2001 From: mqjinwon Date: Wed, 6 Nov 2024 13:06:14 +0000 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20=EC=8B=A4=ED=96=89=EB=B0=A9?= =?UTF-8?q?=EB=B2=95=20=EC=B6=94=EA=B0=80=20/=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DOCKER_INSTALL.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/DOCKER_INSTALL.md b/DOCKER_INSTALL.md index 7cc3ead..1f5efbb 100644 --- a/DOCKER_INSTALL.md +++ b/DOCKER_INSTALL.md @@ -117,11 +117,25 @@ Now you can run StrideSim Docker Container. It contains the Isaac Sim, StrideSim, IsaacLab and ROS2 Humble!! +You can run the following command to run isaac-sim. + +```bash +cd /isaac-sim +./isaac-sim.sh --allow-root +``` + ENJOY! -*Back to [README](README.md)* +## File Structure + +- /isaac-sim +- /StrideSim +- /IsaacLab +- /opt/ros/humble ## Reference - [Container Installation](https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_container.html) - [NGC Key](https://docs.nvidia.com/ngc/gpu-cloud/ngc-user-guide/index.html#generating-api-key) + +*Back to [README](README.md)* \ No newline at end of file