@@ -14,32 +14,33 @@ rem Helper functions
14
14
15
15
rem extract Isaac Sim directory
16
16
:extract_isaacsim_path
17
- rem Check if IsaacSim directory manually specified
18
- if not " %ISAACSIM_PATH% " == " " (
19
- rem Use local build
20
- set isaac_path = %ISAACSIM_PATH%
21
- ) else (
22
- rem check if isaacsim is installed
23
- pip show isaacsim-rl > nul 2 >& 1
17
+ rem check if conda environment is activated and isaacsim package is installed
18
+ if not " %CONDA_PREFIX% " == " " (
19
+ rem use conda python
20
+ set python_exe = %CONDA_PREFIX% \python
21
+ call %python_exe% -m pip show isaacsim-rl > nul 2 >& 1
24
22
if errorlevel 1 (
25
- rem Use TeamCity build or pip install
26
- set isaac_path = %ISAACLAB_PATH% \_isaac_sim
23
+ rem set isaac path to empty
24
+ set isaac_path =
27
25
) else (
28
- rem use the python executable to get the path
29
- call :extract_python_exe
30
- rem retrieve the isaacsim path
26
+ rem retrieve the isaacsim path from the installed package
31
27
set " isaac_path = "
32
28
for /f " delims=" %%i in ('!python_exe! -c " import isaacsim; import os; print(os.environ['ISAAC_PATH'])" ') do (
33
29
if not defined isaac_path (
34
30
set " isaac_path = %%i "
35
31
)
36
32
)
37
33
)
34
+ ) else (
35
+ rem Use the sym-link path to Isaac Sim directory
36
+ set isaac_path = %ISAACLAB_PATH% \_isaac_sim
38
37
)
39
38
rem Check if the directory exists
40
39
if not exist " %isaac_path% " (
41
- echo [ERROR] Isaac Sim directory not found at path: %isaac_path%
42
- echo [ERROR] Please specify the path to Isaac Sim directory using 'ISAACSIM_PATH' environment variable.
40
+ echo [ERROR] Unable to find the Isaac Sim directory: %isaac_path%
41
+ echo /tThis could be due to the following reasons:
42
+ echo /t1. Conda environment with Isaac Sim pip package is not activated.
43
+ echo /t2. Isaac Sim directory is not available at the default path: %ISAACLAB_PATH% \_isaac_sim
43
44
exit /b 1
44
45
)
45
46
goto :eof
@@ -51,26 +52,17 @@ if not "%CONDA_PREFIX%"=="" (
51
52
rem use conda python
52
53
set python_exe = %CONDA_PREFIX% \python
53
54
) else (
54
- rem check if isaacsim is installed
55
- pip show isaacsim-rl > nul 2 >& 1
56
- if errorlevel 1 (
57
- rem obtain isaacsim path
58
- call :extract_isaacsim_path
59
- rem use python from kit if Isaac Sim not installed from pip
60
- set python_exe = %isaac_path% \python.bat
61
- ) else (
62
- rem use current python if Isaac Sim is installed from pip
63
- set " python_exe = "
64
- for /f " delims=" %%i in ('where python') do (
65
- if not defined python_exe (
66
- set " python_exe = %%i "
67
- )
68
- )
69
- )
55
+ rem obtain isaacsim path
56
+ call :extract_isaacsim_path
57
+ rem use python from kit if Isaac Sim not installed from pip
58
+ set python_exe = %isaac_path% \python.bat
70
59
)
71
60
rem check if there is a python path available
72
61
if " %python_exe% " == " " (
73
- echo [ERROR] No python executable found at path: %isaac_path%
62
+ echo [ERROR] Unable to find any Python executable at path: %isaac_path%
63
+ echo /tThis could be due to the following reasons:
64
+ echo /t1. Conda environment is not activated.
65
+ echo /t2. Python executable is not available at the default path: %ISAACLAB_PATH% \_isaac_sim\python.bat
74
66
exit /b 1
75
67
)
76
68
goto :eof
@@ -257,8 +249,6 @@ if "%arg%"=="-i" (
257
249
)
258
250
rem install the rl-frameworks specified
259
251
call !python_exe! -m pip install -e %ISAACLAB_PATH% \source\extensions\omni.isaac.lab_tasks[!framework_name! ]
260
- rem setup vscode settings
261
- call :update_vscode_settings
262
252
shift
263
253
) else if " %arg% " == " --install" (
264
254
rem install the python packages in omni.isaac.rl/source directory
0 commit comments