-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathCMakeLists.txt
314 lines (286 loc) · 10.6 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
cmake_minimum_required(VERSION 2.8.3)
project(cassie_planning)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O3 -DEIGEN_NO_DEBUG -march=native -Wl,--no-as-needed")
# warnings
# if ( CMAKE_COMPILER_IS_GNUCC )
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
# endif()
# if ( MSVC )
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
# endif()
# add_definitions(-w)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
# set(EIGEN_INCLUDE_DIR "/usr/local/include/eigen3")
find_package(Eigen3 REQUIRED)
if(NOT EIGEN3_FOUND)
# Fallback to cmake_modules
find_package(cmake_modules REQUIRED)
# message(STATUS "=============================================Eigen path: ${EIGEN3_INCLUDE_DIR}")
find_package(Eigen REQUIRED)
set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
set(EIGEN3_LIBRARIES ${EIGEN_LIBRARIES}) # Not strictly necessary as Eigen is head only
# Possibly map additional variables to the EIGEN3_ prefix.
else()
# message(STATUS "=============================================Eigen path: ${EIGEN3_INCLUDE_DIR}")
set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
endif()
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
tf
std_msgs
nav_msgs
sensor_msgs
geometry_msgs
trajectory_msgs
visualization_msgs
message_filters
#velodyne_pointcloud
roslib
grid_map_ros
grid_map_core
inekf_msgs
planner_msgs
grid_map_msgs
rviz_visual_tools
)
find_package(PCL 1.2 REQUIRED)
catkin_package(
INCLUDE_DIRS include
INCLUDE_DIRS external
LIBRARIES ${PROJECT_NAME}
DEPENDS
Eigen3
grid_map_ros
grid_map_core
CATKIN_DEPENDS geometry_msgs
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
include
external/cereal/include
/usr/local/include/
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
include_directories(/usr/local/lib)
include_directories(/usr/local/include/)
# message(STATUS "--------------------------------------------------------------{")
# get_property(inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
# message("inc_dirs = ${inc_dirs}")
# message("catkin = ${catkin_LIBRARIES}")
# message(STATUS "${INCLUDE_DIRECTORIES}")
# message(STATUS "--------------------------------------------------------------{")
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
####################################################################################
#### Simple Testing
####################################################################################
add_executable(test_plane_fitting src/test_plane_fitting.cpp src/fake_map.cpp
src/utils/plane.cpp
src/multivariate_gaussian.cpp src/clf_rrt.cpp src/cassie_rrt_tree.cpp src/lyapunov_distance.cpp
src/local_chart.cpp src/standalone_lyapunov_distance.cpp src/local_map.cpp
src/map_operation.cpp
src/sample_pose.cpp src/pose.cpp
src/lyapunov_path.cpp
src/standalone_local_chart.cpp
src/standalone_omni_local_chart.cpp
src/standalone_omni_lyapunov_distance.cpp
src/omni_local_chart.cpp
src/utils/plotting.cpp
src/map_cost.cpp
src/communication.cpp
src/planner_info_to_controller_t.c
src/controller_info_to_planner_t.c
src/driver.cpp
src/control_commands.cpp
src/map_operation.cpp
src/lie_group.cpp
)
add_dependencies(test_plane_fitting ${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(test_plane_fitting ${catkin_LIBRARIES} ${PCL_LIBRARIES}
)
# add_executable(simple_test src/simple_test.cpp src/fake_map.cpp
# src/multivariate_gaussian.cpp src/local_map.cpp
# src/map_operation.cpp
# )
# add_dependencies(simple_test ${${PROJECT_NAME}_EXPORTED_TARGETS}
# ${catkin_EXPORTED_TARGETS})
# target_link_libraries(simple_test ${catkin_LIBRARIES} ${PCL_LIBRARIES}
# )
# add_executable(test_udp src/test_udp.cpp src/fake_map.cpp
# src/multivariate_gaussian.cpp src/clf_rrt.cpp src/cassie_rrt_tree.cpp src/lyapunov_distance.cpp
# src/local_chart.cpp src/standalone_lyapunov_distance.cpp src/local_map.cpp
# src/map_operation.cpp
# src/sample_pose.cpp src/pose.cpp
# src/lyapunov_path.cpp
# src/standalone_local_chart.cpp
# src/standalone_omni_local_chart.cpp
# src/standalone_omni_lyapunov_distance.cpp
# src/omni_local_chart.cpp
# src/utils/plotting.cpp
# src/map_cost.cpp
# src/communication.cpp
# src/planner_info_to_controller_t.c
# src/controller_info_to_planner_t.c
# src/control_commands.cpp
# )
# add_dependencies(test_udp ${${PROJECT_NAME}_EXPORTED_TARGETS}
# ${catkin_EXPORTED_TARGETS})
# target_link_libraries(test_udp ${catkin_LIBRARIES} ${PCL_LIBRARIES}
# )
# add_executable(test_rviz_tool src/test_rviz_tool.cpp src/fake_map.cpp
# src/multivariate_gaussian.cpp src/clf_rrt.cpp src/cassie_rrt_tree.cpp src/lyapunov_distance.cpp
# src/local_chart.cpp src/standalone_lyapunov_distance.cpp src/local_map.cpp
# src/map_operation.cpp
# src/sample_pose.cpp src/pose.cpp
# src/lyapunov_path.cpp
# src/standalone_local_chart.cpp
# src/standalone_omni_local_chart.cpp
# src/standalone_omni_lyapunov_distance.cpp
# src/omni_local_chart.cpp
# src/utils/plotting.cpp
# src/map_cost.cpp
# src/communication.cpp
# src/planner_info_to_controller_t.c
# src/controller_info_to_planner_t.c
# src/driver.cpp
# src/control_commands.cpp
# src/lie_group.cpp
# )
# add_dependencies(test_rviz_tool ${${PROJECT_NAME}_EXPORTED_TARGETS}
# ${catkin_EXPORTED_TARGETS})
# target_link_libraries(test_rviz_tool ${catkin_LIBRARIES} ${PCL_LIBRARIES}
# )
# add_executable(unit_test src/unit_test.cpp src/fake_map.cpp
# src/multivariate_gaussian.cpp src/clf_rrt.cpp src/cassie_rrt_tree.cpp src/lyapunov_distance.cpp
# src/local_chart.cpp src/standalone_lyapunov_distance.cpp src/local_map.cpp
# src/map_operation.cpp
# src/sample_pose.cpp src/pose.cpp
# src/lyapunov_path.cpp
# src/standalone_local_chart.cpp
# src/standalone_omni_local_chart.cpp
# src/standalone_omni_lyapunov_distance.cpp
# src/omni_local_chart.cpp
# src/utils/plotting.cpp
# src/map_cost.cpp
# src/communication.cpp
# src/planner_info_to_controller_t.c
# src/controller_info_to_planner_t.c
# src/driver.cpp
# src/control_commands.cpp
# src/lie_group.cpp
# )
# add_dependencies(unit_test ${${PROJECT_NAME}_EXPORTED_TARGETS}
# ${catkin_EXPORTED_TARGETS})
# target_link_libraries(unit_test ${catkin_LIBRARIES} ${PCL_LIBRARIES}
# )
# ####################################################################################
#
#
#
# ####################################################################################
# #### publisher
# ####################################################################################
# add_executable(fake_map_publisher src/map_publisher.cpp src/fake_map.cpp
# src/multivariate_gaussian.cpp
# src/map_operation.cpp
# )
# add_dependencies(fake_map_publisher ${${PROJECT_NAME}_EXPORTED_TARGETS}
# ${catkin_EXPORTED_TARGETS})
# target_link_libraries(fake_map_publisher ${catkin_LIBRARIES} ${PCL_LIBRARIES}
# )
#
#
# add_executable(static_robot_publisher src/static_robot_publisher.cpp
# src/utils/plotting.cpp
# )
# add_dependencies(static_robot_publisher ${${PROJECT_NAME}_EXPORTED_TARGETS}
# ${catkin_EXPORTED_TARGETS})
# target_link_libraries(static_robot_publisher ${catkin_LIBRARIES} ${PCL_LIBRARIES}
# )
#
#
add_executable(fake_robot_publisher src/fake_robot_publisher.cpp
src/fake_robot.cpp
src/utils/plotting.cpp
)
add_dependencies(fake_robot_publisher ${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(fake_robot_publisher ${catkin_LIBRARIES} ${PCL_LIBRARIES}
)
#
#
# ####################################################################################
#
#
#
# ####################################################################################
# #### RRT TESTING
# ####################################################################################
# add_executable(test_rrt src/test_rrt.cpp src/fake_map.cpp
# src/multivariate_gaussian.cpp
# src/clf_rrt.cpp src/cassie_rrt_tree.cpp
# src/lyapunov_distance.cpp
# src/local_chart.cpp src/standalone_lyapunov_distance.cpp src/local_map.cpp
# src/map_operation.cpp
# src/sample_pose.cpp src/pose.cpp
# src/lyapunov_path.cpp
# src/standalone_local_chart.cpp
# src/standalone_omni_local_chart.cpp
# src/standalone_omni_lyapunov_distance.cpp
# src/omni_local_chart.cpp
# src/utils/plotting.cpp
# src/map_cost.cpp
# src/control_commands.cpp
# )
# add_dependencies(test_rrt ${${PROJECT_NAME}_EXPORTED_TARGETS}
# ${catkin_EXPORTED_TARGETS})
# target_link_libraries(test_rrt ${catkin_LIBRARIES} ${PCL_LIBRARIES}
# )
# ####################################################################################
####################################################################################
#### PIPELINE TESTING
####################################################################################
add_executable(test_pipeline src/main.cpp src/fake_map.cpp
src/utils/plane.cpp
src/multivariate_gaussian.cpp src/clf_rrt.cpp src/cassie_rrt_tree.cpp src/lyapunov_distance.cpp
src/local_chart.cpp src/standalone_lyapunov_distance.cpp src/local_map.cpp
src/map_operation.cpp
src/sample_pose.cpp src/pose.cpp
src/lyapunov_path.cpp
src/standalone_local_chart.cpp
src/standalone_omni_local_chart.cpp
src/standalone_omni_lyapunov_distance.cpp
src/omni_local_chart.cpp
src/utils/plotting.cpp
src/map_cost.cpp
src/communication.cpp
src/planner_info_to_controller_t.c
src/controller_info_to_planner_t.c
src/driver.cpp
src/control_commands.cpp
src/map_operation.cpp
src/lie_group.cpp
)
add_dependencies(test_pipeline ${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(test_pipeline ${catkin_LIBRARIES} ${PCL_LIBRARIES}
)
####################################################################################
# target_link_libraries(wavefield_test ${catkin_LIBRARIES} /usr/local/lib/libgp.a)
# add_executable(cassie_planner src/main.cc src/Dstar.cc src/waypoint_data_t.c src/wavefront_frontier_detection.cc)
# target_link_libraries(cassie_planner ${catkin_LIBRARIES})
# add_dependencies(cassie_planner ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})