Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes VSCode settings to work with pip installation of Isaac Sim #628

Merged
merged 6 commits into from
Jul 4, 2024

Conversation

Mayankm96
Copy link
Contributor

@Mayankm96 Mayankm96 commented Jul 3, 2024

Description

Earlier, the VSCode settings were only made for installation with binaries. This expected the path to be "_isaac_sim". As many users reported, this doesn't work if we have PIP installation of Isaac Sim.

This MR fixes the above issue to ensure a smooth setup of vscode.

Fixes #620, #629

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • 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
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@Mayankm96 Mayankm96 requested a review from Dhoeller19 July 3, 2024 16:28
@Mayankm96 Mayankm96 self-assigned this Jul 3, 2024
@Mayankm96 Mayankm96 added the bug Something isn't working label Jul 3, 2024
@Dhoeller19 Dhoeller19 merged commit 455a174 into main Jul 4, 2024
3 checks passed
@Dhoeller19 Dhoeller19 deleted the fix/vs-code-settings branch July 4, 2024 11:12
@timswim
Copy link

timswim commented Jul 4, 2024

Thanks for your commits! I'm still trying to install Isaac Lab with pip, but now I get a different error.

File "/home/user/Python_projects/IsaacLab/.vscode/tools/setup_vscode.py", line 35, in <module> raise FileNotFoundError( FileNotFoundError: Could not find the isaac-sim directory: /home/user/Python_projects/IsaacLab/_isaac_sim. There are two possible reasons for this: 1. The Isaac Sim directory does not exist as a symlink in the Isaac Lab directory. 2. The script could import the 'isaacsim' package. This could be due to the 'isaacsim' package not being installed in the Python environment. Please make sure that the Isaac Sim directory exists or that the 'isaacsim' package is installed.

The interesting thing is that when I run setup_vscode.py via debug in VSCode
isaacsim_dir = os.environ.get("ISAAC_PATH", "") works and I get the path to isaacsim correctly, but when I run ./isaaclab.sh --install in terminal, isaacsim is not visible in the specified path (I checked that it exists).

@Mayankm96
Copy link
Contributor Author

@timswim Some more fixes are on their way in #631 . Testing it internally for windows and this should get merged soon.

mohanksriram pushed a commit to mohanksriram/IsaacLab that referenced this pull request Jul 12, 2024
…ac-sim#628)

Earlier, the VSCode settings were only made for installation with
binaries. This expected the path to be "_isaac_sim". As many users
reported, this doesn't work if we have PIP installation of Isaac Sim.

This MR fixes the above issue to ensure a smooth setup of vscode.

Fixes isaac-sim#620, isaac-sim#629

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [ ] 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
Mayankm96 pushed a commit that referenced this pull request Jul 17, 2024
…ainers (#559)

# Description

Changes made in [PR
#628](455a174)
caused using the VSCode Debugger from `isaac-lab-base/-ros2` to no
longer function because `python.sh` was not being called. This is
because even though `{workspace}/_isaac_sim/python.sh` is initially set
as the default, `setup_vscode.py` replaces it with the python binary
that `python.sh` invokes, but without using `python.sh` certain envar
modifications don't happen such that e.g. `PYTHONPATH` is broken and
imports don't work.

This change checks if the calling executable matches the exact path we
expect with the isaac-lab containers, and then keeps it as the default
if it does.

## Type of change

- 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
fatimaanes pushed a commit to fatimaanes/omniperf that referenced this pull request Aug 8, 2024
…ac-sim#628)

Earlier, the VSCode settings were only made for installation with
binaries. This expected the path to be "_isaac_sim". As many users
reported, this doesn't work if we have PIP installation of Isaac Sim.

This MR fixes the above issue to ensure a smooth setup of vscode.

Fixes isaac-sim#620, isaac-sim#629

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [ ] 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
fatimaanes pushed a commit to fatimaanes/omniperf that referenced this pull request Aug 8, 2024
…ainers (isaac-sim#559)

# Description

Changes made in [PR
isaac-sim#628](isaac-sim@9d5e533)
caused using the VSCode Debugger from `isaac-lab-base/-ros2` to no
longer function because `python.sh` was not being called. This is
because even though `{workspace}/_isaac_sim/python.sh` is initially set
as the default, `setup_vscode.py` replaces it with the python binary
that `python.sh` invokes, but without using `python.sh` certain envar
modifications don't happen such that e.g. `PYTHONPATH` is broken and
imports don't work.

This change checks if the calling executable matches the exact path we
expect with the isaac-lab containers, and then keeps it as the default
if it does.

## Type of change

- 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
iamdrfly pushed a commit to iamdrfly/IsaacLab that referenced this pull request Nov 21, 2024
…ac-sim#628)

Earlier, the VSCode settings were only made for installation with
binaries. This expected the path to be "_isaac_sim". As many users
reported, this doesn't work if we have PIP installation of Isaac Sim.

This MR fixes the above issue to ensure a smooth setup of vscode.

Fixes isaac-sim#620, isaac-sim#629

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [ ] 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
iamdrfly pushed a commit to iamdrfly/IsaacLab that referenced this pull request Nov 21, 2024
…ainers (isaac-sim#559)

# Description

Changes made in [PR
isaac-sim#628](isaac-sim@455a174)
caused using the VSCode Debugger from `isaac-lab-base/-ros2` to no
longer function because `python.sh` was not being called. This is
because even though `{workspace}/_isaac_sim/python.sh` is initially set
as the default, `setup_vscode.py` replaces it with the python binary
that `python.sh` invokes, but without using `python.sh` certain envar
modifications don't happen such that e.g. `PYTHONPATH` is broken and
imports don't work.

This change checks if the calling executable matches the exact path we
expect with the isaac-lab containers, and then keeps it as the default
if it does.

## Type of change

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants