Skip to content

Commit

Permalink
Fixes Isaac Sim executable on pip installation (#1172)
Browse files Browse the repository at this point in the history
# Description

This PR fix #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
  • Loading branch information
Toni-SM authored Oct 8, 2024
1 parent c81550a commit d18f0c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion isaaclab.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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%" (
Expand Down
10 changes: 8 additions & 2 deletions isaaclab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit d18f0c2

Please sign in to comment.