Overlaying a package with "cmake" build type
Edit: I think the final answer to this question was basically, "This is expected. Don't worry about it."
I want to overlay the ompl package, which is a cmake-only build: <buildtool_depend>cmake</buildtool_depend>
. I follow the steps according to the workspace overlaying tutorial:
$ mkdir -p ~/ompl-ws/src && cd ~/ompl-ws/src
$ catkin_init_workspace
$ git clone git@github.com:ros-gbp/ompl-release.git ompl
$ cd ..
$ catkin_make_isolated # "isolated" is needed for cmake-only builds.
$ source devel_isolated/setup.zsh # I use zsh.
$ rospack find ompl
/opt/ros/hydro/share/ompl
At this point, I would expect rospack find ompl
to return ~/ompl-ws/src/ompl
, but it does not. That's because the ROS_PACKAGE_PATH
hasn't been updated. In fact, here's the setup file (devel_isolated/ompl/setup.sh
):
#!/usr/bin/env sh
# generated from catkin.builder module
# remember type of shell if not already set
if [ -z "$CATKIN_SHELL" ]; then
CATKIN_SHELL=sh
fi
# detect if running on Darwin platform
_UNAME=`uname -s`
IS_DARWIN=0
if [ "$_UNAME" = "Darwin" ]; then
IS_DARWIN=1
fi
# Prepend to the environment
export CMAKE_PREFIX_PATH="/home/ntraft/Development/ompl-ws/devel_isolated/ompl:$CMAKE_PREFIX_PATH"
if [ $IS_DARWIN -eq 0 ]; then
export LD_LIBRARY_PATH="/home/ntraft/Development/ompl-ws/devel_isolated/ompl/lib:$LD_LIBRARY_PATH"
else
export DYLD_LIBRARY_PATH="/home/ntraft/Development/ompl-ws/devel_isolated/ompl/lib:$DYLD_LIBRARY_PATH"
fi
export PATH="/home/ntraft/Development/ompl-ws/devel_isolated/ompl/bin:$PATH"
export PKG_CONFIG_PATH="/home/ntraft/Development/ompl-ws/devel_isolated/ompl/lib/pkgconfig:$PKG_CONFIG_PATH"
export PYTHONPATH="/home/ntraft/Development/ompl-ws/devel_isolated/ompl/lib/python2.7/dist-packages:$PYTHONPATH"
This is very different from the normal setup file! Even when I put a normal setup file in there, it still doesn't work, because it's not a catkin build (it doesn't have a .catkin
file, which is what _setup_util.py
looks for). If I use workspace chaining to build something else that depends on ompl, it does use the overlayed version, but it makes me nervous because it doesn't say it's using the overlaid version, and rospack find
still points to the system version:
# It says:
-- This workspace overlays: /opt/ros/hydro
# It SHOULD say:
-- This workspace overlays: /home/<user>/ompl-ws/devel_isolated;/opt/ros/hydro
Is this normal?? What's the correct way to overlay a cmake-only package?