-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
198 lines (182 loc) · 5.46 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
cmake_minimum_required(VERSION 3.5)
project(navigation_lite)
# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(navigation_interfaces REQUIRED)
find_package(drone_interfaces REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_action REQUIRED)
find_package(rclcpp_components REQUIRED)
find_package(std_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(tf2_msgs REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
find_package(BehaviorTreeV3 REQUIRED)
find_package(ufomap REQUIRED)
add_library(navigation_action_server SHARED
src/navigation_server.cpp
src/action_wait.cpp
src/action_spin.cpp
src/action_follow_waypoints.cpp
src/action_compute_path_to_pose.cpp
src/action_read_goal.cpp
src/control_recovery_node.cpp
src/control_pipeline_sequence.cpp
src/control_round_robin_node.cpp
src/decorator_rate_controller.cpp)
target_include_directories(navigation_action_server PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(navigation_action_server BT::behaviortree_cpp_v3)
target_compile_definitions(navigation_action_server
PRIVATE "NAVIGATION_LITE_BUILDING_DLL")
ament_target_dependencies(navigation_action_server
"navigation_interfaces"
"rclcpp"
"rclcpp_action"
"rclcpp_components"
"std_msgs"
"geometry_msgs"
"sensor_msgs"
"builtin_interfaces"
"tf2"
"tf2_ros"
"tf2_msgs"
"tf2_geometry_msgs")
rclcpp_components_register_node(navigation_action_server PLUGIN "navigation_lite::NavigationServer" EXECUTABLE navigation_server)
add_library(controller_action_server SHARED
src/controller_server.cpp
src/conversions.cpp)
target_include_directories(controller_action_server PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_definitions(controller_action_server
PRIVATE "NAVIGATION_LITE_BUILDING_DLL")
ament_target_dependencies(controller_action_server
"rclcpp"
"rclcpp_action"
"rclcpp_components"
"std_msgs"
"geometry_msgs"
"nav_msgs"
"builtin_interfaces"
"tf2"
"tf2_ros"
"tf2_msgs"
"tf2_geometry_msgs"
"navigation_interfaces"
"drone_interfaces")
target_link_libraries(controller_action_server
UFO::Map
)
rclcpp_components_register_node(controller_action_server PLUGIN "navigation_lite::ControllerServer" EXECUTABLE controller_server)
add_library(planner_action_server SHARED
src/planner_server.cpp
src/conversions.cpp
src/d_star_lite.cpp)
target_include_directories(planner_action_server PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_definitions(planner_action_server
PRIVATE "NAVIGATION_LITE_BUILDING_DLL")
ament_target_dependencies(planner_action_server
"rclcpp"
"rclcpp_action"
"rclcpp_components"
"std_msgs"
"geometry_msgs"
"nav_msgs"
"builtin_interfaces"
"tf2"
"tf2_ros"
"tf2_msgs"
"tf2_geometry_msgs"
"navigation_interfaces"
"drone_interfaces")
target_link_libraries(planner_action_server
UFO::Map
)
rclcpp_components_register_node(planner_action_server PLUGIN "navigation_lite::PlannerServer" EXECUTABLE planner_server)
add_library(recovery_action_server SHARED
src/recovery_server.cpp)
target_include_directories(recovery_action_server PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_definitions(recovery_action_server
PRIVATE "NAVIGATION_LITE_BUILDING_DLL")
ament_target_dependencies(recovery_action_server
"navigation_interfaces"
"rclcpp"
"rclcpp_action"
"rclcpp_components"
"std_msgs"
"geometry_msgs"
"nav_msgs"
"builtin_interfaces"
"tf2"
"tf2_ros"
"tf2_msgs"
"tf2_geometry_msgs"
"drone_interfaces")
rclcpp_components_register_node(recovery_action_server PLUGIN "navigation_lite::RecoveryServer" EXECUTABLE recovery_server)
add_library(map_publish_server SHARED
src/map_server.cpp
src/sensor.cpp
src/sensor_precipitator.cpp
src/conversions.cpp)
target_include_directories(map_publish_server PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_definitions(map_publish_server
PRIVATE "NAVIGATION_LITE_BUILDING_DLL")
ament_target_dependencies(map_publish_server
"rclcpp"
"std_msgs"
"sensor_msgs"
"geometry_msgs"
"navigation_interfaces"
"tf2"
"tf2_ros"
"tf2_msgs"
"tf2_geometry_msgs" )
target_link_libraries(map_publish_server
UFO::Map
)
target_include_directories(map_publish_server PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
rclcpp_components_register_node(map_publish_server PLUGIN "navigation_lite::MapServer" EXECUTABLE map_server)
install(TARGETS
navigation_action_server
controller_action_server
planner_action_server
recovery_action_server
map_publish_server
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
install(DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}
)
install(DIRECTORY
config
DESTINATION share/${PROJECT_NAME}
)
ament_package()