what are environment hooks in catkin
I've been trying to understand what the setup.sh file does and how it changes my shell environment such that catkin builds correctly.
Simply to describe my motivation for understanding, there are times when I get into a dirty build state (genjava and rosjava freaking out about something), and I have to blow away build, devel directories, and maven repos and build from scratch. However if I naively call catkin_make
, rosjava
and genjava
start breaking all over the place because I no longer have a setup.bash
file to source other than the ros/indigo/setup.bash
. So I end up in this weird place where my first build command has to be ROS_PACKAGE_PATH=/path/to/src:$ROS_PACKAGE_PATH catkin_make
. Then I can source the proper setup.bash
file, call catkin_make
, and everything builds fine again.
I'd like to understand more about the env hooks because my hope is I can just prefix catkin_make
with all the env variables to get an arbitrary set of troubled packages (i.e. rosjava and genjava) happy and have a single command to solve my problems.
Have you seen https://catkin-tools.readthedocs.io/e... It does describe what an environment hook is, but it doesn't go into the technical mechanism which makes them work.
I could only find mention of "env hooks" in the Quickstart and Workspace Mechanisms sections. They don't really describe what an "env hooks" are, just their existence and somehow helping define packages in a workspace.