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.`。
如果是不帶顯示器輸出的服務器運行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 (我沒有試過) :
- https://forums.developer.nvidia.com/t/windowglfw-failed-create-window/122934
- https://forums.developer.nvidia.com/t/when-i-ran-the-examples/186377
如果渲染界面出現黑屏並且提示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
未完待續...