Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libpointmatcher/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ set(POINTMATCHER_SRC
pointmatcher/TransformationsImpl.cpp
pointmatcher/TransformationCheckersImpl.cpp
pointmatcher/InspectorsImpl.cpp
pointmatcher/point_cloud_registration.cpp
pointmatcher/utils.cpp
pointmatcher/l_curve_optimization.cpp
#ErrorMinimizers
pointmatcher/ErrorMinimizers/PointToPlane.cpp
pointmatcher/ErrorMinimizers/PointToPlaneWithCov.cpp
Expand Down
20 changes: 20 additions & 0 deletions libpointmatcher/CatkinBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ endif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CATKIN_PACKAGE_DEPENDENCIES
libnabo
message_logger
qpmad
)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
Expand All @@ -20,6 +21,11 @@ find_package(catkin REQUIRED
${CATKIN_PACKAGE_DEPENDENCIES}
)
find_package(Eigen3 REQUIRED)
find_package(Ceres REQUIRED)
find_package(Sophus REQUIRED)
find_package(NLOPT REQUIRED)
find_package(BSplineInterpolation REQUIRED)
find_package(Splinter REQUIRED)

find_package(Boost REQUIRED COMPONENTS chrono date_time filesystem program_options system thread timer)

Expand All @@ -28,6 +34,10 @@ catkin_package(
INCLUDE_DIRS
${CMAKE_SOURCE_DIR}
${EIGEN3_INCLUDE_DIR}
${CERES_INCLUDE_DIRS}
${SOPHUS_INCLUDE_DIR}
${NLOPT_INCLUDE_DIRS}
${Splinter_INCLUDE_DIR}
LIBRARIES
yaml_cpp_pm
pointmatcher
Expand Down Expand Up @@ -75,9 +85,19 @@ target_include_directories(pointmatcher SYSTEM PRIVATE
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${yaml_cpp_pm_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${SOPHUS_INCLUDE_DIR}
${NLOPT_INCLUDE_DIRS}
${BSplineInterpolation_INCLUDE_DIRS}
${Splinter_INCLUDE_DIR}
)
target_link_libraries(pointmatcher
${catkin_LIBRARIES}
${CERES_LIBRARIES}
${SOPHUS_LIBRARIES}
${NLOPT_LIBRARIES}
${BSplineInterpolation_LIBRARIES}
${Splinter_LIBRARIES}
Boost::chrono
Boost::date_time
Boost::filesystem
Expand Down
48 changes: 48 additions & 0 deletions libpointmatcher/FindNLOPT.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright (c) 2011-2019, The DART development contributors
# All rights reserved.
#
# The list of contributors can be found at:
# https://github.com/dartsim/dart/blob/master/LICENSE
#
# This file is provided under the "BSD-style" License

# Find NLOPT
#
# This sets the following variables:
# NLOPT_FOUND
# NLOPT_INCLUDE_DIRS
# NLOPT_LIBRARIES
# NLOPT_DEFINITIONS
# NLOPT_VERSION
#
# and the following targets:
# NLOPT::nlopt

find_package(PkgConfig QUIET)

# Check to see if pkgconfig is installed.
pkg_check_modules(PC_NLOPT nlopt QUIET)

# Definitions
set(NLOPT_DEFINITIONS ${PC_NLOPT_CFLAGS_OTHER})

# Include directories
find_path(NLOPT_INCLUDE_DIRS
NAMES nlopt.h
HINTS ${PC_NLOPT_INCLUDEDIR}
PATHS "${CMAKE_INSTALL_PREFIX}/include")

# Libraries
find_library(NLOPT_LIBRARIES
NAMES nlopt nlopt_cxx
HINTS ${PC_NLOPT_LIBDIR})

# Version
set(NLOPT_VERSION ${PC_NLOPT_VERSION})

# Set (NAME)_FOUND if all the variables and the version are satisfied.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(NLOPT
FAIL_MESSAGE DEFAULT_MSG
REQUIRED_VARS NLOPT_INCLUDE_DIRS NLOPT_LIBRARIES
VERSION_VAR NLOPT_VERSION)
16 changes: 16 additions & 0 deletions libpointmatcher/FindSplinter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://github.com/bgrimstad/splinter
#
# Splinter_ROOT root search path
# Splinter_INCLUDE_DIR inlcude directories
# Splinter_LIBRARIES libraries
#


find_path(Splinter_INCLUDE_DIR NAMES data_table.h PATHS /usr/local/include/SPLINTER)

find_library(Splinter_LIBRARIES NAMES splinter-4-0 PATHS /usr/local/lib /usr/local/lib64)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Splinter DEFAULT_MSG
Splinter_INCLUDE_DIR Splinter_LIBRARIES)
mark_as_advanced(Splinter_INCLUDE_DIR Splinter_LIBRARIES)
2 changes: 2 additions & 0 deletions libpointmatcher/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
<build_depend>boost</build_depend>
<build_depend>libnabo</build_depend>
<build_depend>eigen</build_depend>
<build_depend>qpmad</build_depend>
<build_depend>message_logger</build_depend>

<run_depend>boost</run_depend>
<run_depend>libnabo</run_depend>
<run_depend>eigen</run_depend>
<run_depend>qpmad</run_depend>
<run_depend>message_logger</run_depend>

<test_depend>cmake_code_coverage</test_depend>
Expand Down
Loading