Ros commands no longer working after source catkin_ws/devel/setup.bash
Hi!
One day I was suddenly not able to run my ros projects anymore. When I source /opt/ros/melodic/setup.bash
the ros commands become available, such as catkin_make
. But when I then try to source ~/scout/catkin_ws/devel/setup.bash
such that I can run my own project files, the ros commands are no longer working. When I type for example catkin_make
I get the following error:
Command 'catkin_make' not found, but can be installed with:
sudo apt install catkin
If I now re-run source /opt/ros/melodic/setup.bash
the ros commands are working again, such as cakin_make. But I am not able to run any of my projects. Double tab-ing after typing rosrun
does not show any of my projects, they do not autocomplete, and if I try to run them I get the warning '[rospack] Error: package "name of package" not found'. (where the name of my package is shown instead of "name of package").
It seems like to me that devel/setup.bash
is malfunctioning and somehow counteracting melodic/setup.bash
without doing what it is supposed to.
Everything was working yesterday morning, and then it suddenly stopped working.
Im running on Ubuntu 18.04.4, ros melodic, and have installed gazebo9 if that is relevant. I normally run source from .bashrc, but I removed them in this test and ran them manually instead.
Any help in debugging this problem is highly appreciated! If there is some info that is missing please tell me, as I don't understand the problem and since I'm quite new to ROS I don't really know what's important and where to look...
Thank you in advance :)