-
Notifications
You must be signed in to change notification settings - Fork 33
/
CMakeLists.txt
340 lines (320 loc) · 13.5 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
#
# Copyright (c) 2010, 2011, 2020 CNRS Authors: Florent Lamiraux, Joseph Mirabel,
# Guilhem Saurel
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 1. 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.
#
# 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 HOLDER 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.
cmake_minimum_required(VERSION 3.10)
set(CXX_DISABLE_WERROR TRUE)
set(DOXYGEN_USE_MATHJAX YES)
set(DOXYGEN_USE_TEMPLATE_CSS TRUE)
set(PROJECT_USE_CMAKE_EXPORT TRUE)
set(PROJECT_NAME hpp-core)
set(PROJECT_DESCRIPTION
"Implement basic classes for canonical path planning for kinematic chains.")
# Check if the submodule cmake have been initialized
set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
if(EXISTS "${JRL_CMAKE_MODULES}/base.cmake")
message(STATUS "JRL cmakemodules found in 'cmake/' git submodule")
else()
find_package(jrl-cmakemodules QUIET CONFIG)
if(jrl-cmakemodules_FOUND)
get_property(
JRL_CMAKE_MODULES
TARGET jrl-cmakemodules::jrl-cmakemodules
PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}")
elseif(${CMAKE_VERSION} VERSION_LESS "3.14.0")
message(
FATAL_ERROR
"\nCan't find jrl-cmakemodules. Please either:\n"
" - use git submodule: 'git submodule update --init'\n"
" - or install https://github.com/jrl-umi3218/jrl-cmakemodules\n"
" - or upgrade your CMake version to >= 3.14 to allow automatic fetching\n"
)
else()
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
include(FetchContent)
FetchContent_Declare(
"jrl-cmakemodules"
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git")
FetchContent_MakeAvailable("jrl-cmakemodules")
FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
endif()
endif()
include("${JRL_CMAKE_MODULES}/hpp.cmake")
include("${JRL_CMAKE_MODULES}/boost.cmake")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake-modules/ ${CMAKE_MODULE_PATH})
compute_project_args(PROJECT_ARGS LANGUAGES CXX)
project(${PROJECT_NAME} ${PROJECT_ARGS})
find_package(Boost REQUIRED COMPONENTS unit_test_framework)
add_project_dependency(hpp-constraints REQUIRED)
add_project_dependency(hpp-pinocchio REQUIRED)
add_project_dependency(hpp-statistics REQUIRED)
add_project_dependency(hpp-util REQUIRED)
add_project_dependency(proxsuite REQUIRED)
# Declare Headers
set(${PROJECT_NAME}_HEADERS
include/hpp/core/bi-rrt-planner.hh
include/hpp/core/collision-pair.hh
include/hpp/core/collision-path-validation-report.hh
include/hpp/core/collision-validation.hh
include/hpp/core/relative-motion.hh
include/hpp/core/collision-validation-report.hh
include/hpp/core/projection-error.hh
include/hpp/core/configuration-shooter.hh
include/hpp/core/configuration-shooter/uniform.hh
include/hpp/core/configuration-shooter/uniform-tpl.hh
include/hpp/core/configuration-shooter/uniform-tpl.hxx
include/hpp/core/configuration-shooter/gaussian.hh
include/hpp/core/config-projector.hh
include/hpp/core/config-validation.hh
include/hpp/core/config-validations.hh
include/hpp/core/connected-component.hh
include/hpp/core/constraint.hh
include/hpp/core/constraint-set.hh
include/hpp/core/container.hh
include/hpp/core/continuous-validation.hh
include/hpp/core/continuous-validation/dichotomy.hh
include/hpp/core/continuous-validation/progressive.hh
include/hpp/core/continuous-validation/interval-validation.hh
include/hpp/core/continuous-validation/body-pair-collision.hh
include/hpp/core/continuous-validation/solid-solid-collision.hh
include/hpp/core/diffusing-planner.hh
include/hpp/core/distance/reeds-shepp.hh
include/hpp/core/distance.hh
include/hpp/core/distance-between-objects.hh
include/hpp/core/dubins-path.hh
include/hpp/core/edge.hh
include/hpp/core/fwd.hh
include/hpp/core/joint-bound-validation.hh
include/hpp/core/obstacle-user.hh
include/hpp/core/path-validations.hh
include/hpp/core/path-validation/discretized.hh
include/hpp/core/path-validation/discretized-collision-checking.hh
include/hpp/core/path-validation/discretized-joint-bound.hh
include/hpp/core/node.hh
include/hpp/core/parameter.hh
include/hpp/core/path.hh
include/hpp/core/path-optimization/linear-constraint.hh
include/hpp/core/path-optimization/partial-shortcut.hh
include/hpp/core/path-optimization/quadratic-program.hh
include/hpp/core/path-optimization/random-shortcut.hh
include/hpp/core/path-optimization/rs-time-parameterization.hh
include/hpp/core/path-optimization/simple-shortcut.hh
include/hpp/core/path-optimization/simple-time-parameterization.hh
include/hpp/core/path-optimization/spline-gradient-based.hh
include/hpp/core/path-optimization/spline-gradient-based-abstract.hh
include/hpp/core/path-optimizer.hh
include/hpp/core/path-planner.hh
include/hpp/core/path-planning-failed.hh
include/hpp/core/path-planner/k-prm-star.hh
include/hpp/core/path-planner/bi-rrt-star.hh
include/hpp/core/path-validation.hh
include/hpp/core/path-validation-report.hh
include/hpp/core/path-vector.hh
include/hpp/core/path/spline.hh
include/hpp/core/path/hermite.hh
include/hpp/core/path/math.hh
include/hpp/core/kinodynamic-path.hh
include/hpp/core/kinodynamic-oriented-path.hh
include/hpp/core/plan-and-optimize.hh
include/hpp/core/plugin.hh
include/hpp/core/problem.hh
include/hpp/core/problem-solver.hh
include/hpp/core/roadmap.hh
include/hpp/core/steering-method.hh
include/hpp/core/steering-method/fwd.hh
include/hpp/core/steering-method/straight.hh
include/hpp/core/steering-method/car-like.hh
include/hpp/core/steering-method/constant-curvature.hh
include/hpp/core/steering-method/dubins.hh
include/hpp/core/steering-method/hermite.hh
include/hpp/core/steering-method/reeds-shepp.hh
include/hpp/core/steering-method/spline.hh
include/hpp/core/steering-method/snibud.hh
include/hpp/core/steering-method/reeds-shepp.hh
include/hpp/core/steering-method/steering-kinodynamic.hh
include/hpp/core/straight-path.hh
include/hpp/core/interpolated-path.hh
include/hpp/core/validation-report.hh
include/hpp/core/visibility-prm-planner.hh
include/hpp/core/weighed-distance.hh
include/hpp/core/kinodynamic-distance.hh
include/hpp/core/path-projector/progressive.hh
include/hpp/core/path-projector/dichotomy.hh
include/hpp/core/path-projector/global.hh
include/hpp/core/path-projector/recursive-hermite.hh
include/hpp/core/path-projector.hh
include/hpp/core/nearest-neighbor.hh
include/hpp/core/parser/roadmap.hh
include/hpp/core/problem-target.hh
include/hpp/core/problem-target/goal-configurations.hh
include/hpp/core/problem-target/task-target.hh
include/hpp/core/subchain-path.hh
include/hpp/core/time-parameterization.hh
include/hpp/core/time-parameterization/piecewise-polynomial.hh
include/hpp/core/time-parameterization/polynomial.hh)
set(${PROJECT_NAME}_SOURCES
src/astar.hh
src/bi-rrt-planner.cc
src/collision-validation.cc
src/configuration-shooter/uniform.cc
src/configuration-shooter/uniform-tpl.cc
src/configuration-shooter/gaussian.cc
src/config-projector.cc
src/config-validations.cc
src/connected-component.cc
src/constraint.cc
src/constraint-set.cc
src/continuous-validation.cc
src/continuous-validation/body-pair-collision.cc
src/continuous-validation/dichotomy.cc
src/continuous-validation/solid-solid-collision.cc
src/continuous-validation/progressive.cc
src/diffusing-planner.cc
src/distance/serialization.cc
src/distance/reeds-shepp.cc
src/distance-between-objects.cc
src/dubins.hh
src/dubins.cc
src/dubins-path.cc
src/extracted-path.hh
src/extracted-path.cc
src/interpolated-path.cc
src/joint-bound-validation.cc
src/obstacle-user.cc
src/path-validations.cc
src/path-validation/discretized.cc
src/path-validation/discretized-collision-checking.cc
src/path-validation/discretized-joint-bound.cc
src/path-validation/no-validation.hh
src/nearest-neighbor/basic.hh #
src/nearest-neighbor/basic.cc #
# src/nearest-neighbor/k-d-tree.cc # src/nearest-neighbor/k-d-tree.hh #
src/nearest-neighbor/serialization.cc #
src/node.cc #
src/parameter.cc #
src/path.cc #
src/path-optimizer.cc #
src/path-optimization/linear-constraint.cc #
src/path-optimization/spline-gradient-based-abstract.cc #
src/path-optimization/partial-shortcut.cc #
src/path-optimization/random-shortcut.cc
src/path-optimization/reeds-shepp/piecewise-quadratic.cc
src/path-optimization/reeds-shepp/piecewise-quadratic.hh
src/path-optimization/rs-time-parameterization.cc
src/path-optimization/simple-shortcut.cc
src/path-optimization/simple-time-parameterization.cc #
src/path-planner.cc #
src/path-planner/k-prm-star.cc
src/path-planner/bi-rrt-star.cc
src/path-vector.cc #
src/path/spline.cc
src/path/hermite.cc
src/plan-and-optimize.cc #
src/plugin.cc # TODO : addObstacle
src/problem.cc # TODO : addObstacle
src/problem-solver.cc # TODO : addObstacle
src/path-projector.cc
src/path-projector/dichotomy.cc #
src/path-projector/global.cc #
src/path-projector/progressive.cc #
src/path-projector/recursive-hermite.cc
src/path-projector.cc #
src/path-validation.cc
src/problem-target/goal-configurations.cc #
src/problem-target/task-target.cc #
src/reeds-shepp-path.cc
src/relative-motion.cc
src/kinodynamic-path.cc
src/kinodynamic-oriented-path.cc
src/serialization.cc
src/steering-method/steering-kinodynamic.cc
src/roadmap.cc
src/steering-method/reeds-shepp.cc # TODO access type of joint
src/steering-method/car-like.cc
src/steering-method/constant-curvature.cc
src/steering-method/dubins.cc
src/steering-method/snibud.cc
src/steering-method/spline.cc
src/steering-method/straight.cc
src/straight-path.cc
src/interpolated-path.cc
src/visibility-prm-planner.cc
src/weighed-distance.cc
src/kinodynamic-distance.cc
src/path-projector/progressive.cc
src/path-projector/dichotomy.cc
src/path-projector/global.cc
src/path-projector.cc
src/problem-target/goal-configurations.cc
src/problem-target/task-target.cc)
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
target_include_directories(${PROJECT_NAME} PRIVATE src)
target_include_directories(
${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_link_libraries(
${PROJECT_NAME} ${CMAKE_DL_LIBS} hpp-util::hpp-util pinocchio::pinocchio
hpp-statistics::hpp-statistics hpp-constraints::hpp-constraints)
install(
TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION lib)
# GPL licenced part
set(${PROJECT_NAME}_HEADERS_GPL
src/path-optimization/spline-gradient-based/eiquadprog_2011.hpp)
set(${PROJECT_NAME}_HEADERS_GPL src/path-optimization/quadratic-program.cc
src/path-optimization/spline-gradient-based.cc)
add_library(${PROJECT_NAME}-gpl SHARED ${${PROJECT_NAME}_SOURCES_GPL}
${${PROJECT_NAME}_HEADERS_GPL})
target_include_directories(${PROJECT_NAME}-gpl PRIVATE src)
target_link_libraries(${PROJECT_NAME}-gpl ${PROJECT_NAME})
install(
TARGETS ${PROJECT_NAME}-gpl
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION lib)
add_subdirectory(plugins)
if(BUILD_TESTING)
find_package(Boost REQUIRED COMPONENTS unit_test_framework)
find_package(example-robot-data REQUIRED)
find_package(hpp-environments REQUIRED)
add_subdirectory(tests)
endif()
# Add dependency toward hpp-core library in pkg-config file.
pkg_config_append_libs("hpp-core")
if(INSTALL_DOCUMENTATION)
install(
FILES doc/continuous-validation.pdf
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}/doxygen-html)
endif(INSTALL_DOCUMENTATION)
set(HPP_CORE_CMAKE_PLUGIN
"${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}/${PROJECT_NAME}-plugin.cmake"
)
set(PKG_CONFIG_EXTRA
"${PKG_CONFIG_EXTRA}\ncmake_plugin=${HPP_CORE_CMAKE_PLUGIN}")
set(PACKAGE_EXTRA_MACROS "set(HPP_CORE_CMAKE_PLUGIN ${HPP_CORE_CMAKE_PLUGIN})")
install(
FILES cmake-modules/hpp-core-plugin.cmake
DESTINATION lib/cmake/${PROJECT_NAME}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE)
install(FILES package.xml DESTINATION share/${PROJECT_NAME})