使用 Isaac Sim pip 进行安装#
安装 Isaac Sim#
从 Isaac Sim 4.0 发布开始,可以使用 pip 安装 Isaac Sim。这种方法是实验性的,可能与某些 Linux 发行版存在兼容性问题。如果遇到任何问题,请将其报告给 Isaac Sim 论坛 。
注意
使用 pip 安装 Isaac Sim 需要 GLIBC 2.34+ 版本兼容性。要检查系统上的 GLIBC 版本,请使用命令 ldd --version
。
这可能会在某些Linux发行版上引起兼容性问题。例如,Ubuntu 20.04 LTS 默认使用 GLIBC 2.31。如果遇到兼容性问题,建议采用 Isaac Sim Binaries Installation 的安装方法。
为了使用 Isaac Sim 的 pip 安装方法,建议首先创建一个虚拟环境。确保虚拟环境的 python 版本是 Python 3.10。
conda create -n isaaclab python=3.10 conda activate isaaclab
# create a conda environment named isaaclab with python3.10 python3.10 -m venv isaaclab # activate the conda environment source isaaclab/bin/activate
# create a virtual environment named isaaclab with python3.10 python3.10 -m venv isaaclab # activate the virtual environment isaaclab\Scripts\activate
接下来,根据系统上可用的 CUDA 版本,安装支持 CUDA 的 PyTorch 2.2.2 构建。
pip install torch==2.2.2 --index-url https://download.pytorch.org/whl/cu118
pip install torch==2.2.2 --index-url https://download.pytorch.org/whl/cu121
然后,安装运行 Isaac Lab 所需的 Isaac Sim 包:
pip install isaacsim-rl isaacsim-replicator isaacsim-extscache-physics isaacsim-extscache-kit-sdk isaacsim-extscache-kit isaacsim-app --extra-index-url https://pypi.nvidia.com
安装 Isaac Lab#
克隆 Isaac Lab#
备注
我们建议制作一个 fork Isaac Lab 仓库来贡献项目,但这不是使用框架的必要条件。如果您制作了一个 fork,请在以下说明中用您的用户名替换 isaac-sim
。
将 Isaac Lab 仓库克隆到您的工作空间:
git clone git@github.com:isaac-sim/IsaacLab.git
git clone https://github.com/isaac-sim/IsaacLab.git
备注
我们提供一个辅助可执行文件 isaaclab.sh ,提供管理扩展的实用工具:
./isaaclab.sh --help
usage: isaaclab.sh [-h] [-i] [-f] [-p] [-s] [-t] [-o] [-v] [-d] [-c] -- Utility to manage Isaac Lab.
optional arguments:
-h, --help Display the help content.
-i, --install [LIB] Install the extensions inside Isaac Lab and learning frameworks (rl_games, rsl_rl, sb3, skrl) as extra dependencies. Default is 'all'.
-f, --format Run pre-commit to format the code and check lints.
-p, --python Run the python executable provided by Isaac Sim or virtual environment (if active).
-s, --sim Run the simulator executable (isaac-sim.sh) provided by Isaac Sim.
-t, --test Run all python unittest tests.
-o, --docker Run the docker container helper script (docker/container.sh).
-v, --vscode Generate the VSCode settings file from template.
-d, --docs Build the documentation from source using sphinx.
-c, --conda [NAME] Create the conda environment for Isaac Lab. Default name is 'isaaclab'.
isaaclab.bat --help
usage: isaaclab.bat [-h] [-i] [-f] [-p] [-s] [-v] [-d] [-c] -- Utility to manage Isaac Lab.
optional arguments:
-h, --help Display the help content.
-i, --install [LIB] Install the extensions inside Isaac Lab and learning frameworks (rl_games, rsl_rl, sb3, skrl) as extra dependencies. Default is 'all'.
-f, --format Run pre-commit to format the code and check lints.
-p, --python Run the python executable provided by Isaac Sim or virtual environment (if active).
-s, --sim Run the simulator executable (isaac-sim.bat) provided by Isaac Sim.
-t, --test Run all python unittest tests.
-v, --vscode Generate the VSCode settings file from template.
-d, --docs Build the documentation from source using sphinx.
-c, --conda [NAME] Create the conda environment for Isaac Lab. Default name is 'isaaclab'.
安装#
使用
apt
安装依赖项(在 Ubuntu 上):sudo apt install cmake build-essential
运行安装命令,遍历
source/extensions
目录中的所有扩展,并使用 pip(带有--editable
标志)进行安装:
./isaaclab.sh --install # or "./isaaclab.sh -i"
isaaclab.bat --install :: or "isaaclab.bat -i"
备注
默认情况下,这将安装所有学习框架。如果您只想安装特定框架,请将框架的名称作为参数传递。例如,要仅安装 rl_games
框架,您可以运行
./isaaclab.sh --install rl_games # or "./isaaclab.sh -i rl_games"
isaaclab.bat --install rl_games :: or "isaaclab.bat -i rl_games"
有效选项为 rl_games
、rsl_rl
、sb3
、skrl
、robomimic
、none
。