文章目录
配置
要求:
Ubuntu 18.04 or 20.04
Python 3.6, 3.7 or 3.8
Minimum NVIDIA driver version: Linux: 470
个人配置:
Ubuntu 20.04
nvidia-driver-525
Python 3.7
一、Isaac Gym安装
1. 注册–下载Isaac Gym Preview 4 release
官方网站 https://developer.nvidia.com/isaac-gym
官方安装说明位于下述路径中
./isaacgym/docs/install.html
2. 方法一
使用anaconda创建环境
conda create -n (your env name) python==3.7
激活conda环境
conda activate (your env name)
安装PyTorch
conda install pytorch torchvision torchaudio -c pytorch
安装Isaac Gym
cd ./isaacgym/python
pip install -e .
验证安装包的详细信息
pip show isaacgym
卸载指令
pip uninstall isaacgym
3. 方法二
在根目录下run(过程较慢,耐心等待)
cd ./isaacgym
./ create_conda_env_rlgpu.sh
这样会创建一个新的conda环境,名为rlgpu(根据官方安装说明,该环境名称是可以在配置文件中修改的)
激活该环境
conda activate rlgpu
卸载指令,也即直接删除该环境
conda remove --name rlgpu --all
4. 测试是否安装成功
Ensure that Isaac Gym works on your system by running one of the examples from the python/examples directory, like joint_monkey.py.
cd examples
python joint_monkey.
出现如下图所示的界面, 表示安装成功
二、Isaac Gym强化学习范例环境安装
Shadow Hand Object Manipulation 等强化学习范例环境需要单独安装
1. 安装
下载强化学习范例https://github.com/NVIDIA-Omniverse/IsaacGymEnvs
克隆到isaacgym文件夹,在根目录下执行下述命令进行安装
cd ./isaacgym/IsaacGymEnvs
pip install -e.
安装后可能会出现如下警告,这是由于在根目录下运行导致的,不影响。
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
2. 测试是否安装成功
Running the benchmarks
python train.py task=Cartpole
or
python train.py task=Ant
出现如下图所示的界面, 表示安装成功
运行shadow灵巧手demo
python train.py task=ShadowHandOpenAI_FF
3. 可能出现的错误
在运行测试指令时,可能会出现如下错误
ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
确认是否安装Python lib
sudo apt install libpython3.7
Ubuntu20.04,找到 libpython3.7m.so.1.0 的所在位置(如果是按照上述isaacgym安装方法二,root安装的,则该文件在rlgpu的lib下)
设置 LD_LIBRARY_PATH 环境变量
export LD_LIBRARY_PATH=/usr/local/anaconda3/envs/rlgpu/lib
参考
https://zhuanlan.zhihu.com/p/538051397
https://blog.csdn.net/hongliyu_lvliyu/article/details/124605383
https://github.com/NVIDIA-Omniverse/IsaacGymEnvs
file: ./isaacgym/docs/install.html
https://blog.csdn.net/q7w8e9r4/article/details/134637399