Skip to content

Commit

Permalink
Devel (#55)
Browse files Browse the repository at this point in the history
* Doc/readme (#50)

* doc: write readme and formatting

* chore: move exclude command to  .pre-commit-config.yaml

* Doc/GitHub (#51)

* doc: issue and pr 포맷 정리와 코드 포매팅 workflow 적용

* chore: devel branch도 workflow 수행

* Feat/ext example (#52)

* feat: add simple example

* chore: fix typo and formatting

* feat: make folder structure and add anymal c spawning(but file name is anyaml d yet

* fix: formatting

* add anymal d

* feat: add ui buttons

* feat: add headless option and play buttion function

* feat: add network file and adapt to anymal_d

* feat: alpha 0.0.1
  • Loading branch information
mqjinwon authored Oct 16, 2024
1 parent 532063f commit 5762f94
Show file tree
Hide file tree
Showing 46 changed files with 1,831 additions and 115 deletions.
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 .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repos:
hooks:
- id: flake8
additional_dependencies: [flake8-simplify, flake8-return]
exclude: ^guideline/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ros.distro": "humble"
}
"ros.distro": "jazzy"
}
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"
}
]
}
3 changes: 3 additions & 0 deletions Asset/image-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Asset/image-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Asset/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 52 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,95 @@
# 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. 환경변수 설정

```
# Rename all occurrences of StrideSim (in files/directories) to your_fancy_extension_name
python scripts/rename_template.py your_fancy_extension_name
```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"
```

- 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
1. 강화학습 라이브러리 설치

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

#### Set up IDE (Optional)
2. 강화학습 단독 실행

To setup the IDE, please follow these instructions:
```bash
python rl/train.py --task Template-Isaac-Velocity-Rough-Anymal-D-v0
```

- 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.
3. StrideSim 실행

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.
3-1. 프로그램 실행

```bash
# 환경변수 설정 후
ISAACSIM
```

#### Setup as Omniverse Extension (Optional)
3-2. 확장 프로그램 설정

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).
3-2-1. window -> extension 창으로 이동
3-2-2. 삼지창 버튼을 눌러 확장 프로그램 경로 삽입 (본 프로젝트의 exts까지 넣으면 된다.)
![alt text](Asset/image.png)

To enable your extension, follow these steps:
3-2-3. 좌측에 시뮬레이션 버튼을 클릭 (이때, AUTOLOAD를 활성화하면 편하다.)

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-3. 확장 프로그램 실행
![alt text](Asset/image-1.png)
이제 Isaac Examples 탭에 StrideSim_AnymalD 탭이 나오는 것을 확인할 수 있다.

2. **Search and enable your extension**:
- Find your extension under the `Third Party` category.
- Toggle it to enable your extension.
![alt text](Asset/image-2.png)
버튼을 누르면 위와 같은 장면을 볼수 있고, anymalD를 부르는 것부터해서 학습 및 병렬 실행도 가능하다.

## 코드 포맷팅

## 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

0 comments on commit 5762f94

Please sign in to comment.