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

未完待续...

posted @ 2022-02-07 11:05  BLMontgomery  阅读(5995)  评论(0编辑  收藏  举报