NVIDIA Isaac Gym安裝與使用


NVIDIA做的Isaac Gym,個人理解就是一個類似於openai的Gym,不過把環境的模擬這個部分扔到了GPU上進行,這樣可以提升RL訓練的速度。

官網:https://developer.nvidia.com/isaac-gym
一篇blog:https://syncedreview.com/2021/09/01/deepmind-podracer-tpu-based-rl-frameworks-deliver-exceptional-performance-at-low-cost-95/

安裝

官網里面選擇立即加入,然后下載對應的Isaac Gym package,解壓之后打開docs/index.html,按照里面的Install in an existing Python environment步驟進行安裝即可。主要步驟就一步,即在python/目錄下執行pip install -e .

在 python/examples/ 目錄下執行,python joint_monkey.py來檢驗是否安裝正確。

可能出現的問題

如果出現了

ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory

的問題,可以嘗試

sudo apt install libpython3.7
# 或者
export LD_LIBRARY_PATH=/path/to/libpython/directory
# 或者對於使用conda的用戶
export LD_LIBRARY_PATH=/path/to/conda/envs/your_env/lib
# 自行替換 /path/to 這個路徑

需要注意的是安裝時需要cuda version大於等於11.4,不然會出現運行Isaac Gym時無法使用GPU的問題,比如出現:`[Warning] [carb.gym.plugin] Failed to create a valid PhysX CUDA Context Manager. Falling back to CPU.`。

cuda 11.4版本的更新參考:https://developer.nvidia.com/cuda-11-4-1-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_local


如果是不帶顯示器輸出的服務器運行isaacgym的話,可能會存在無法display的問題,類似於這種錯誤: ``` [Error] [carb.windowing-glfw.plugin] GLFW initialization failed. [Error] [carb.windowing-glfw.plugin] GLFW window creation failed! [Error] [carb.gym.plugin] Failed to create Window in CreateGymViewerInternal *** Failed to create viewer ```

可以參照這兩個solutions (我沒有試過) :


如果渲染界面出現黑屏並且提示Isaac gym無響應(Isaac gym no response)的話:我只在部分機器上見過這種情況,查看`joint_monkey.py`的代碼吼發現是267行`draw_viewer`函數卡住了,后來無意中搜到了解決方法: https://forums.developer.nvidia.com/t/running-examples-hangs/189609 ,可能是程序選錯了device
export VK_ICD_FILENAMES=/etc/vulkan/icd.d/nvidia_icd.json

即可

使用

若要利用Isaac Gym跑起一個agent,可以查看這個倉庫:https://github.com/NVIDIA-Omniverse/IsaacGymEnvs

未完待續...


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM