isaac lac document
https://isaac-sim.github.io/IsaacLab/source/setup/installation/index.html
Installation Guide — Isaac Lab documentation
Installation Guide Caution We have dropped support for Isaac Sim versions 4.0.0 and below. We recommend using the latest Isaac Sim 4.2.0 release to benefit from the latest features and improvements. For more information, please refer to the Isaac Sim relea
isaac-sim.github.io
위 nvidia의 공식 isaac lab 가이드 문서이다.
설치부터 차근차근 해보자.
isaac lab 설치
https://isaac-sim.github.io/IsaacLab/source/setup/installation/pip_installation.html
Installation using Isaac Sim pip — Isaac Lab documentation
isaac-sim.github.io
git clone https://github.com/isaac-sim/IsaacLab.git
우선 clone받고 시작하자.
conda create -n isaaclab python=3.10
conda activate isaaclab
아나콘다 환경 만들기
pip install torch==2.4.0 --index-url https://download.pytorch.org/whl/cu118
파이토치와 cuda 설치
pip install --upgrade pip
pip upgrade 하기
pip install isaacsim-rl isaacsim-replicator isaacsim-extscache-physics isaacsim-extscache-kit-sdk isaacsim-extscache-kit isaacsim-app --extra-index-url https://pypi.nvidia.com
isaac lab을 돌리기 위해 필요한 isaac sim 패키지들 설치하기
Isaac Sim 설치 확인
# note: you can pass the argument "--help" to see all arguments possible.
isaacsim
isaac sim을 켜서 시뮬레이터가 돌아가는지 테스트.
단순한 윈도우가 열리긴 한다.
이렇게 빈 mini kit window가 열리면 정상이다.
# experience files can be absolute path, or relative path searched in isaacsim/apps or omni/apps
isaacsim omni.isaac.sim.python.kit
특정 experience file을 실행하려고 하니 에러가 난다.
Isaac lab 설치하기
isaaclab.bat --help
일단 위에서 설치했던 isaac lab 소스의 bat 파일을 실행해보자.
isaaclab.bat --install :: or "isaaclab.bat -i"
그 다음 필요한 것들 설치.
isaaclab.bat --install rl_games :: or "isaaclab.bat -i rl_games"
rl_games만 필요하다면 위 명령어를 쓰면 되지만,
이전 명령어를 쓰면 기본적으로는 다 설치하게 된다.
Isaac Lab 설치 확인
isaaclab.bat -p source\standalone\tutorials\00_sim\create_empty.py
isaac lab으로 empty 생성 파이썬 파일을 실행해보자.
다행히도 실행이 된다.
말그대로 빈 프로젝트를 연거라서 아무것도 없다.
그렇다면 이제 설치는 잘 되었다는 건데.
강화학습 예제 프로그램을 실행할 수는 없을까.
Isaac Lab 강화학습 예제 실행하기
https://isaac-sim.github.io/IsaacLab/source/overview/reinforcement-learning/rl_existing_scripts.html
Reinforcement Learning Wrappers — Isaac Lab documentation
isaac-sim.github.io
위 과정을 시도해보자.
isaaclab.bat -i rl_games
rl_games 예제 모듈을 설치.
isaaclab.bat -p source\standalone\workflows\rl_games\train.py --task Isaac-Ant-v0 --headless
훈련하는 스크립트를 실행 .
이것저것 뜨다가 step이 지속적으로 나오는 것으로 보아
학습이 시작된 모양이다.
epoch 끝까지 학습이 되어 끝났다.
isaaclab.bat -p source\standalone\workflows\rl_games\play.py --task Isaac-Ant-v0 --num_envs 32 --checkpoint /PATH/TO/model.pth
그 다음 학습된 결과를 play해보는 스크립트를 실행해본다.
보면 model path를 찾을 수 없다고 뜨는데,
/PATH/TO/model.pth 경로에 학습으로 만들어낸 모델 경로를 적어주어야한다.
결과 파일은 "IsaacLab\logs\rl_games\ant\훈련시간\nn" 위치에 나왔다.
이 경로를 설정해보자.
오 정상적으로 실행이 되었다!
isaaclab.bat -p source\standalone\workflows\rl_games\play.py --task Isaac-Ant-v0 --headless --video --video_length 200
비디오를 촬영? 하는 것도 있는 것 같다.
headless인 것을 보니 gui를 띄우지 않고 영상만 촬영하는 듯
보니까 ffmpeg가 필요하다고 하는데.
이미 ffmpeg가 설치되어있는 상태긴 하다.
뭐가 막 지나갔는데 이게 된 건지? 모르겠다.
새로히 video 파일이 생기긴 했다.
비디오가 찍혔다!
오 ant agent들이 막 움직이는 모습을 보니 들뜬다
'개발 · 컴퓨터공학 > 엔비디아 Issac-Sim' 카테고리의 다른 글
isaac sim / isaac lab 강화학습 humanoid (3) | 2024.11.10 |
---|---|
isaac sim pycharm 연동하기 (1) | 2024.11.10 |
Isaac Sim 실행하기 (10) | 2024.11.01 |
Omniverse Issac Sim Particle docs (2) | 2024.10.26 |
Nvidia Isaac-Sim Isaac-Lab 차이 (4) | 2024.10.14 |