forked from ctu-mrs/mrs_msgs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
267 lines (215 loc) · 5.27 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
cmake_minimum_required(VERSION 3.5)
project(mrs_msgs)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CATKIN_DEPENDENCIES
cmake_modules
geometry_msgs
message_generation
message_runtime
roscpp
sensor_msgs
std_msgs
std_srvs
)
find_package(catkin REQUIRED COMPONENTS
${CATKIN_DEPENDENCIES}
)
# messages for ROBOT_DIAGNOSTICS
add_message_files(DIRECTORY msg/robot_diagnostics FILES
UavDiagnostics.msg
)
# messages for MPC_TRACKER
add_message_files(DIRECTORY msg/mpc_tracker FILES
FuturePoint.msg
FutureTrajectory.msg
MpcPredictionFullState.msg
MpcTrackerDiagnostics.msg
)
# messages for GIMBAL
add_message_files(DIRECTORY msg/gimbal FILES
GimbalState.msg
)
# messages for GNSS
add_message_files(DIRECTORY msg/gnss FILES
RtkFixType.msg
RtkGps.msg
GpsData.msg
GpsInfo.msg
)
# messages for LANDOFF_TRACKER
add_message_files(DIRECTORY msg/landoff_tracker FILES
LandoffDiagnostics.msg
)
# messages for GazeboSimulation
add_message_files(DIRECTORY msg/gazebo_simulation FILES
GazeboSpawnerDiagnostics.msg
)
# messages for the UAV_MANAGERS
add_message_files(DIRECTORY msg/uav_managers FILES
ConstraintManagerDiagnostics.msg
ControlError.msg
ControllerDiagnostics.msg
ControllerStatus.msg
ControlManagerDiagnostics.msg
DynamicsConstraints.msg
EstimationDiagnostics.msg
EstimatorCorrection.msg
EstimatorDiagnostics.msg
EstimatorInput.msg
EstimatorOutput.msg
EulerAngles.msg
GainManagerDiagnostics.msg
PathReference.msg
ReferenceArray.msg
Reference.msg
ReferenceStamped.msg
TrackerCommand.msg
TrackerStatus.msg
TrajectoryReference.msg
UavManagerDiagnostics.msg
UavState.msg
VelocityReference.msg
VelocityReferenceStamped.msg
)
# messages for the UAV_STATUS
add_message_files(DIRECTORY msg/uav_status FILES
CustomTopic.msg
NodeCpuLoad.msg
UavStatus.msg
UavStatusShort.msg
)
# messages for the SE3_CONTROLLER
add_message_files(DIRECTORY msg/se3_controller FILES
Se3Gains.msg
)
# messages for the TRAJECTORY_GENERATION
add_message_files(DIRECTORY msg/trajectory_generation FILES
Path.msg
PathWithVelocity.msg
ReferenceWithVelocity.msg
)
# services for UAV_MANAGERS
add_service_files(DIRECTORY srv/uav_managers FILES
ConstraintsOverride.srv
DynamicsConstraintsSrv.srv
ReferenceSrv.srv
ReferenceStampedSrv.srv
TrajectoryReferenceSrv.srv
TransformPoseSrv.srv
TransformReferenceSrv.srv
TransformReferenceArraySrv.srv
TransformVector3Srv.srv
ValidateReferenceArray.srv
ValidateReference.srv
VelocityReferenceSrv.srv
VelocityReferenceStampedSrv.srv
)
# messages for the PROFILER
add_message_files(DIRECTORY msg/profiler FILES
ProfilerUpdate.msg
)
# messages for the MRS_BUMPER
add_message_files(DIRECTORY msg/bumper FILES
Histogram.msg
ObstacleSectors.msg
)
# messages for SPEED_TRACKER
add_message_files(DIRECTORY msg/speed_tracker FILES
SpeedTrackerCommand.msg
)
# general messages
add_message_files(DIRECTORY msg/general FILES
Float64ArrayStamped.msg
Float64.msg
Float64MultiArrayStamped.msg
Float64Stamped.msg
ImageLabeledArray.msg
ImageLabeled.msg
PoseWithCovarianceArrayStamped.msg
PoseWithCovarianceIdentified.msg
RangeWithCovarianceArrayStamped.msg
RangeWithCovarianceIdentified.msg
Sphere.msg
StringStamped.msg
TrackArrayStamped.msg
Track.msg
TrackStamped.msg
)
# general services
add_service_files(DIRECTORY srv/general FILES
Float64Srv.srv
Float64StampedSrv.srv
GetFloat64.srv
SetInt.srv
String.srv
Vec1.srv
Vec4.srv
)
# services for TRAJECTORY_GENERATION
add_service_files(DIRECTORY srv/trajectory_generation FILES
PathSrv.srv
GetPathSrv.srv
)
# messages for stamped_msgs
add_message_files(DIRECTORY msg/stamped_msgs FILES
UInt16Stamped.msg
BoolStamped.msg
)
add_message_files(DIRECTORY msg/hw_api FILES
HwApiAccelerationHdgCmd.msg
HwApiAccelerationHdgRateCmd.msg
HwApiActuatorCmd.msg
HwApiAltitude.msg
HwApiAttitudeCmd.msg
HwApiAttitudeRateCmd.msg
HwApiCapabilities.msg
HwApiControlGroupCmd.msg
HwApiPositionCmd.msg
HwApiRcChannels.msg
HwApiStatus.msg
HwApiVelocityHdgCmd.msg
HwApiVelocityHdgRateCmd.msg
)
## Generate added messages and services with any dependencies listed here
generate_messages(DEPENDENCIES
std_msgs
geometry_msgs
sensor_msgs
)
set(LIBRARIES
MrsMsgs_Main
)
catkin_package(
LIBRARIES ${LIBRARIES}
CATKIN_DEPENDS ${CATKIN_DEPENDENCIES}
)
include_directories(
${catkin_INCLUDE_DIRS}
)
add_library(MrsMsgs_Main
src/main.cpp
)
add_dependencies(MrsMsgs_Main
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(MrsMsgs_Main
${catkin_LIBRARIES}
)
add_custom_command(TARGET MrsMsgs_Main
PRE_BUILD
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMAND bash -c "${CMAKE_CURRENT_SOURCE_DIR}/link_msg_files.sh"
)
## --------------------------------------------------------------
## | Install |
## --------------------------------------------------------------
install(TARGETS ${LIBRARIES}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
install(DIRECTORY msg srv
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)