Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GO2 and update README for RL train/play #53

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: 버그 리포트
about: 버그를 보고하여 개선에 도움을 주세요
title: '[버그] '
labels: 버그
assignees: ''

---

**버그 설명**
버그에 대한 명확하고 간결한 설명을 해주세요.

**재현 방법**
버그를 재현하는 단계:
1. '...'로 이동
2. '....'를 클릭
3. '....'까지 스크롤
4. 오류 확인

**예상 동작**
예상했던 동작에 대한 명확하고 간결한 설명을 해주세요.

**스크린샷**
해당되는 경우, 문제를 설명하는 데 도움이 되는 스크린샷을 추가해주세요.

**환경 (다음 정보를 작성해주세요):**
- OS: [예: iOS]
- 버전 [예: 22]

**추가 정보**
문제에 대한 다른 맥락이나 정보를 여기에 추가해주세요.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: 기능 제안
about: 이 프로젝트에 대한 아이디어를 제안해주세요
title: '[기능] '
labels: 개선
assignees: ''

---

**제안하는 기능이 어떤 문제와 관련이 있나요? 설명해주세요.**
문제에 대한 명확하고 간결한 설명을 해주세요. 예: 항상 [...] 때문에 불편합니다.

**원하는 해결책을 설명해주세요**
원하는 결과에 대한 명확하고 간결한 설명을 해주세요.

**고려한 대안을 설명해주세요**
고려했던 다른 대안이나 기능에 대해 설명해주세요.

**추가 정보**
기능 요청에 대한 다른 맥락이나 스크린샷을 여기에 추가해주세요.
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## 설명
이 PR에서 변경한 내용에 대해 간단히 설명해주세요.

## 관련 이슈
해결하는 이슈 번호를 적어주세요. 예: #123

## 변경 유형
- [ ] 버그 수정
- [ ] 새로운 기능
- [ ] 성능 개선
- [ ] 코드 스타일 업데이트 (포맷팅, 변수명 등)
- [ ] 리팩토링 (기능적 변경 없음, API 변경 없음)
- [ ] 빌드 관련 변경
- [ ] 문서 내용 변경
- [ ] 기타 (설명해주세요):

## 체크리스트:
- [ ] 내 코드가 프로젝트의 코드 스타일 가이드라인을 따릅니다
- [ ] 내가 내 코드를 자체 리뷰했습니다
- [ ] 내 변경사항으로 인해 새로운 경고가 발생하지 않습니다
- [ ] 단위 테스트를 추가했습니다
- [ ] 기존 단위 테스트가 모두 통과합니다
- [ ] 필요한 경우 해당 문서를 변경했습니다
- [ ] 내 변경사항에 대한 종속성 업데이트가 포함되어 있습니다

## 추가 정보
PR에 대한 추가 정보나 스크린샷을 여기에 추가하세요.
30 changes: 30 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 코드 품질 검사

on:
push:
branches: [ main, devel ]
pull_request:
branches: [ main, devel ]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Python 설정
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: pre-commit 캐시 설정
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pre-commit-
- name: pre-commit 설치
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: pre-commit 실행
run: pre-commit run --all-files
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/__pycache__/
*.egg-info
logs/
wandb/
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ros.distro": "humble"
}
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "setup_python_env",
"type": "shell",
"linux": {
"command": "export CARB_APP_PATH=${input:isaacsim_path}/kit && export ISAAC_PATH=${input:isaacsim_path} && export EXP_PATH=${input:isaacsim_path}/apps && source ${input:isaacsim_path}/setup_python_env.sh && printenv >${workspaceFolder}/.vscode/.python.env && ${input:isaacsim_path}/python.sh ${workspaceFolder}/.vscode/tools/setup_vscode.py --isaacsim_path ${input:isaacsim_path}"
}
}
],
"inputs": [
{
"id": "isaacsim_path",
"description": "Absolute path to Isaac Sim:",
"default": "",
"type": "promptString"
}
]
}
92 changes: 43 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,76 @@
# Template for Isaac Lab Projects
# StrideSim

[![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.
StrideSim은 Isaac Lab을 기반으로 한 프로젝트입니다. 이 저장소는 Isaac Lab의 핵심 저장소 외부에서 독립적인 환경에서 개발할 수 있도록 설계되었습니다.

**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.
1. Isaac Sim 설치: [설치 가이드](https://docs.omniverse.nvidia.com/isaacsim/latest/overview.html) 참조

**Keywords:** extension, template, isaaclab
2. Isaac Lab 설치: [설치 가이드](https://isaac-sim.github.io/IsaacLab/source/setup/installation/index.html) 참조

3. 라이브러리 설치:

### Installation
```bash
cd exts/StrideSim
python -m pip install -e .
```

## 사용법

- Throughout the repository, the name `StrideSim` only serves as an example and we provide a script to rename all the references to it automatically:
1. 강화학습 라이브러리 설치 (Optional)

```
# 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
```bash
cd rl
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).
2. 강화학습 라이브러리 실행 - Train
```bash
cd StrideSim/rl
python train.py --task=<task_name> --headless
```

To enable your extension, follow these steps:
Train Tasks list
- Anymal-D(Rough): `Isaac-Velocity-Rough-Anymal-D-v0`
- Anymal-D(Flat): `Isaac-Velocity-Rough-Anymal-D-v0`
- Go2(Rough): `Isaac-Velocity-Rough-Unitree-Go2-v0`
- Go2(Flat): `Isaac-Velocity-Flat-Unitree-Go2-v0`

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`.
3. 강화학습 라이브러리 실행 - Play
```bash
cd StrideSim/rl
python play.py --task=<task_name>
```
Play Tasks list
- Anymal-D(Rough): `Isaac-Velocity-Rough-Anymal-D-Play-v0`
- Anymal-D(Flat): `Isaac-Velocity-Rough-Anymal-D-Play-v0`
- Go2(Rough): `Isaac-Velocity-Rough-Unitree-Go2-Play-v0`
- Go2(Flat): `Isaac-Velocity-Flat-Unitree-Go2-Play-v0`

2. **Search and enable your extension**:
- Find your extension under the `Third Party` category.
- Toggle it to enable your extension.

## 코드 포맷팅

## Code formatting
pre-commit 훅을 사용하여 코드 포맷팅을 자동화합니다.

We have a pre-commit template to automatically format your code.
To install pre-commit:
pre-commit 설치:

```bash
pip install pre-commit
```

Then you can run pre-commit with:
pre-commit 실행:

```bash
pre-commit run --all-files
```

## 라이선스

이 프로젝트는 MIT 라이선스 하에 배포됩니다.
82 changes: 82 additions & 0 deletions README_backup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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
```
9 changes: 4 additions & 5 deletions exts/StrideSim/StrideSim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
Python module serving as a project/extension template.
"""

# Register Gym environments.
from .tasks import *

# Register UI extensions.
from .ui import *
from .anymal_articulation import AnymalD_Atriculation
from .anymal_d import AnymalD
from .anymal_d_extension import AnyamlDExtension
from .base_sample import *
Loading
Loading