Hi Lars,
I'm also new to catkin, so here's what I usually do with plain CMake.
This is in a "rosbuild" package, but should work the same with catkin
(or even with any non-ROS CMake project):
My octomap source checkout (devel branch) lies at
~/code/octomap/octomap-git and I compiled the complete distribution (out
of source build, incl. octovis and dynamicEDT3d).
In your package, use the following lines to find OctoMap with CMake:
find_package(octomap 1.6 REQUIRED)
include_directories(${OCTOMAP_INCLUDE_DIRS})
# notice the missing link_directories for OctoMap >= 1.6
Then point CMake to the octomap config before compiling:
export octomap_DIR=~/code/octomap/octomap-git/lib/cmake/octomap/
and compile (make clean & clean CMakeCache before just to be sure).
octomap_DIR needs to be the directory that contains octomap-config.cmake
If you run into a linker error, then there's an old library file of
OctoMap picked up somewhere. This is fixed in versions >= 1.6 by using
complete paths in OCTOMAP_LIBRARIES instead of library names with
link_directories. Until then you could try overriding the path in
link_directories, hardcoding your paths into OCTOMAP_LIBRARIES, or
uninstalling the offending octomap debian package.
Best regards,
Armin
--
Armin Hornung
Humanoid Robots Lab, Albert-Ludwigs-Universit�t Freiburg
Contact:
http://www.informatik.uni-freiburg.de/~hornunga