From d18f0c266be39998630aea0efc3853725b056715 Mon Sep 17 00:00:00 2001 From: Toni-SM Date: Tue, 8 Oct 2024 04:05:32 -0400 Subject: [PATCH] Fixes Isaac Sim executable on pip installation (#1172) # Description This PR fix https://github.com/isaac-sim/IsaacLab/issues/831 by taking into account the Isaac Sim installation using PIP - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --- isaaclab.bat | 2 +- isaaclab.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/isaaclab.bat b/isaaclab.bat index 53674d71f8..b415ef1a13 100644 --- a/isaaclab.bat +++ b/isaaclab.bat @@ -81,7 +81,7 @@ if errorlevel 1 ( set isaacsim_exe=!isaac_path!\isaac-sim.bat ) else ( rem if isaac sim installed from pip - set isaacsim_exe=isaacsim + set isaacsim_exe=isaacsim omni.isaac.sim ) rem check if there is a python path available if not exist "%isaacsim_exe%" ( diff --git a/isaaclab.sh b/isaaclab.sh index 297424b9c2..a604706e70 100755 --- a/isaaclab.sh +++ b/isaaclab.sh @@ -90,8 +90,14 @@ extract_isaacsim_exe() { local isaacsim_exe=${isaac_path}/isaac-sim.sh # check if there is a python path available if [ ! -f "${isaacsim_exe}" ]; then - echo "[ERROR] No Isaac Sim executable found at path: ${isaacsim_exe}" >&2 - exit 1 + # check for installation using Isaac Sim pip + if [ $(python -m pip list | grep -c 'isaacsim-rl') -gt 0 ]; then + # Isaac Sim - Python packages entry point + local isaacsim_exe="isaacsim omni.isaac.sim" + else + echo "[ERROR] No Isaac Sim executable found at path: ${isaac_path}" >&2 + exit 1 + fi fi # return the result echo ${isaacsim_exe}