[feature] vscode-ros not sourcing workspace
See original GitHub issueGeneral information OS version, Ubuntu? Windows: Ubuntu 18.04 Visual studio code version: 1.38.0-insider Version of the plugin: 0.5.0 python environment: miniconda3 (py2.7)
what is the bug
When I try to use the rosrun debug function (F5 after roscore is started) nothing happens. Further when trying to debug the workspace devel/setup.bash
is not sourced before debugging the python node. As a result, I can not import modules from other rospackages.
expected behaviour
Having the ability to debug the rosnode on ubuntu 18.04. Further I also expected the Plugin to source the devel/setup.bash
file before starting the debugger.
Aditional info
I think this might be caused by the fact that I’m working in a conda environment since also when trying to run a rosnode using the ROS: Run a ROS executable (rosrun)
I get the [rospack] Error: package 'panda_autograsp' not found
error.
What I already tried
I tried setting "python.terminal.activateEnvironment": false
in the settings.json
. But now although the conda environment is not sourced the ROS application opens a new terminal every time when I try the ROS: Run a ROS executable (rosrun)
command. As a result the sourced $PYTHONPATH
is removed. This setting did, fortunately, enable me to debug my ROS nodes but not through the vs-code-ros
extension.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:17 (1 by maintainers)
I would also need this feature. even adding the sourcing to .bashrc didn’t work - standard “source /opt/noetic/ …” does, but not sourcing from my install within the catkin workspace. It does work for the terminal window, but when I start code from there, the extension does still not recognize my own packages. So I can’t ros launch for debugging and i can’t use roslaunch from the command palette to start my own nodes.
Yay! That just sounds wonderful =)
I am not 100% sure what your ROS dev environment looks like, but I agree it would be worthwhile looking into how ROS should work with
venv
(there’re likely work we need to do for this extension, but we need to dive further into the usage before that). The issue you posted invscode
looks like a very good starting point! Thanks for opening that ticket!