isaacgym RL
下载 isaacgym
bash
mkdir ~/isaacgym_ws/
curl -LJ https://developer.nvidia.com/isaac-gym-preview-4 -o IsaacGym_Preview_4_Package.tar.gz
tar -xvf IsaacGym_Preview_4_Package.tar.gz -C ~/isaacgym_ws/
创建 venv
bash
source $(ros2go_switch -v 2)
python -m venv .isaacgym --copies
source ~/.isaacgym/bin/activate
pip install numpy==1.23
cd ~/isaacgym_ws/
cd isaacgym/python && pip install -e .
提示
使用如下命令检查 pip 和 python 的安装路径,确认使用的是虚拟环境中的 pip 和 python
bash
which pip
which python
whereis pip
whereis python
pip --version
安装 rsl_rl
bash
cd ~/isaacgym_ws/
git clone https://github.com/leggedrobotics/rsl_rl.git
cd rsl_rl && git checkout v1.0.2 && pip install -e .
下载 legged_gym
bash
cd ~/isaacgym_ws/
git clone https://github.com/leggedrobotics/legged_gym.git
cd legged_gym && pip install -e .
创建 nvidia_icd.json
bash
sudo gedit /usr/share/vulkan/icd.d/nvidia_icd.json
/usr/share/vulkan/icd.d/nvidia_icd.json
json
{
"file_format_version" : "1.0.0",
"ICD": {
"library_path": "libGLX_nvidia.so.0",
"api_version" : "1.3.242"
}
}
修改~/.bashrc
bash
sudo gedit ~/.bashrc
bash
#python -m venv .isaacgym
source ~/.isaacgym/bin/activate
# isaacgym py3.8
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/isaacgym_ws/isaacgym/python/isaacgym/_bindings/linux-x86_64/
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json #segment fault
实例测试
bash
cd ~/isaacgym_ws/isaacgym/python/example && python joint_monkey.py