Overlay octomap with devel branch (source) for ROS
I have been attempting to test the new OpenMP implementation for OctoMap (provided by Armin in this question: http://answers.ros.org/question/52127/octomap_server-performance-issues/ ) due to the requirements of the point cloud that I'm trying to use.
I downloaded the latest branch from https://github.com/OctoMap/octomap/tree/devel-openmp and then:
cd ../octomap-devel-openmp/octomap/
mkdir build && cd build
cmake ..
make
This completes with no problem, as does:
make test
My .bashrc file contains:
export LD_LIBRARY_PATH=/scratch/octomap-devel-openmp/lib:$LD_LIBRARY_PATH:/usr/local/lib
export ROS_PACKAGE_PATH=/scratch/octomap-devel-openmp:/scratch/src/octomap_mapping/octomap_server:$ROS_PACKAGE_PATH
Even still, octomap_server (which I have been editing in a non-standard location, hence the redirect) still finds the includes and libraries from the ros-fuerte-octomap install, which comes with ros-fuerte-octomap-ros which is a dependency of octomap_server.
I assume that I'm missing something with installing the octomap source from a development branch, but I can't work out what it is.
*EDIT1: Finally got back to trying to get octomap_server to build with the OpenMP development branch.
My CMakeLists.txt file is:
15 #find_package(octomap 1.5)
16 include(/scratch/octomap-devel-openmp/octomap/lib/cmake/octomap/octomap-config.cmake)
17 include_directories(BEFORE /scratch/octomap-devel-openmp/octomap/include/octomap)
18 link_directories(/scratch/octomap-devel-openmp/octomap/lib)
19 link_libraries(octomap_server /scratch/octomap-devel-openmp/octomap/lib/liboctomath.so /scratch/octomap-devel-openmp/octomap/lib/liboctomap.so)
20
21 #find_package(octomap REQUIRED)
22 #include_directories(${OCTOMAP_INCLUDE_DIRS})
23 #link_directories(${OCTOMAP_LIBRARY_DIRS})
24 #link_libraries(${PROJECT_NAME} ${OCTOMAP_LIBRARIES})
Doing a make clean
and then a make -d
in the /build directory gives the error:
Considering target file `/scratch/octomap-devel-openmp/octomap/lib/liboctomap.so'.
Looking for an implicit rule for `/scratch/octomap-devel-openmp/octomap/lib/liboctomap.so'.
Trying pattern rule with stem `liboctomap.so'.
Trying implicit prerequisite `/scratch/octomap-devel-openmp/octomap/lib/liboctomap.so,v'.
Trying pattern rule with stem `liboctomap.so'.
Trying implicit prerequisite `/scratch/octomap-devel-openmp/octomap/lib/RCS/liboctomap.so,v'.
Trying pattern rule with stem `liboctomap.so'.
Trying implicit prerequisite `/scratch/octomap-devel-openmp/octomap/lib/RCS/liboctomap.so'.
Trying pattern rule with stem `liboctomap.so'.
Trying implicit prerequisite `/scratch/octomap-devel-openmp/octomap/lib/s.liboctomap.so'.
Trying pattern rule with stem `liboctomap.so'.
Trying implicit prerequisite `/scratch/octomap-devel-openmp/octomap/lib/SCCS/s.liboctomap.so'.
No implicit rule found for `/scratch/octomap-devel-openmp/octomap/lib/liboctomap.so'.
Finished prerequisites of target file `/scratch/octomap-devel-openmp/octomap/lib/liboctomap.so'.
Pruning file `/scratch/octomap-devel-openmp/octomap/lib/liboctomap.so'.
Pruning file `CMakeFiles/octomap_saver.dir/build.make'.
Finished prerequisites of target file `../bin/octomap_saver'.
Must remake target `../bin/octomap_saver'.
Putting child 0x00a4b990 (../bin/octomap_saver) PID 19787 on the chain.
Live child 0x00a4b990 (../bin/octomap_saver) PID 19787
Linking CXX executable ../bin/octomap_saver
Reaping winning child 0x00a4b990 PID 19787
Live child 0x00a4b990 (../bin/octomap_saver) PID 19789
CMakeFiles/octomap_saver.dir/src/octomap_saver.o: In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::length() const':
/usr/include/c++/4.6/bits/basic_string.h:717: undefined reference to `octomap::AbstractOcTree::binaryFileHeader'
CMakeFiles/octomap_saver.dir/src/octomap_saver.o: In function `octomap::OccupancyOcTreeBase<octomap::OcTreeNode>::readBinary(std::basic_istream<char, std::char_traits<char> >&)':
/opt/ros/fuerte/include/octomap ...