Windows下的安装见这篇博客:
Isaac Lab 安装与初体验 (windows环境)-CSDN博客
ubuntu22.04下的安装与windows下十分类似,还是参考官方的,Installation using Isaac Sim Binaries
Installation using Isaac Sim Binaries — Isaac Lab documentation (isaac-sim.github.io)https://isaac-sim.github.io/IsaacLab/source/setup/installation/binaries_installation.html
isaac sim安装
首先从Omniverse里安装,这里装的是最新的isaac sim4.1.0版本
拉取isaac lab最新代码
git clone https://github.com/isaac-sim/IsaacLab.git
下载好了后,切到IsaacLab目录,查看isaaclab使用帮助:
./isaaclab.sh --help
创建Isaac Sim符号链接
# 切到 IsaacLab 目录下
cd IsaacLab
# 创建软链接到你的isaac sim目录下
# 该命令里的 path_to_isaac_sim 要替换成你isaac-sim所在的目录,如我的是:
# /home/ai/omniverse/pkg/isaac-sim-4.1.0
ln -s path_to_isaac_sim _isaac_sim
# 我的软链接命令
# ln -s /home/ai/omniverse/pkg/isaac-sim-4.1.0 _isaac_sim
创建conda环境(可选,建议使用conda)
在创建conda环境前可以给conda换成国内源:
vim ~/.condarc
然后将下面内容复制粘贴进去并保存
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
运行下面命令创建conda环境,默认名字为 isaaclab
# 选项1:使用默认名字,为 isaaclab
./isaaclab.sh --conda
# 选项2:使用自己定义的名字,如这里的 my_isaaclab
# ./isaaclab.sh --conda my_isaaclab
请确保在运行任何脚本之前激活该环境:
conda activate isaaclab
安装Isaac Lab
安装依赖:
sudo apt install cmake build-essential
安装isaac lab:
./isaaclab.sh --install # or "./isaaclab.sh -i"
ps: 最好能科学上网,否则资源下载可能会不成功,也可以编辑 isaaclab.sh 文件,在pip install 后面加上 :
-i https://pypi.tuna.tsinghua.edu.cn/simple
验证安装
有两种开启方法,由于我们上面使用conda部署了环境,所以建议在conda虚拟环境里直接使用python命令来运行例子,即这里的方法2:
# 方法1: Using the isaaclab.sh executable
./isaaclab.sh -p source/standalone/tutorials/00_sim/launch_app.py# 方法2: Using python in your virtual environment
python source/standalone/tutorials/00_sim/launch_app.py
如果你的网络不好,大概率会出现资源加载不出来的错误:
Traceback (most recent call last): File "/home/ai/omniverse/pkg/isaac-lab/IsaacLab/source/standalone/tutorials/00_sim/launch_app.py", line 94, in <module> main() File "/home/ai/omniverse/pkg/isaac-lab/IsaacLab/source/standalone/tutorials/00_sim/launch_app.py", line 79, in main design_scene() File "/home/ai/omniverse/pkg/isaac-lab/IsaacLab/source/standalone/tutorials/00_sim/launch_app.py", line 51, in design_scene cfg_ground.func("/World/defaultGroundPlane", cfg_ground) File "/home/ai/omniverse/pkg/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/from_files/from_files.py", line 145, in spawn_ground_plane collision_prim_path = prim_utils.get_prim_path( File "/home/ai/omniverse/pkg/isaac-sim-4.1.0/exts/omni.isaac.core/omni/isaac/core/utils/prims.py", line 612, in get_prim_path return prim.GetPath() AttributeError: 'NoneType' object has no attribute 'GetPath'
网络配置可以看这篇文章:
Omniverse、Isaac Sim、Isaac Lab入门必会之 Nucleus 部署_omniverse nucleus-CSDN博客https://blog.csdn.net/Vulcan_S/article/details/140142933?spm=1001.2014.3001.5502这里简单的将资源改到本地
我们可以改Lab 里关于 ISAAC_NUCLEUS_DIR 等配置变量的值,文件在source\extensions\omni.isaac.lab\omni\isaac\lab\utils\assets.py,
可以从类似这里跳转 from omni.isaac.lab.utils.assets import NVIDIA_NUCLEUS_DIR
将 NUCLEUS_ASSET_ROOT_DIR 改成资源的本地路径,资源可以通过 Nucleus Navigator 下载到本地
将该代码注释掉
NUCLEUS_ASSET_ROOT_DIR = carb.settings.get_settings().get("/persistent/isaac/asset_root/cloud")
然后重新定义 NUCLEUS_ASSET_ROOT_DIR 到你的本地资源,如我的
NUCLEUS_ASSET_ROOT_DIR = f"/home/ai/omniverse/Downloads/Assets/Isaac/4.0"