Why could it be that sourcing the devel/setup file doesn't register packages from the local catkin workspace anymore after building the workspace with `catkin build` whilst sourcing works well when building with `catkin_make`?

asked 2021-02-06 12:05:53 -0600

fabian gravatar image

updated 2021-02-07 08:08:49 -0600

I am experience a strange behavior today: Despite sourcing devel/setup.zsh (or *.bash) after building it with catkin build in a local catkin workspace, the ros package path doesn't seem to be amended anymore. In contrast, if I build with catkin_make, sourcing works as intended. What properties of my system need to be given for the source devel/setup.zsh(bash) to work?

Whilst I would have earlier been able to run a packages of a workspace after sourcing the setup.zsh file like so: rosrun PACKAGE EXECUTABLE I cannot do this anymore. The setup.zsh file looks as follows:

#!/usr/bin/env zsh
# generated from catkin/cmake/templates/setup.zsh.in


# source setup.sh from same directory as this file
_CATKIN_SETUP_DIR=$(builtin cd -q "`dirname "$0"`" > /dev/null && pwd)
emulate -R zsh -c 'source "$_CATKIN_SETUP_DIR/setup.sh"'

I can fortunately still launch the exectuables directly from the devel/lib sub-folders. I can also still run packages shipped with ros directly such as rosrun rviz rviz. How can I make sure that the command source devel/setup.zsh works as intended when I build the packages with catkin build? How could the behavior of catkin_make vs catkin build influence the souring efficacy?

I am running ros noetic. Today I also removed the tracker-extract service after experiencing memory leakages on my computer. This bug is mentioned here or here albeit for a older ubuntu flavor. I do not know if removing tracker-extract might have impacted how ros sources the setup.zsh file but I wanted to mentioned it nevertheless.

I am grateful for any hints or suggestions!

edit retag flag offensive close merge delete