File size: 1,841 Bytes
d6b3397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo off
setlocal EnableExtensions EnableDelayedExpansion



rem Copyright (c) 2022-2025, The Isaac Lab Project Developers

rem (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).

rem All rights reserved.

rem

rem SPDX-License-Identifier: BSD-3-Clause

set "ISAACLAB_PATH=%~dp0"

rem Remove trailing backslash.
if "%ISAACLAB_PATH:~-1%"=="\" set "ISAACLAB_PATH=%ISAACLAB_PATH:~0,-1%"



rem Find python to run CLI.
if defined VIRTUAL_ENV (
    set "python_exe=%VIRTUAL_ENV%\Scripts\python.exe"
) else if defined CONDA_PREFIX (
    set "python_exe=%CONDA_PREFIX%\python.exe"
) else if exist "%ISAACLAB_PATH%\_isaac_sim\python.bat" (
    set "python_exe=%ISAACLAB_PATH%\_isaac_sim\python.bat"
) else (

    rem Fallback.
    set "python_exe=python"
)



rem Add source/isaaclab to PYTHONPATH so we can import isaaclab.cli.
set "PYTHONPATH=%ISAACLAB_PATH%\source\isaaclab;%PYTHONPATH%"



rem Let Kit associate direct wrapper launches with the Isaac Sim desktop icon.
if "%RESOURCE_NAME%"=="" set "RESOURCE_NAME=IsaacSim"



rem If a local Isaac Sim binary is present, source its env setup so that

rem PYTHONPATH/PATH/EXP_PATH are correct without depending on a conda

rem activate.d hook (those don't fire under e.g. `conda run` on Windows).
if exist "%ISAACLAB_PATH%\_isaac_sim\" (
    if exist "%ISAACLAB_PATH%\_isaac_sim\setup_conda_env.bat" (
        call "%ISAACLAB_PATH%\_isaac_sim\setup_conda_env.bat" >NUL
    ) else (
        echo [WARNING] _isaac_sim is present but _isaac_sim\setup_conda_env.bat is missing; Isaac Sim env vars not exported. 1>&2
        echo [WARNING] Re-extract the Isaac Sim Windows zip if you intend to use the bundled binary. 1>&2
    )
)



rem Execute CLI.
"%python_exe%" -c "from isaaclab.cli import cli; cli()" %*

if errorlevel 1 exit /b 1
endlocal
exit /b 0