-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
301 lines (273 loc) · 6.36 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
cmake_minimum_required(VERSION 2.8.3)
project(mixmcl)
add_compile_options(-std=c++11)
find_package(catkin REQUIRED
COMPONENTS
message_filters
rosbag
roscpp
std_srvs
tf
tf2
tf2_ros
dynamic_reconfigure
nav_msgs
std_msgs
stamped_std_msgs
amcl_modified
random_numbers
)
find_package(Boost REQUIRED python)
INCLUDE(FindPkgConfig)
pkg_check_modules(nuklei REQUIRED nuklei)
pkg_check_modules(flann REQUIRED flann)
# dynamic reconfigure
generate_dynamic_reconfigure_options(
cfg/MIXMCL.cfg
cfg/MCMCL.cfg
)
catkin_package(
CATKIN_DEPENDS
rosbag
roscpp
dynamic_reconfigure
tf
nav_msgs
std_srvs
INCLUDE_DIRS include
LIBRARIES mcl dualmcl_tool mixmcl_node amcl_node mcmcl_node markov_node aismcl_node
)
##include dirrectories##
include_directories(
include src
)
include_directories(
${catkin_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}/python2.7
${nuklei_INCLUDE_DIRS}
${amcl_modified_INCLUDE_DIRS}
${flann_INCLUDE_DIRS}
)
#message(STATUS "amcl_modified_INCLUDE_DIRS is ${amcl_modified_INCLUDE_DIRS}")
message(STATUS "Boost_INCLUDE_DIRS is ${Boost_INCLUDE_DIRS}")
##Build libraries##
add_library(hello_ext
src/boost_python.cpp
)
target_link_libraries(hello_ext
${Boost_LIBRARIES}
)
add_library(mcl
src/mcl/MCL.cpp
src/amcl/pf/pf_resample.cpp
)
target_link_libraries(mcl
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
)
add_library(mixmcl_node
#definition of class MixmclNode
src/mixmcl/MixmclNode.cpp
)
target_link_libraries(mixmcl_node
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${nuklei_LIBRARIES}
mcl dualmcl_tool
)
add_library(amcl_node
src/amcl/AmclNode.cpp
)
target_link_libraries(amcl_node
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
mcl
)
add_library(markov_node
src/markov/MarkovNode.cpp
)
target_link_libraries(markov_node
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
mcl
)
add_library(mcmcl_node
src/mcmcl/McmclNode.cpp
)
target_link_libraries(mcmcl_node
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
mcl mixmcl_node
)
add_library(aismcl_node
src/aismcl/AismclNode.cpp
)
target_link_libraries(aismcl_node
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${nuklei_LIBRARIES}
mcl mixmcl_node
)
add_library(dualmcl_tool
#IO definition for recording robot poses and laser features
src/io/paramio.cpp
src/io/dataio.cpp
#definition of class SamplingNode for collecting sampling pose and laser features
src/mixmcl/SamplingNode.cpp
#definition of class KCGrid for build density trees
src/mixmcl/KCGrid.cpp
)
target_link_libraries(dualmcl_tool
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${nuklei_LIBRARIES}
${flann_LIBRARIES}
mcl
)
##Build executables##
add_executable(iotest
src/iotest.cpp
)
target_link_libraries(iotest
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${nuklei_LIBRARIES}
${flann_LIBRARIES}
dualmcl_tool
)
add_executable(roscheck
src/roscheck.cpp
)
target_link_libraries(roscheck
${catkin_LIBRARIES}
)
add_executable(markov
src/markov.cpp
)
target_link_libraries(markov
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
mcl markov_node
)
add_executable(kdtree_test
src/kdtree_test.cpp
)
target_link_libraries(kdtree_test
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
)
#TODO use a List of algorithm names and iterate add_executable for each of them.
#TODO combie all source files into one library file
add_executable(amcl
src/amcl.cpp
)
target_link_libraries(amcl
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
mcl amcl_node
)
add_executable(mcmcl
src/mcmcl.cpp
)
target_link_libraries(mcmcl
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
mcl mcmcl_node
)
add_executable(aismcl
src/aismcl.cpp
)
target_link_libraries(aismcl
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${nuklei_LIBRARIES}
mcl mixmcl_node aismcl_node
)
add_executable(mixmcl
src/mixmcl.cpp
)
target_link_libraries(mixmcl
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${nuklei_LIBRARIES}
mcl mixmcl_node dualmcl_tool
)
add_executable(buildKDT
src/buildKDT.cpp
)
target_link_libraries(buildKDT
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${nuklei_LIBRARIES}
mcl dualmcl_tool
)
add_executable(dual
src/dual.cpp
)
target_link_libraries(dual
${amcl_modified_LIBRARIES}
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${nuklei_LIBRARIES}
mcl mixmcl_node dualmcl_tool
)
add_executable(multi_array_test
src/multi_array_test.cpp
)
target_link_libraries(multi_array_test
${catkin_LIBRARIES}
)
#executables
install( TARGETS
mixmcl amcl mcmcl buildKDT iotest roscheck dual markov
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
#shell scripts
install( PROGRAMS
script/kill.sh script/mkdatadir.sh script/playkill.sh script/rp.sh script/rpNmv.sh
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
#libraries
install( TARGETS
mcl dualmcl_tool mixmcl_node amcl_node mcmcl_node markov_node
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
#includes
install(DIRECTORY include
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
#bag files
#yaml files
#launch files
#rosconsole logging level file
install(DIRECTORY bags yaml launch config maps
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
#message(STATUS "CATKIN_PACKAGE_SHARE_DESTINATION is ${CATKIN_PACKAGE_SHARE_DESTINATION}")
#install(DIRECTORY data
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/data
#)
## message(STATUS "amcl_LIBRARIES is ${amcl_modified_LIBRARIES}")
## message(STATUS "RUNTIME_OUTPUT_DIRECTORY is ${RUNTIME_OUTPUT_DIRECTORY}")
## message(STATUS "CMAKE_RUNTIME_OUTPUT_DIRECTORY is ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
## message(STATUS "PROJECT_NAME is ${PROJECT_NAME}")
## message(STATUS "CMAKE_INSTALL_PREFIX is ${CMAKE_INSTALL_PREFIX}")
## message(STATUS "CATKIN_PACKAGE_SHARE_DESTINATION is ${CATKIN_PACKAGE_SHARE_DESTINATION}")
## message(STATUS "CATKIN_PACKAGE_LIB_DESTINATION is ${CATKIN_PACKAGE_LIB_DESTINATION}")
## message(STATUS "CATKIN_PACKAGE_BIN_DESTINATION is ${CATKIN_PACKAGE_BIN_DESTINATION}")
## message(STATUS "CATKIN_PACKAGE_INCLUDE_DESTINATION is ${CATKIN_PACKAGE_INCLUDE_DESTINATION}")