-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathCMakeLists.txt
151 lines (123 loc) · 3.19 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
cmake_minimum_required(VERSION 2.8.3)
project(perceptive_mpc)
add_compile_options(-std=c++14)
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(Boost REQUIRED COMPONENTS
system
filesystem
)
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
)
###########
## Build ##
###########
include_directories(
include
${catkin_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
)
add_dependencies(${PROJECT_NAME}
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}
${PROJECT_NAME}_explicit_instantiations
${catkin_LIBRARIES}
${Boost_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
)
#############
## 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}
)