ISAAC Lab 是 NVIDIA 提供的一个 GPU 加速的开源框架,专为简化机器人研究工作流程而设计,特别是在强化学习、模仿学习和运动规划等领域。
它基于 NVIDIA 的 ISAAC Sim 构建,结合了高精度的物理和传感器仿真,成为了从仿真到现实应用的理想选择。
本文会分享ISAAC Lab的安装和使用,通过conda和pip进行安装的,适用于windows系统,带大家规避一些坑。
目录
1、认识ISAAC Lab
ISAAC Lab 提供了一套比较全面的工具和环境,包含了各种机器人模型、训练环境、物理仿真和传感器仿真。
- 机器人模型 Isaac Lab 提供 16 种常用的机器人模型,包括机械手、四足动物和类人机器人,满足不同的研究需求。
- 训练环境 提供 30 多个即用型训练环境,支持使用 RSL RL、SKRL、RL Games 和 Stable Baselines 等流行的强化学习框架进行训练,同时支持多智能体强化学习。
- 物理仿真 支持刚体、铰接系统和可变形物体的仿真,确保机器人在与环境互动时具有真实的物理表现。
- 传感器仿真 提供多种传感器仿真,包括 RGB 摄像头、深度摄像头、IMU、接触传感器等,帮助机器人更好地感知环境。
代码开源地址:https://github.com/isaac-sim/IsaacLab
官方指导文档:https://isaac-sim.github.io/IsaacLab/main/source/setup/ecosystem.html
目前已经支持超过16 个机器人,如上图所示。
-
经典机器人:Cartpole, 类人生物, 蚂蚁
-
机械臂:UR10、Franka、Allegro、Shadow Hand
-
四足动物: Anybotics Anymal-B, Anymal-C, Anymal-D, Unitree A1, Unitree Go1, Unitree Go2, Boston Dynamics Spot
-
人形机器人:Unitree H1、Unitree G1
-
四轴飞行器:Crazyflie
添加其他机器人,参考这里
2、安装ISAAC Sim
ISAAC Lab是基于NVIDIA的ISAAC Sim构建的,需要先安装Isaac Sim。
2.1、首先创建conda环境
conda create -n isaaclab python=3.10
2.2、进入isaaclab环境
conda activate isaaclab
2.3、接着安装torch 2.4.0
pip install torch==2.4.0 --index-url https://download.pytorch.org/whl/cu118
安装好后,可以检测一下能否正常导入,在终端输入python,,再输入import torch
问题:正常是会报错的:OSError:................... fbgemm.dll
分析:这是由于torch 2.4.0需要依赖fbgemm.dll库,但本地电脑没有就会报错了
解决方案:下载libomp140.x86_64.dll,然后放到C:\Windows\System32中
2.4、安装numpy 1.26.4
pip install numpy==1.26.4 -i https://pypi.tuna.tsinghua.edu.cn/simple
这时再检测能否正常导入torch,import torch,正常是没问题了。
2.5、更新一下pip
pip install --upgrade pip
2.6、开始安装Isaac Sim
pip install isaacsim==4.2.0.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
这里我没有参考官网的,因为官方使用pypi.nvidia.com,太慢了;用清华源更快~
再安装一些依赖包
pip install isaacsim-rl isaacsim-replicator isaacsim-extscache-physics isaacsim-extscache-kit-sdk isaacsim-extscache-kit isaacsim-app -i https://pypi.tuna.tsinghua.edu.cn/simple
3、简单测试ISAAC Sim
输入下面命令,会打开一个黑色窗口的
isaacsim
首次运行 ISAAC Sim 时,将从注册表中提取所有依赖的扩展。 此过程可能需要 10 分钟以上,太慢了。
首次运行将提示用户接受 Nvidia Omniverse 许可协议,需要输入yes
- By installing or using Isaac Sim, I agree to the terms of NVIDIA OMNIVERSE LICENSE AGREEMENT (EULA)
- in https://docs.omniverse.nvidia.com/isaacsim/latest/common/NVIDIA_Omniverse_License_Agreement.html
-
- Do you accept the EULA? (Yes/No): yes
看到打印下面信息:
还有显卡的情况
经过漫长的等待,终于看到kit Mini这个窗口啦
4、安装ISAAC Lab
下载ISAAC Lab的代码
git clone https://github.com/isaac-sim/IsaacLab.git
然后进入IsaacLab-main目录中,能看到 isaaclab.bat文件(后续经常使用这个文件的)
默认isaaclab.bat中安装东西时太慢了,下面是我修改了源码的,下载和安装东西时更快
可以参考使用,也可以用官方默认的
- @echo off
- setlocal EnableExtensions EnableDelayedExpansion
-
- rem Copyright (c) 2022-2024, The Isaac Lab Project Developers.
- rem All rights reserved.
- rem
- rem SPDX-License-Identifier: BSD-3-Clause
-
- rem Configurations
- set "ISAACLAB_PATH=%~dp0"
- goto main
-
- rem Helper functions
-
- rem extract Isaac Sim directory
- :extract_isaacsim_path
- rem Use the sym-link path to Isaac Sim directory
- set isaac_path=%ISAACLAB_PATH%\_isaac_sim
- rem Check if directory exists
- if not exist "%isaac_path%" (
- rem Find the Python executable
- call :extract_python_exe
- rem retrieve the isaacsim path from the installed package
- set "isaac_path="
- for /f "delims=" %%i in ('!python_exe! -c "import isaacsim; import os; print(os.environ['ISAAC_PATH'])"') do (
- if not defined isaac_path (
- set "isaac_path=%%i"
- )
- )
- )
- rem Check if the directory exists
- if not exist "%isaac_path%" (
- echo [ERROR] Unable to find the Isaac Sim directory: %isaac_path%
- echo %tab%This could be due to the following reasons:
- echo %tab%1. Conda environment with Isaac Sim pip package is not activated.
- echo %tab%2. Isaac Sim directory is not available at the default path: %ISAACLAB_PATH%\_isaac_sim
- exit /b 1
- )
- goto :eof
-
- rem extract the python from isaacsim
- :extract_python_exe
- rem check if using conda
- if not "%CONDA_PREFIX%"=="" (
- rem use conda python
- set python_exe=%CONDA_PREFIX%\python.exe
- ) else (
- rem use kit python
- set python_exe=%ISAACLAB_PATH%\_isaac_sim\python.bat
- )
- rem check for if isaac sim was installed to system python
- if not exist "%python_exe%" (
- set "python_exe="
- python -m pip show isaacsim-rl > nul 2>&1
- if %ERRORLEVEL% equ 0 (
- for /f "delims=" %%i in ('where python') do (
- if not defined python_exe (
- set "python_exe=%%i"
- )
- )
- )
- )
- if not exist "%python_exe%" (
- echo [ERROR] Unable to find any Python executable at path: %python_exe%
- echo %tab%This could be due to the following reasons:
- echo %tab%1. Conda environment is not activated.
- echo %tab%2. Python executable is not available at the default path: %ISAACLAB_PATH%\_isaac_sim\python.bat
- exit /b 1
- )
- goto :eof
-
-
- rem extract the simulator exe from isaacsim
- :extract_isaacsim_exe
- call :extract_python_exe
- call !python_exe! -m pip show isaacsim-rl > nul 2>&1
- if errorlevel 1 (
- rem obtain isaacsim path
- call :extract_isaacsim_path
- rem python executable to use
- set isaacsim_exe=!isaac_path!\isaac-sim.bat
- ) else (
- rem if isaac sim installed from pip
- set isaacsim_exe=isaacsim omni.isaac.sim
- )
- rem check if there is a python path available
- if not exist "%isaacsim_exe%" (
- echo [ERROR] No isaac-sim executable found at path: %isaacsim_exe%
- exit /b 1
- )
- goto :eof
-
-
- rem check if input directory is a python extension and install the module
- :install_isaaclab_extension
- echo %ext_folder%
- rem retrieve the python executable
- call :extract_python_exe
- rem if the directory contains setup.py then install the python module
- if exist "%ext_folder%\setup.py" (
- echo module: %ext_folder%
- call !python_exe! -m pip install --editable %ext_folder% -i https://pypi.tuna.tsinghua.edu.cn/simple
- )
- goto :eof
-
-
- rem setup anaconda environment for Isaac Lab
- :setup_conda_env
- rem get environment name from input
- set env_name=%conda_env_name%
- rem check if conda is installed
- where conda >nul 2>nul
- if errorlevel 1 (
- echo [ERROR] Conda could not be found. Please install conda and try again.
- exit /b 1
- )
- rem check if the environment exists
- call conda env list | findstr /c:"%env_name%" >nul
- if %errorlevel% equ 0 (
- echo [INFO] Conda environment named '%env_name%' already exists.
- ) else (
- echo [INFO] Creating conda environment named '%env_name%'...
- call conda create -y --name %env_name% python=3.10
- )
- rem cache current paths for later
- set "cache_pythonpath=%PYTHONPATH%"
- set "cache_ld_library_path=%LD_LIBRARY_PATH%"
- rem clear any existing files
- echo %CONDA_PREFIX%
- del "%CONDA_PREFIX%\etc\conda\activate.d\setenv.bat" 2>nul
- del "%CONDA_PREFIX%\etc\conda\deactivate.d\unsetenv.bat" 2>nul
- rem activate the environment
- call conda activate %env_name%
- rem setup directories to load isaac-sim variables
- mkdir "%CONDA_PREFIX%\etc\conda\activate.d" 2>nul
- mkdir "%CONDA_PREFIX%\etc\conda\deactivate.d" 2>nul
-
- rem obtain isaacsim path
- call :extract_isaacsim_path
- if exist "%isaac_path%" (
- rem add variables to environment during activation
- (
- echo @echo off
- echo rem for isaac-sim
- echo set "RESOURCE_NAME=IsaacSim"
- echo set CARB_APP_PATH=!isaac_path!\kit
- echo set EXP_PATH=!isaac_path!\apps
- echo set ISAAC_PATH=!isaac_path!
- echo set PYTHONPATH=%PYTHONPATH%;!isaac_path!\site
- echo.
- echo rem for isaac-lab
- echo doskey isaaclab=isaaclab.bat $*
- ) > "%CONDA_PREFIX%\etc\conda\activate.d\env_vars.bat"
- (
- echo $env:CARB_APP_PATH="!isaac_path!\kit"
- echo $env:EXP_PATH="!isaac_path!\apps"
- echo $env:ISAAC_PATH="!isaac_path!"
- echo $env:PYTHONPATH="%PYTHONPATH%;!isaac_path!\site"
- echo $env:RESOURCE_NAME="IsaacSim"
- ) > "%CONDA_PREFIX%\etc\conda\activate.d\env_vars.ps1"
- ) else (
- rem assume isaac sim will be installed from pip
- rem add variables to environment during activation
- (
- echo @echo off
- echo rem for isaac-sim
- echo set "RESOURCE_NAME=IsaacSim"
- echo.
- echo rem for isaac-lab
- echo doskey isaaclab=isaaclab.bat $*
- ) > "%CONDA_PREFIX%\etc\conda\activate.d\env_vars.bat"
- (
- echo $env:RESOURCE_NAME="IsaacSim"
- ) > "%CONDA_PREFIX%\etc\conda\activate.d\env_vars.ps1"
- )
-
- rem reactivate the environment to load the variables
- call conda activate %env_name%
-
- rem remove variables from environment during deactivation
- (
- echo @echo off
- echo rem for isaac-sim
- echo set "CARB_APP_PATH="
- echo set "EXP_PATH="
- echo set "ISAAC_PATH="
- echo set "RESOURCE_NAME="
- echo.
- echo rem for isaac-lab
- echo doskey isaaclab =
- echo.
- echo rem restore paths
- echo set "PYTHONPATH=%cache_pythonpath%"
- echo set "LD_LIBRARY_PATH=%cache_ld_library_path%"
- ) > "%CONDA_PREFIX%\etc\conda\deactivate.d\unsetenv_vars.bat"
- (
- echo $env:RESOURCE_NAME=""
- echo $env:PYTHONPATH="%cache_pythonpath%"
- echo $env:LD_LIBRARY_PATH="%cache_pythonpath%"
- ) > "%CONDA_PREFIX%\etc\conda\deactivate.d\unsetenv_vars.ps1"
-
- rem install some extra dependencies
- echo [INFO] Installing extra dependencies (this might take a few minutes)...
- call conda install -c conda-forge -y importlib_metadata >nul 2>&1
-
- rem deactivate the environment
- call conda deactivate
- rem add information to the user about alias
- echo [INFO] Added 'isaaclab' alias to conda environment for 'isaaclab.bat' script.
- echo [INFO] Created conda environment named '%env_name%'.
- echo.
- echo 1. To activate the environment, run: conda activate %env_name%
- echo 2. To install Isaac Lab extensions, run: isaaclab -i
- echo 3. To perform formatting, run: isaaclab -f
- echo 4. To deactivate the environment, run: conda deactivate
- echo.
- goto :eof
-
-
- rem Update the vscode settings from template and Isaac Sim settings
- :update_vscode_settings
- echo [INFO] Setting up vscode settings...
- rem Retrieve the python executable
- call :extract_python_exe
- rem Path to setup_vscode.py
- set "setup_vscode_script=%ISAACLAB_PATH%\.vscode\tools\setup_vscode.py"
- rem Check if the file exists before attempting to run it
- if exist "%setup_vscode_script%" (
- call !python_exe! "%setup_vscode_script%"
- ) else (
- echo [WARNING] setup_vscode.py not found. Aborting vscode settings setup.
- )
- goto :eof
-
-
- rem Print the usage description
- :print_help
- echo.
- echo usage: %~nx0 [-h] [-i] [-f] [-p] [-s] [-v] [-d] [-c] -- Utility to manage extensions in Isaac Lab.
- echo.
- echo optional arguments:
- echo -h, --help Display the help content.
- echo -i, --install [LIB] Install the extensions inside Isaac Lab and learning frameworks as extra dependencies. Default is 'all'.
- echo -f, --format Run pre-commit to format the code and check lints.
- echo -p, --python Run the python executable (python.bat) provided by Isaac Sim.
- echo -s, --sim Run the simulator executable (isaac-sim.bat) provided by Isaac Sim.
- echo -t, --test Run all python unittest tests.
- echo -v, --vscode Generate the VSCode settings file from template.
- echo -d, --docs Build the documentation from source using sphinx.
- echo -c, --conda [NAME] Create the conda environment for Isaac Lab. Default name is 'isaaclab'.
- echo.
- goto :eof
-
-
- rem Main
- :main
-
- rem check argument provided
- if "%~1"=="" (
- echo [Error] No arguments provided.
- call :print_help
- exit /b 1
- )
-
- rem pass the arguments
- :loop
- if "%~1"=="" goto :end
- set "arg=%~1"
-
- rem read the key
- if "%arg%"=="-i" (
- rem install the python packages in omni.isaac.rl/source directory
- echo [INFO] Installing extensions inside the Isaac Lab repository...
- call :extract_python_exe
- for /d %%d in ("%ISAACLAB_PATH%\source\extensions\*") do (
- set ext_folder="%%d"
- call :install_isaaclab_extension
- )
- rem install the python packages for supported reinforcement learning frameworks
- echo [INFO] Installing extra requirements such as learning frameworks...
- if "%~2"=="" (
- echo [INFO] Installing all rl-frameworks.
- set framework_name=all
- ) else if "%~2"=="none" (
- echo [INFO] No rl-framework will be installed.
- set framework_name=none
- shift
- ) else (
- echo [INFO] Installing rl-framework: %2.
- set framework_name=%2
- shift
- )
- rem install the rl-frameworks specified
- call !python_exe! -m pip install -e %ISAACLAB_PATH%\source\extensions\omni.isaac.lab_tasks[!framework_name!] -i https://pypi.tuna.tsinghua.edu.cn/simple
- shift
- ) else if "%arg%"=="--install" (
- rem install the python packages in omni.isaac.rl/source directory
- echo [INFO] Installing extensions inside the Isaac Lab repository...
- call :extract_python_exe
- for /d %%d in ("%ISAACLAB_PATH%\source\extensions\*") do (
- set ext_folder="%%d"
- call :install_isaaclab_extension
- )
- rem install the python packages for supported reinforcement learning frameworks
- echo [INFO] Installing extra requirements such as learning frameworks...
- if "%~2"=="" (
- echo [INFO] Installing all rl-frameworks.
- set framework_name=all
- ) else if "%~2"=="none" (
- echo [INFO] No rl-framework will be installed.
- set framework_name=none
- shift
- ) else (
- echo [INFO] Installing rl-framework: %2.
- set framework_name=%2
- shift
- )
- rem install the rl-frameworks specified
- call !python_exe! -m pip install -e %ISAACLAB_PATH%\source\extensions\omni.isaac.lab_tasks[!framework_name!] -i https://pypi.tuna.tsinghua.edu.cn/simple
- rem update the vscode settings
- rem once we have a docker container, we need to disable vscode settings
- call :update_vscode_settings
- shift
- ) else if "%arg%"=="-c" (
- rem use default name if not provided
- if not "%~2"=="" (
- echo [INFO] Using conda environment name: %2
- set conda_env_name=%2
- shift
- ) else (
- echo [INFO] Using default conda environment name: isaaclab
- set conda_env_name=isaaclab
- )
- call :setup_conda_env %conda_env_name%
- shift
- ) else if "%arg%"=="--conda" (
- rem use default name if not provided
- if not "%~2"=="" (
- echo [INFO] Using conda environment name: %2
- set conda_env_name=%2
- shift
- ) else (
- echo [INFO] Using default conda environment name: isaaclab
- set conda_env_name=isaaclab
- )
- call :setup_conda_env %conda_env_name%
- shift
- ) else if "%arg%"=="-f" (
- rem reset the python path to avoid conflicts with pre-commit
- rem this is needed because the pre-commit hooks are installed in a separate virtual environment
- rem and it uses the system python to run the hooks
- if not "%CONDA_DEFAULT_ENV%"=="" (
- set cache_pythonpath=%PYTHONPATH%
- set PYTHONPATH=
- )
-
- rem run the formatter over the repository
- rem check if pre-commit is installed
- pip show pre-commit > nul 2>&1
- if errorlevel 1 (
- echo [INFO] Installing pre-commit...
- pip install pre-commit -i https://pypi.tuna.tsinghua.edu.cn/simple
- )
-
- rem always execute inside the Isaac Lab directory
- echo [INFO] Formatting the repository...
- pushd %ISAACLAB_PATH%
- call python -m pre_commit run --all-files
- popd >nul
-
- rem set the python path back to the original value
- if not "%CONDA_DEFAULT_ENV%"=="" (
- set PYTHONPATH=%cache_pythonpath%
- )
- goto :end
- ) else if "%arg%"=="--format" (
- rem reset the python path to avoid conflicts with pre-commit
- rem this is needed because the pre-commit hooks are installed in a separate virtual environment
- rem and it uses the system python to run the hooks
- if not "%CONDA_DEFAULT_ENV%"=="" (
- set cache_pythonpath=%PYTHONPATH%
- set PYTHONPATH=
- )
-
- rem run the formatter over the repository
- rem check if pre-commit is installed
- pip show pre-commit > nul 2>&1
- if errorlevel 1 (
- echo [INFO] Installing pre-commit...
- pip install pre-commit -i https://pypi.tuna.tsinghua.edu.cn/simple
- )
-
- rem always execute inside the Isaac Lab directory
- echo [INFO] Formatting the repository...
- pushd %ISAACLAB_PATH%
- call python -m pre_commit run --all-files
- popd >nul
-
- rem set the python path back to the original value
- if not "%CONDA_DEFAULT_ENV%"=="" (
- set PYTHONPATH=%cache_pythonpath%
- )
- goto :end
- ) else if "%arg%"=="-p" (
- rem run the python provided by Isaac Sim
- call :extract_python_exe
- echo [INFO] Using python from: !python_exe!
- REM Loop through all arguments - mimic shift
- set "allArgs="
- for %%a in (%*) do (
- REM Append each argument to the variable, skip the first one
- if defined skip (
- set "allArgs=!allArgs! %%a"
- ) else (
- set "skip=1"
- )
- )
- !python_exe! !allArgs!
- goto :end
- ) else if "%arg%"=="--python" (
- rem run the python provided by Isaac Sim
- call :extract_python_exe
- echo [INFO] Using python from: !python_exe!
- REM Loop through all arguments - mimic shift
- set "allArgs="
- for %%a in (%*) do (
- REM Append each argument to the variable, skip the first one
- if defined skip (
- set "allArgs=!allArgs! %%a"
- ) else (
- set "skip=1"
- )
- )
- !python_exe! !allArgs!
- goto :end
- ) else if "%arg%"=="-s" (
- rem run the simulator exe provided by isaacsim
- call :extract_isaacsim_exe
- echo [INFO] Running isaac-sim from: !isaacsim_exe!
- set "allArgs="
- for %%a in (%*) do (
- REM Append each argument to the variable, skip the first one
- if defined skip (
- set "allArgs=!allArgs! %%a"
- ) else (
- set "skip=1"
- )
- )
- !isaacsim_exe! --ext-folder %ISAACLAB_PATH%\source\extensions !allArgs1
- goto :end
- ) else if "%arg%"=="--sim" (
- rem run the simulator exe provided by Isaac Sim
- call :extract_isaacsim_exe
- echo [INFO] Running isaac-sim from: !isaacsim_exe!
- set "allArgs="
- for %%a in (%*) do (
- REM Append each argument to the variable, skip the first one
- if defined skip (
- set "allArgs=!allArgs! %%a"
- ) else (
- set "skip=1"
- )
- )
- !isaacsim_exe! --ext-folder %ISAACLAB_PATH%\source\extensions !allArgs1
- goto :end
- ) else if "%arg%"=="-t" (
- rem run the python provided by Isaac Sim
- call :extract_python_exe
- set "allArgs="
- for %%a in (%*) do (
- REM Append each argument to the variable, skip the first one
- if defined skip (
- set "allArgs=!allArgs! %%a"
- ) else (
- set "skip=1"
- )
- )
- !python_exe! tools\run_all_tests.py !allArgs!
- goto :end
- ) else if "%arg%"=="--test" (
- rem run the python provided by Isaac Sim
- call :extract_python_exe
- set "allArgs="
- for %%a in (%*) do (
- REM Append each argument to the variable, skip the first one
- if defined skip (
- set "allArgs=!allArgs! %%a"
- ) else (
- set "skip=1"
- )
- )
- !python_exe! tools\run_all_tests.py !allArgs!
- goto :end
- ) else if "%arg%"=="-v" (
- rem update the vscode settings
- call :update_vscode_settings
- shift
- goto :end
- ) else if "%arg%"=="--vscode" (
- rem update the vscode settings
- call :update_vscode_settings
- shift
- goto :end
- ) else if "%arg%"=="-d" (
- rem build the documentation
- echo [INFO] Building documentation...
- call :extract_python_exe
- pushd %ISAACLAB_PATH%\docs
- call !python_exe! -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
- call !python_exe! -m sphinx -b html -d _build\doctrees . _build\html
- echo [INFO] To open documentation on default browser, run:
- echo xdg-open "%ISAACLAB_PATH%\docs\_build\html\index.html"
- popd >nul
- shift
- goto :end
- ) else if "%arg%"=="--docs" (
- rem build the documentation
- echo [INFO] Building documentation...
- call :extract_python_exe
- pushd %ISAACLAB_PATH%\docs
- call !python_exe! -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
- call !python_exe! -m sphinx -b html -d _build\doctrees . _build\current
- echo [INFO] To open documentation on default browser, run:
- echo xdg-open "%ISAACLAB_PATH%\docs\_build\current\index.html"
- popd >nul
- shift
- goto :end
- ) else if "%arg%"=="-h" (
- call :print_help
- goto :end
- ) else if "%arg%"=="--help" (
- call :print_help
- goto :end
- ) else (
- echo Invalid argument provided: %arg%
- call :print_help
- exit /b 1
- )
- goto loop
-
- :end
- exit /b 0
查看 isaaclab.bat 的使用方式,输入.\isaaclab.bat --help
(isaaclab) PS D:\2024\project\IsaacLab-main>
(isaaclab) PS D:\2024\project\IsaacLab-main> .\isaaclab.bat --helpusage: isaaclab.bat [-h] [-i] [-f] [-p] [-s] [-v] [-d] [-c] -- Utility to manage extensions in Isaac Lab.
optional arguments:
-h, --help Display the help content.
-i, --install [LIB] Install the extensions inside Isaac Lab and learning frameworks as extra dependencies. Default is 'all'.
-f, --format Run pre-commit to format the code and check lints.
-p, --python Run the python executable (python.bat) provided by Isaac Sim.
-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'.(isaaclab) PS D:\2024\project\IsaacLab-main>
然后安装ISAAC Lab,这里有两种方式;
方式1:默认完整版
.\isaaclab.bat --install :: or "isaaclab.bat -i"
默认情况下,这将安装所有学习框架
这个方式大概率会报错,但不影响基本使用,先不管了
- Building wheels for collected packages: omni-isaac-lab_tasks
- Building editable for omni-isaac-lab_tasks (pyproject.toml) ... done
- Created wheel for omni-isaac-lab_tasks: filename=omni_isaac_lab_tasks-0.10.13-0.editable-py3-none-any.whl size=3640 sha256=52d4aa52691354e4437813125cb7e91333fb9d6eaa99af4fa1b86a30daef7efe
- Stored in directory: C:\Users\Administrator\AppData\Local\Temp\pip-ephem-wheel-cache-5f9mh9wj\wheels\2b\14\1f\9435ad243a14599ab9b4defd2f8e13254e2e390ed93098a57f
- Successfully built omni-isaac-lab_tasks
- Installing collected packages: omni-isaac-lab_tasks
- Attempting uninstall: omni-isaac-lab_tasks
- Found existing installation: omni-isaac-lab_tasks 0.10.13
- Uninstalling omni-isaac-lab_tasks-0.10.13:
- Successfully uninstalled omni-isaac-lab_tasks-0.10.13
- Successfully installed omni-isaac-lab_tasks-0.10.13
- [INFO] Installing extra requirements such as learning frameworks...
- [INFO] Installing rl-framework: ::.
- ERROR: Exception:
- Traceback (most recent call last):
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_vendor\packaging\requirements.py", line 36, in __init__
- parsed = _parse_requirement(requirement_string)
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_vendor\packaging\_parser.py", line 62, in parse_requirement
- return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_vendor\packaging\_parser.py", line 77, in _parse_requirement
- extras = _parse_extras(tokenizer)
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_vendor\packaging\_parser.py", line 164, in _parse_extras
- with tokenizer.enclosing_tokens(
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\contextlib.py", line 142, in __exit__
- next(self.gen)
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_vendor\packaging\_tokenizer.py", line 189, in enclosing_tokens
- self.raise_syntax_error(
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_vendor\packaging\_tokenizer.py", line 167, in raise_syntax_error
- raise ParserSyntaxError(
- pip._vendor.packaging._tokenizer.ParserSyntaxError: Expected matching RIGHT_BRACKET for LEFT_BRACKET, after extras
- placeholder[::]
- ~^
-
- The above exception was the direct cause of the following exception:
-
- Traceback (most recent call last):
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_internal\cli\base_command.py", line 105, in _run_wrapper
- status = _inner_run()
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_internal\cli\base_command.py", line 96, in _inner_run
- return self.run(options, args)
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_internal\cli\req_command.py", line 67, in wrapper
- return func(self, options, args)
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_internal\commands\install.py", line 343, in run
- reqs = self.get_requirements(args, options, finder, session)
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_internal\cli\req_command.py", line 244, in get_requirements
- req_to_add = install_req_from_editable(
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_internal\req\constructors.py", line 235, in install_req_from_editable
- parts = parse_req_from_editable(editable_req)
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_internal\req\constructors.py", line 204, in parse_req_from_editable
- name, url, extras_override = parse_editable(editable_req)
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_internal\req\constructors.py", line 113, in parse_editable
- get_requirement("placeholder" + extras.lower()).extras,
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_internal\utils\packaging.py", line 45, in get_requirement
- return Requirement(req_string)
- File "D:\ProgramData\anaconda3\envs\isaaclab\lib\site-packages\pip\_vendor\packaging\requirements.py", line 38, in __init__
- raise InvalidRequirement(str(e)) from e
- pip._vendor.packaging.requirements.InvalidRequirement: Expected matching RIGHT_BRACKET for LEFT_BRACKET, after extras
- placeholder[::]
- ~^
- [INFO] Setting up vscode settings...
- [WARN] Could not find Isaac Sim VSCode settings: D:\ProgramData\anaconda3\envs\isaaclab\Lib\site-packages\isaacsim\.vscode\settings.json.
- This will result in missing 'python.analysis.extraPaths' in the VSCode
- settings, which limits the functionality of the Python language server.
- However, it does not affect the functionality of the Isaac Lab project.
- We are working on a fix for this issue with the Isaac Sim team.
- Invalid argument provided: or
-
- usage: isaaclab.bat [-h] [-i] [-f] [-p] [-s] [-v] [-d] [-c] -- Utility to manage extensions in Isaac Lab.
-
- optional arguments:
- -h, --help Display the help content.
- -i, --install [LIB] Install the extensions inside Isaac Lab and learning frameworks as extra dependencies. Default is 'all'.
- -f, --format Run pre-commit to format the code and check lints.
- -p, --python Run the python executable (python.bat) provided by Isaac Sim.
- -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'.
方式2:精简版
.\isaaclab.bat --install rl_games :: or "isaaclab.bat -i rl_games"
只想安装特定框架,则可以将框架的名称作为参数传递。
参数值:rl_games、rsl_rl、sb3、skrl、robomimic、none
安装成功后,如下图所示的:
5、测试ISAAC Lab是否安装成功
输入下面命令
.\isaaclab.bat -p source\standalone\tutorials\00_sim\create_empty.py
需要等待一会~
然后出现下面窗口,成功啦
6、案例:生成不同的四足机器人
输入下面命令
.\isaaclab.bat -p source\standalone\demos\quadrupeds.py
需要等待一会~
出现下面窗口,看到不同的四足机器人,成功啦
其他的功能也可以慢慢探索啦
分享完成~
后续会持续分析ISAAC Lab的内容,包括机器人的强化学习、模仿学习和运动规划实现仿真。
评论记录:
回复评论: