-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
291 lines (248 loc) · 6.44 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
cmake_minimum_required(VERSION 3.0.2)
project(sdf_mp_integration)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
geometry_msgs
sensor_msgs
control_msgs
nav_msgs
tf
tmc_omni_path_follower
message_generation # For message generation
)
# find_package(catkin COMPONENTS voxblox voxblox_ros voxblox_msgs voxblox_rviz_plugin REQUIRED)
find_package(roscpp REQUIRED)
# find_package(fiesta REQUIRED)
find_package(gpu_voxels_ros REQUIRED)
find_package(gpmp2 REQUIRED)
find_package(Boost COMPONENTS timer REQUIRED) # Why this is needed, i have no idea
find_package(gpu_voxels PATHS $ENV{GPU_VOXELS_INSTALL_DIR} REQUIRED)
FIND_PACKAGE(CUDA REQUIRED)
FIND_PACKAGE(icl_core PATHS $ENV{GPU_VOXELS_INSTALL_DIR} REQUIRED )
FIND_PACKAGE(Boost COMPONENTS system REQUIRED)
FIND_PACKAGE(orocos_kdl REQUIRED)
FIND_PACKAGE(rospy REQUIRED)
###### GTSAM STUFF STARTS HERE
# Include GTSAM CMake tools
find_package(GTSAMCMakeTools)
# Find GTSAM components
find_package(GTSAM REQUIRED) # Uses installed package
include_directories(${GTSAM_INCLUDE_DIR})
###################################################################################
find_package(PCL 1.7 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(ompl REQUIRED)
add_definitions(
${gpu_voxels_DEFINITIONS}
${icl_core_DEFINITIONS}
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${roscpp_INCLUDE_DIRS}
# ${fiesta_INCLUDE_DIRS}
${gpu_voxels_ros_INCLUDE_DIRS}
${gpu_voxels_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${gpmp2_INCLUDE_DIR}
${CUDA_INCLUDE_DIRS}
${icl_core_INCLUDE_DIRS}
${orocos_kdl_INCLUDE_DIRS}
${rospy_INCLUDE_DIRS}
${dgpmp2_INCLUDE_DIRS}
${OMPL_INCLUDE_DIRS}
)
add_library(${PROJECT_NAME}_lib
# src/dummy_motion_planner.cpp
src/SDFHandler.cpp
src/PlanningServer.cpp
src/GraphMaintainer.cpp
src/SetHSRConf.cpp
src/GenerateArm.cpp
src/HeadController.cpp
src/ResultsRecorder.cpp
src/utils/timing.cpp
src/utils/traj_utils.cpp
src/utils/Visualiser.cpp
)
add_message_files(
FILES
GtsamValue.msg
GtsamValues.msg
WholeBodyPose.msg
ArmPose.msg
HeadDirection.msg
)
catkin_python_setup()
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
)
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS roscpp
message_runtime # for message generation
# fiesta
# voxblox_ros voxblox voxblox_msgs voxblox_rviz_plugin
)
# add_executable(gpmp2_example test_scripts/gpmp2_example.cpp
# src/SDFHandler.cpp)
# target_link_libraries(gpmp2_example
# ${catkin_LIBRARIES}
# ${roscpp_LIBRARIES}
# ${fiesta_LIBRARIES}
# ${PCL_LIBRARIES}
# ${OpenCV_LIBS}
# gpmp2
# gtsam
# ${voxblox_ros_LIBRARIES}
# ${Boost_SYSTEM_LIBRARY}
# ${icl_core_LIBRARIES}
# ${gpu_voxels_LIBRARIES}
# ${CUDA_LIBRARIES}
# ${orocos_kdl_LIBRARIES}
# ${rospy_LIBRARIES}
# ${gpu_voxels_ros_LIBRARIES}
# )
# Add full server node for the HSR
add_executable(planning_server_node test_scripts/planning_server_node.cpp
src/SDFHandler.cpp
src/PlanningServer.cpp
src/GraphMaintainer.cpp
src/SetHSRConf.cpp
src/GenerateArm.cpp
src/ResultsRecorder.cpp
src/HeadController.cpp
src/utils/timing.cpp
src/utils/traj_utils.cpp
src/utils/Visualiser.cpp
)
target_link_libraries(planning_server_node
${catkin_LIBRARIES}
${roscpp_LIBRARIES}
# ${fiesta_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
gpmp2
gtsam
# ${voxblox_ros_LIBRARIES}
${Boost_SYSTEM_LIBRARY}
${icl_core_LIBRARIES}
${gpu_voxels_LIBRARIES}
${CUDA_LIBRARIES}
${orocos_kdl_LIBRARIES}
${rospy_LIBRARIES}
${gpu_voxels_ros_LIBRARIES}
${dgpmp2_LIBRARIES}
${OMPL_LIBRARIES}
# ${PROJECT_NAME}_lib
)
add_executable(composite_planning_server_node test_scripts/composite_planning_server_node.cpp
src/SDFHandler.cpp
src/PlanningServer.cpp
src/GraphMaintainer.cpp
src/SetHSRConf.cpp
src/GenerateArm.cpp
src/ResultsRecorder.cpp
src/HeadController.cpp
src/utils/timing.cpp
src/utils/traj_utils.cpp
src/utils/Visualiser.cpp
)
target_link_libraries(composite_planning_server_node
${catkin_LIBRARIES}
${roscpp_LIBRARIES}
# ${fiesta_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
gpmp2
gtsam
# ${voxblox_ros_LIBRARIES}
${Boost_SYSTEM_LIBRARY}
${icl_core_LIBRARIES}
${gpu_voxels_LIBRARIES}
${CUDA_LIBRARIES}
${orocos_kdl_LIBRARIES}
${rospy_LIBRARIES}
${gpu_voxels_ros_LIBRARIES}
${dgpmp2_LIBRARIES}
${OMPL_LIBRARIES}
# ${PROJECT_NAME}_lib
)
add_executable(single_composite_planning_server_node test_scripts/single_composite_planning_server_node.cpp
src/SDFHandler.cpp
src/PlanningServer.cpp
src/GraphMaintainer.cpp
src/SetHSRConf.cpp
src/GenerateArm.cpp
src/ResultsRecorder.cpp
src/HeadController.cpp
src/utils/timing.cpp
src/utils/traj_utils.cpp
src/utils/Visualiser.cpp
)
target_link_libraries(single_composite_planning_server_node
${catkin_LIBRARIES}
${roscpp_LIBRARIES}
# ${fiesta_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBS}
gpmp2
gtsam
# ${voxblox_ros_LIBRARIES}
${Boost_SYSTEM_LIBRARY}
${icl_core_LIBRARIES}
${gpu_voxels_LIBRARIES}
${CUDA_LIBRARIES}
${orocos_kdl_LIBRARIES}
${rospy_LIBRARIES}
${gpu_voxels_ros_LIBRARIES}
${dgpmp2_LIBRARIES}
${OMPL_LIBRARIES}
# ${PROJECT_NAME}_lib
)
add_executable(test_pose2vector test_scripts/test_pose2vector.cpp
)
target_link_libraries(test_pose2vector
${catkin_LIBRARIES}
${roscpp_LIBRARIES}
gpmp2
gtsam
${CUDA_LIBRARIES}
)
add_executable(transform_republish_node src/transform_republish_node.cpp)
target_link_libraries(transform_republish_node
${catkin_LIBRARIES}
${roscpp_LIBRARIES}
)
add_executable(arm_goal_test_node scripts/arm_goal_test_node.cpp)
target_link_libraries(arm_goal_test_node
${catkin_LIBRARIES}
${roscpp_LIBRARIES}
)
add_dependencies(arm_goal_test_node sdf_mp_integration_generate_messages_cpp)
catkin_install_python(PROGRAMS scripts/plotting_node.py
scripts/hsr_python_controller.py
scripts/moving_obstacle_node.py
scripts/nbv_moving_obstacle_node.py
scripts/person_moving_obstacle_node.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
# Install directory
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
PATTERN ".svn" EXCLUDE)
install(DIRECTORY config/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
PATTERN ".svn" EXCLUDE)
install(DIRECTORY worlds/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/worlds
PATTERN ".svn" EXCLUDE)
install(DIRECTORY maps/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/maps
PATTERN ".svn" EXCLUDE)