You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Copy the Version information from the Help | About menu>
Version: 1.83.0 (user setup)
Commit: e7e037083ff4455cf320e344325dacb480062c3c
Date: 2023-10-03T16:12:16.321Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19044
what is the bug
<current behavior>
Currently, whenever I launch VSCode from WSL2 within a ROS2 workspace (either from the source folder or from the main workspace folder), the notification "ROS Extension Initializing" pops up and doesn't go. The ROS version is then not recognized.
When VSCode is launched from any other location outside of the workspace, the extension initialization goes without a problem, and a correct version of ROS2 is displayed in the status bar (Humble).
expected behavior
<what you would expect to happen>
Correct initialization of the extension in the ROS2 workspace.
additional context
<any additional information would be helpful for a better understanding>
My default shell is zsh. Whichever way I modify the settings.json, the output window of the ROS extension shows this:
Sourcing Environment using: bash --login -c "source '/opt/ros/humble/setup.bash' && env"
Within every settings. json for User, Remote, and Workspace, I added the following:
"ros.rosSetupScript": "/opt/ros/humble/setup.zsh && env",
"ros.isolateEnvironment": true
Yet, setup.bash is still sourced. Seems like a bug.
The text was updated successfully, but these errors were encountered:
I think this bug hasn't been fixed yet, even using the pre-release version. I found the ROS extension always ignores the option ros.rosSetupScript and sources setup.bash by default.
Reproduction
Here is how I reproduced the problem (my workspace is /workspaces/ros2-ws):
It doesn't matter the setup file is local_setup.zsh, setup.zsh or local_setup.bash, the extension forces to source setup.bash
Remarks
I found quite difficult to debug using this extension when creating new package because the setup script is not updated. My temporary solution is to try to comment the option ros.rosSetupScript or reload VSCode window ; so that the ROS extension restarts the sourcing action.
I suggest to have a command, so called updateSetupScript to make this process easier. :) Many thanks!
ooeygui
changed the title
[bug] unable to initialize ROS extension when in a ROS2 workspace
[bug] Respect User's default Shell when initializing the ROS environment.
Mar 29, 2024
(Please add appropriate labels)
<Version of the plugin>
0.9.2
<Copy the Version information from the
Help | About
menu>Version: 1.83.0 (user setup)
Commit: e7e037083ff4455cf320e344325dacb480062c3c
Date: 2023-10-03T16:12:16.321Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19044
what is the bug
<current behavior>
Currently, whenever I launch VSCode from WSL2 within a ROS2 workspace (either from the source folder or from the main workspace folder), the notification "ROS Extension Initializing" pops up and doesn't go. The ROS version is then not recognized.
When VSCode is launched from any other location outside of the workspace, the extension initialization goes without a problem, and a correct version of ROS2 is displayed in the status bar (Humble).
expected behavior
<what you would expect to happen>
Correct initialization of the extension in the ROS2 workspace.
additional context
<any additional information would be helpful for a better understanding>
My default shell is zsh. Whichever way I modify the settings.json, the output window of the ROS extension shows this:
Sourcing Environment using: bash --login -c "source '/opt/ros/humble/setup.bash' && env"
Within every settings. json for User, Remote, and Workspace, I added the following:
"ros.rosSetupScript": "/opt/ros/humble/setup.zsh && env",
"ros.isolateEnvironment": true
Yet, setup.bash is still sourced. Seems like a bug.
The text was updated successfully, but these errors were encountered: