-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
197 lines (175 loc) · 4.93 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
cmake_minimum_required(VERSION 2.8.3)
project(perceptive_mpc)
add_compile_options(-std=c++14)
# Added by Nick
#set(CMAKE_BUILD_TYPE Debug)
set(PACKAGE_DEPENDENCIES
roslib
tf
geometry_msgs
ocs2_comm_interfaces
ocs2_core
ocs2_robotic_tools
ocs2_ddp
kindr
kindr_ros
voxblox
voxblox_ros
)
find_package(catkin REQUIRED COMPONENTS
${PACKAGE_DEPENDENCIES}
message_generation
)
#find_package(Torch REQUIRED)
find_package(Boost REQUIRED COMPONENTS
system
filesystem
)
find_package(ompl REQUIRED)
add_message_files(
FILES
WrenchPoseStamped.msg
WrenchPoseTrajectory.msg
)
generate_messages(
DEPENDENCIES
geometry_msgs
)
catkin_package(
INCLUDE_DIRS
include
LIBRARIES
perceptive_mpc
CATKIN_DEPENDS
${PACKAGE_DEPENDENCIES}
message_runtime
DEPENDS
Boost ompl
)
###########
## Build ##
###########
include_directories(
include
${catkin_INCLUDE_DIRS} ${OMPL_INCLUDE_DIRS}
)
add_library(${PROJECT_NAME}_explicit_instantiations
src/ExplicitTemplateInstantiations.cpp)
add_dependencies(${PROJECT_NAME}_explicit_instantiations ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}_explicit_instantiations
${catkin_LIBRARIES}
${Boost_LIBRARIES}
dl
)
add_library(${PROJECT_NAME}
src/SystemDynamics.cpp
src/costs/QuadraticEndeffectorTrackingCost.cpp
src/costs/BaseAvoidanceCost.cpp
src/costs/VoxbloxCost.cpp
src/costs/PointsOnRobot.cpp
src/costs/StabilitySoftConstraint.cpp
src/OperatingPoint.cpp
src/Conversions.cpp
src/kinematics/KinematicsInterface.cpp
src/kinematics/mabi/MabiKinematics.cpp
src/kinematics/ur10/UR10Kinematics.cpp
src/kinematics/ur5/UR5Kinematics.cpp
src/kinematics/ur3/UR3Kinematics.cpp
src/EsdfCachingServer.cpp
src/AdmittanceReferenceModule.cpp
#Added by Nick
ompl_planner/VoxbloxStateValidityChecker.cpp
ompl_planner/EndEffectorGoal.cpp
)
add_dependencies(${PROJECT_NAME}
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}
${PROJECT_NAME}_explicit_instantiations
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${OMPL_LIBRARIES}
dl
)
add_library(${PROJECT_NAME}_example
example/PerceptiveMpcInterface.cpp
)
add_dependencies(${PROJECT_NAME}_example
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}_example
${PROJECT_NAME}
${PROJECT_NAME}_explicit_instantiations
${catkin_LIBRARIES}
${Boost_LIBRARIES}
dl
)
add_executable(${PROJECT_NAME}_kinematic_simulation
example/kinematic_simulation_node.cpp
example/KinematicSimulation.cpp)
add_dependencies(${PROJECT_NAME}_kinematic_simulation
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}_kinematic_simulation
${PROJECT_NAME}
${PROJECT_NAME}_explicit_instantiations
${PROJECT_NAME}_example
${catkin_LIBRARIES}
${Boost_LIBRARIES}
dl
)
# @Nick added own node
add_executable(${PROJECT_NAME}_ompl_planner
ompl_planner/ompl_planner_node.cpp
ompl_planner/OmplPlanner.cpp)
add_dependencies(${PROJECT_NAME}_ompl_planner
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}_ompl_planner
${PROJECT_NAME}
${PROJECT_NAME}_explicit_instantiations
${PROJECT_NAME}_example
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${OMPL_LIBRARIES}
dl)
# @Nick added own node
add_executable(${PROJECT_NAME}_write_oc_grid
ompl_planner/write_oc_grid_node.cpp
ompl_planner/WriteOcGrid.cpp
)
add_dependencies(${PROJECT_NAME}_write_oc_grid
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}_write_oc_grid
${PROJECT_NAME}
${PROJECT_NAME}_explicit_instantiations
${PROJECT_NAME}_example
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${OMPL_LIBRARIES}
dl)
add_executable(${PROJECT_NAME}_data_generator
ompl_planner/train_data_generator.cpp)
add_dependencies(${PROJECT_NAME}_ompl_planner
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}_data_generator
${PROJECT_NAME}
${PROJECT_NAME}_explicit_instantiations
${PROJECT_NAME}_example
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${OMPL_LIBRARIES}
dl)
#############
## Install ##
#############
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)