forked from OctoMap/octomap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
3,271 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) | ||
PROJECT(dynamicEDT3D) | ||
|
||
ENABLE_TESTING() | ||
|
||
# version (e.g. for packaging) | ||
set(DYNAMICEDT3D_MAJOR_VERSION 1) | ||
set(DYNAMICEDT3D_MINOR_VERSION 5) | ||
set(DYNAMICEDT3D_PATCH_VERSION 0) | ||
set(DYNAMICEDT3D_VERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION}.${DYNAMICEDT3D_PATCH_VERSION}) | ||
|
||
if(COMMAND cmake_policy) | ||
cmake_policy(SET CMP0003 NEW) | ||
endif(COMMAND cmake_policy) | ||
|
||
SET (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules") | ||
|
||
# COMPILER SETTINGS (default: Release) and flags | ||
INCLUDE(CompilerSettings) | ||
|
||
# Set output directories for libraries and executables | ||
SET( BASE_DIR ${CMAKE_SOURCE_DIR} ) | ||
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BASE_DIR}/lib ) | ||
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${BASE_DIR}/lib ) | ||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BASE_DIR}/bin ) | ||
|
||
set(INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include") | ||
INCLUDE_DIRECTORIES(${INCLUDE_DIRS}) | ||
|
||
LINK_DIRECTORIES(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) | ||
|
||
# Installation | ||
|
||
set(INSTALL_TARGETS_DEFAULT_ARGS | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib | ||
) | ||
|
||
find_package(octomap REQUIRED | ||
HINTS ${CMAKE_SOURCE_DIR}/lib/cmake/octomap | ||
${CMAKE_SOURCE_DIR}/../octomap/lib/cmake/octomap | ||
) | ||
INCLUDE_DIRECTORIES(${OCTOMAP_INCLUDE_DIRS}) | ||
LINK_DIRECTORIES(${OCTOMAP_LIBRARY_DIRS}) | ||
|
||
# COMPILER FLAGS | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x") | ||
set(CMAKE_CXX_FLAGS_RELEASE "-O2") | ||
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ggdb") | ||
|
||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) | ||
|
||
ADD_SUBDIRECTORY(src) | ||
|
||
|
||
|
||
|
||
file(GLOB dynamicEDT3D_HDRS ${PROJECT_SOURCE_DIR}/include/dynamicEDT3D/*.h ${PROJECT_SOURCE_DIR}/include/dynamicEDT3D/*.hxx) | ||
install(FILES ${dynamicEDT3D_HDRS} DESTINATION include/dynamicEDT3D) | ||
|
||
#TODO: this conflicts with the octomap uninstall | ||
#it is not only a target name problem, also both will use the same manifest file | ||
#in the same binary directory | ||
#configure_file( | ||
# "${PROJECT_SOURCE_DIR}/CMakeModules/CMakeUninstall.cmake.in" | ||
# "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" | ||
# IMMEDIATE @ONLY) | ||
# | ||
#add_custom_target(uninstall | ||
# COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) | ||
|
||
|
||
# Export the package for use from the build-tree | ||
# (this registers the build-tree with a global CMake-registry) | ||
export(PACKAGE dynamicEDT3D) | ||
|
||
# Create a dynamicEDT3DConfig.cmake file for the use from the build tree | ||
set(DYNAMICEDT3D_INCLUDE_DIRS "${INCLUDE_DIRS}") | ||
set(DYNAMICEDT3D_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") | ||
# not used right now (export depends?) | ||
#set(DYNEDT3D_CMAKE_DIR "${PROJECT_BINARY_DIR}") | ||
configure_file(dynamicEDT3DConfig.cmake.in | ||
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDt3D/dynamicEDT3DConfig.cmake" @ONLY) | ||
configure_file(dynamicEDT3DConfig-version.cmake.in | ||
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D/dynamicEDT3DConfig-version.cmake" @ONLY) | ||
|
||
# Install the export set for use with the install-tree | ||
#install(EXPORT FooBarLibraryDepends DESTINATION | ||
# "${INSTALL_DATA_DIR}/FooBar/CMake" | ||
# COMPONENT dev) | ||
|
||
# Create a dynamicEDT3DConfig.cmake file for the use from the install tree | ||
# and install it | ||
set(DYNAMICEDT3D_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include") | ||
set(DYNAMICEDT3D_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") | ||
#set(DYNAMICEDT3D_CMAKE_DIR "${INSTALL_DATA_DIR}/FooBar/CMake") | ||
configure_file(dynamicEDT3DConfig.cmake.in | ||
"${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig.cmake" @ONLY) | ||
configure_file(dynamicEDT3DConfig-version.cmake.in | ||
"${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake" @ONLY) | ||
install(FILES | ||
"${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig.cmake" | ||
"${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake" | ||
DESTINATION lib/cmake/dynamicEDT3D/) | ||
|
||
# Write pkgconfig-file: | ||
include(InstallPkgConfigFile) | ||
install_pkg_config_file(dynamicEDT3D | ||
CFLAGS | ||
LIBS -ldynamicEDT3D | ||
REQUIRES | ||
VERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION}.${DYNAMICEDT3D_PATCH_VERSION}) | ||
|
||
|
||
# Documentation | ||
FIND_PACKAGE(Doxygen) | ||
IF(DOXYGEN_FOUND) | ||
ADD_CUSTOM_TARGET(docs_dynamicEDT3D ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dynamicEDT3D.dox | ||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} | ||
COMMENT "Generating documentation (Doxygen)...") | ||
ENDIF(DOXYGEN_FOUND) | ||
|
||
# Needs to be last statement: | ||
INCLUDE(CPackSettings) | ||
|
||
# Finished: | ||
MESSAGE ("\n") | ||
MESSAGE (STATUS "Compile dynamicEDT3D using: make") | ||
MESSAGE (STATUS "Install dynamicEDT3D using: make install") | ||
MESSAGE (STATUS " (be sure to set the correct CMAKE_INSTALL_PREFIX before)") | ||
MESSAGE (STATUS "Compile API-documentation using: make docs_dynamicEDT3D\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | ||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") | ||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | ||
|
||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) | ||
string(REGEX REPLACE "\n" ";" files "${files}") | ||
list(REVERSE files) | ||
foreach (file ${files}) | ||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") | ||
if (EXISTS "$ENV{DESTDIR}${file}") | ||
execute_process( | ||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" | ||
OUTPUT_VARIABLE rm_out | ||
RESULT_VARIABLE rm_retval | ||
) | ||
if(NOT ${rm_retval} EQUAL 0) | ||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") | ||
endif (NOT ${rm_retval} EQUAL 0) | ||
else (EXISTS "$ENV{DESTDIR}${file}") | ||
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") | ||
endif (EXISTS "$ENV{DESTDIR}${file}") | ||
endforeach(file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Package building stuff - Experimental! | ||
SET(CPACK_PACKAGE_VERSION "${OCTOMAP_VERSION}") | ||
SET(CPACK_PACKAGE_VERSION_MAJOR "${OCTOMAP_MAJOR_VERSION}") | ||
SET(CPACK_PACKAGE_VERSION_MINOR "${OCTOMAP_MINOR_VERSION}") | ||
SET(CPACK_PACKAGE_VERSION_PATCH "${OCTOMAP_PATCH_VERSION}") | ||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${V_MAJOR}.${V_MINOR}") | ||
SET(CPACK_PACKAGE_CONTACT "K.M. Wurm and A. Hornung") | ||
SET(CPACK_PACKAGE_VENDOR "University of Freiburg") | ||
SET(CPACK_GENERATOR "DEB") | ||
SET(CPACK_SOURCE_GENERATOR "TGZ") | ||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME | ||
"${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") | ||
|
||
# This must always be last statement! | ||
INCLUDE(CPack) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# COMPILER SETTINGS (default: Release) | ||
# use "-DCMAKE_BUILD_TYPE=Debug" in cmake for a Debug-build | ||
IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) | ||
SET(CMAKE_BUILD_TYPE Release) | ||
ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) | ||
|
||
MESSAGE ("\n") | ||
MESSAGE (STATUS "${PROJECT_NAME} building as ${CMAKE_BUILD_TYPE}") | ||
|
||
# OCTOMAP_OMP = enable OpenMP | ||
# SET(OCTOMAP_OMP 1 CACHE BOOL "Enable/disable OpenMP") | ||
# IF($ENV{OCTOMAP_OMP}) | ||
# SET(OCTOMAP_OMP $ENV{OCTOMAP_OMP}) | ||
# MESSAGE(STATUS "Found OCTOMAP_OMP=${OCTOMAP_OMP}") | ||
# ENDIF($ENV{OCTOMAP_OMP}) | ||
|
||
# COMPILER FLAGS | ||
IF (CMAKE_COMPILER_IS_GNUCC) | ||
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-error ") | ||
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-error ") | ||
SET (CMAKE_CXX_FLAGS_RELEASE "-O3 -funroll-loops -DNDEBUG") | ||
SET (CMAKE_CXX_FLAGS_DEBUG "-O0 -g") | ||
# Shared object compilation under 64bit (vtable) | ||
ADD_DEFINITIONS(-fPIC) | ||
# IF(OCTOMAP_OMP) | ||
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp") | ||
# SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -fopenmp") | ||
# ENDIF(OCTOMAP_OMP) | ||
ENDIF() | ||
|
||
|
||
# Set full rpath http://www.paraview.org/Wiki/CMake_RPATH_handling | ||
# (good to have and required with ROS) | ||
set(CMAKE_SKIP_BUILD_RPATH FALSE) | ||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) | ||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") | ||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) | ||
|
||
# no prefix needed for python modules | ||
set(CMAKE_SHARED_MODULE_PREFIX "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# A Macro to simplify creating a pkg-config file | ||
|
||
# install_pkg_config_file(<package-name> | ||
# [VERSION <version>] | ||
# [DESCRIPTION <description>] | ||
# [CFLAGS <cflag> ...] | ||
# [LIBS <lflag> ...] | ||
# [REQUIRES <required-package-name> ...]) | ||
# | ||
# Create and install a pkg-config .pc file to CMAKE_INSTALL_PREFIX/lib/pkgconfig | ||
# assuming the following install layout: | ||
# libraries: CMAKE_INSTALL_PREFIX/lib | ||
# headers : CMAKE_INSTALL_PREFIX/include | ||
# | ||
# example: | ||
# add_library(mylib mylib.c) | ||
# install_pkg_config_file(mylib | ||
# DESCRIPTION My Library | ||
# CFLAGS | ||
# LIBS -lmylib | ||
# REQUIRES glib-2.0 lcm | ||
# VERSION 0.0.1) | ||
# | ||
# | ||
function(install_pkg_config_file) | ||
list(GET ARGV 0 pc_name) | ||
# TODO error check | ||
|
||
set(pc_version 0.0.1) | ||
set(pc_description ${pc_name}) | ||
set(pc_requires "") | ||
set(pc_libs "") | ||
set(pc_cflags "") | ||
set(pc_fname "${CMAKE_BINARY_DIR}/lib/pkgconfig/${pc_name}.pc") | ||
|
||
set(modewords LIBS CFLAGS REQUIRES VERSION DESCRIPTION) | ||
set(curmode "") | ||
|
||
# parse function arguments and populate pkg-config parameters | ||
list(REMOVE_AT ARGV 0) | ||
foreach(word ${ARGV}) | ||
list(FIND modewords ${word} mode_index) | ||
if(${mode_index} GREATER -1) | ||
set(curmode ${word}) | ||
elseif(curmode STREQUAL LIBS) | ||
set(pc_libs "${pc_libs} ${word}") | ||
elseif(curmode STREQUAL CFLAGS) | ||
set(pc_cflags "${pc_cflags} ${word}") | ||
elseif(curmode STREQUAL REQUIRES) | ||
set(pc_requires "${pc_requires} ${word}") | ||
elseif(curmode STREQUAL VERSION) | ||
set(pc_version ${word}) | ||
set(curmode "") | ||
elseif(curmode STREQUAL DESCRIPTION) | ||
set(pc_description "${word}") | ||
set(curmode "") | ||
else(${mode_index} GREATER -1) | ||
message("WARNING incorrect use of install_pkg_config_file (${word})") | ||
break() | ||
endif(${mode_index} GREATER -1) | ||
endforeach(word) | ||
|
||
# write the .pc file out | ||
file(WRITE ${pc_fname} | ||
"prefix=${CMAKE_INSTALL_PREFIX}\n" | ||
"libdir=\${prefix}/lib\n" | ||
"includedir=\${prefix}/include\n" | ||
"\n" | ||
"Name: ${pc_name}\n" | ||
"Description: ${pc_description}\n" | ||
"Requires: ${pc_requires}\n" | ||
"Version: ${pc_version}\n" | ||
"Libs: -L\${libdir} ${pc_libs}\n" | ||
"Cflags: -I\${includedir} ${pc_cflags}\n") | ||
|
||
# mark the .pc file for installation to the lib/pkgconfig directory | ||
install(FILES ${pc_fname} DESTINATION lib/pkgconfig) | ||
endfunction(install_pkg_config_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
dynamicEDT3D: | ||
A library for incrementally updatable Euclidean distance transforms in 3D. | ||
|
||
License for the "dynamicEDT3D" library: New BSD License. | ||
|
||
Copyright (c) 2011-2012, C. Sprunk, B. Lau, W. Burgard, University of Freiburg | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of the University of Freiburg nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
/** | ||
* \namespace dynamicEDT3D Namespace of the dynamicEDT3D library | ||
* | ||
*/ | ||
|
||
|
||
/** \mainpage dynamicEDT3D | ||
\section intro_sec Introduction | ||
The <a href="http://octomap.sourceforge.net/">dynamicEDT3D library</a> implements an inrementally updatable Euclidean distance transform (EDT) in 3D. It comes with a wrapper to use the OctoMap 3D representation and hooks into the change detection of the OctoMap library to propagate changes to the EDT. | ||
\section install_sec Installation | ||
<p>See the file README.txt in the main folder. | ||
</p> | ||
\section gettingstarted_sec Getting Started | ||
<p>There are two example programs in the src/examples directory that show the basic functionality of the library.</p> | ||
\section changelog_sec Changelog | ||
<p>See the file CHANGELOG.txt in the main folder or the <a href="http://octomap.svn.sourceforge.net/viewvc/octomap/trunk/dynamicEDT3D/CHANGELOG.txt">latest version online</a> | ||
</p> | ||
\section using_sec Using dynamicEDT3D? | ||
<p> Please let us know if you are using dynamicEDT3D, as we are curious to find out how it enables other people's work or research. Additionally, please cite our paper if you use dynamicEDT3D in your research: </p> | ||
<p>B. Lau, C. Sprunk, and W. Burgard, | ||
<strong>"Efficient Grid-based Spatial Representations for Robot Navigation in Dynamic Environments"</strong> in | ||
<em>Robotics and Autonomous Systems</em>, 2012. Accepted for publication. | ||
Software available at <a href="http://octomap.sf.net/">http://octomap.sf.net/</a>. | ||
</p> | ||
<p>BibTeX:</p> | ||
<pre>@@article{lau12ras, | ||
author = {Boris Lau and Christoph Sprunk and Wolfram Burgard}, | ||
title = {Efficient Grid-based Spatial Representations for Robot Navigation in Dynamic Environments}, | ||
journal = {Robotics and Autonomous Systems (RAS)}, | ||
year = {2012}, | ||
url = {http://octomap.sf.net/}, | ||
note = {Accepted for publication. Software available at \url{http://octomap.sf.net/}} | ||
}</pre> | ||
**/ | ||
|
||
|
||
|
||
|
Oops, something went wrong.