@@ -53,7 +53,6 @@ set(dependencies
5353 roadmap_explorer_msgs
5454 eigen3_cmake_module
5555 Eigen3
56- yaml-cpp
5756 nav2_behavior_tree
5857)
5958
@@ -82,14 +81,12 @@ include_directories(
8281 ${YAML_CPP_INCLUDE_DIRS}
8382)
8483
85- ########################### FRONTIER ###########################
84+ ########################### Libraries ###########################
8685add_library (${PROJECT_NAME} _frontier SHARED
8786src/Frontier.cpp )
8887ament_target_dependencies (${PROJECT_NAME} _frontier ${dependencies} )
8988
9089
91- ########################### UTILS ###########################
92-
9390add_library (${PROJECT_NAME} _utils SHARED
9491src/util/EventLogger.cpp
9592src/util/RosVisualizer.cpp
@@ -98,32 +95,20 @@ src/Helpers.cpp
9895ament_target_dependencies (${PROJECT_NAME} _utils ${dependencies} )
9996target_link_libraries (${PROJECT_NAME} _utils ${PROJECT_NAME} _frontier )
10097
101- ########################### PLUGINLIB LIBRARIES ###########################
10298
103- add_library (roadmap_explorer_bt_plugins SHARED
104- src/bt_plugins/LogIterationPlugin.cpp
105- src/bt_plugins/UpdateBoundaryPlugin.cpp
106- src/bt_plugins/SearchForFrontiersPlugin.cpp
107- src/bt_plugins/CleanupRoadmapPlugin.cpp
108- src/bt_plugins/UpdateRoadmapPlugin.cpp
109- src/bt_plugins/ProcessFrontierCostsPlugin.cpp
110- src/bt_plugins/OptimizeFullPathPlugin.cpp
111- src/bt_plugins/SendNav2GoalPlugin.cpp
112- src/bt_plugins/BlacklistGoalPlugin.cpp
99+ add_library (${PROJECT_NAME} _frontier_search_plugins SHARED
100+ src/frontier_search/PluginBFSearch.cpp
113101)
114- ament_target_dependencies (roadmap_explorer_bt_plugins ${dependencies} )
115- target_link_libraries (roadmap_explorer_bt_plugins ${PROJECT_NAME} _frontier ${PROJECT_NAME} _utils )
102+ ament_target_dependencies (${PROJECT_NAME} _frontier_search_plugins ${dependencies} )
116103
117- ##############
118104
119- add_library (roadmap_explorer_frontier_search_plugins SHARED
120- src/frontier_search/PluginBFSearch .cpp
105+ add_library (${PROJECT_NAME} _information_gain_plugins SHARED
106+ src/information_gain/CountBasedGain .cpp
121107)
122- ament_target_dependencies (roadmap_explorer_frontier_search_plugins ${dependencies} )
108+ ament_target_dependencies (${PROJECT_NAME} _information_gain_plugins ${dependencies} )
123109
124- ##############
125110
126- add_library (roadmap_explorer_planner_plugins SHARED
111+ add_library (${PROJECT_NAME} _planner_plugins SHARED
127112src/planners/ThetaStar.cpp
128113src/planners/Astar.cpp
129114src/planners/NavFn.cpp
@@ -133,52 +118,96 @@ src/planners/FrontierRoadmapPlugin.cpp
133118src/planners/EuclideanPlugin.cpp
134119src/planners/RandomDistancePlugin.cpp
135120)
136- ament_target_dependencies (roadmap_explorer_planner_plugins ${dependencies} )
121+ ament_target_dependencies (${PROJECT_NAME} _planner_plugins ${dependencies} )
137122
138- ##############
139123
140- add_library (roadmap_explorer_information_gain_plugins SHARED
141- src/information_gain/CountBasedGain.cpp
124+ add_library (${PROJECT_NAME} _core SHARED
125+ src/CostAssigner.cpp
126+ src/Parameters.cpp
127+ src/Nav2Interface.cpp
128+ src/FullPathOptimizer.cpp
129+ src/SensorSimulator.cpp
130+ )
131+ ament_target_dependencies (${PROJECT_NAME} _core ${dependencies} )
132+ target_link_libraries (${PROJECT_NAME} _core
133+ ${PCL_LIBRARIES}
134+ ${PROJECT_NAME} _frontier
135+ ${PROJECT_NAME} _utils
136+ ${PROJECT_NAME} _frontier_search_plugins
137+ ${PROJECT_NAME} _planner_plugins
138+ ${PROJECT_NAME} _information_gain_plugins
142139)
143- ament_target_dependencies (roadmap_explorer_information_gain_plugins ${dependencies} )
144140
145141
146- ########################### CORE LIBRARY ###########################
142+ add_library (${PROJECT_NAME} _bt_plugins SHARED
143+ src/bt_plugins/LogIterationPlugin.cpp
144+ src/bt_plugins/UpdateBoundaryPlugin.cpp
145+ src/bt_plugins/SearchForFrontiersPlugin.cpp
146+ src/bt_plugins/CleanupRoadmapPlugin.cpp
147+ src/bt_plugins/UpdateRoadmapPlugin.cpp
148+ src/bt_plugins/ProcessFrontierCostsPlugin.cpp
149+ src/bt_plugins/OptimizeFullPathPlugin.cpp
150+ src/bt_plugins/SendNav2GoalPlugin.cpp
151+ src/bt_plugins/BlacklistGoalPlugin.cpp
152+ )
153+ ament_target_dependencies (${PROJECT_NAME} _bt_plugins ${dependencies} )
154+ target_link_libraries (${PROJECT_NAME} _bt_plugins
155+ ${PROJECT_NAME} _frontier
156+ ${PROJECT_NAME} _utils
157+ ${PROJECT_NAME} _frontier_search_plugins
158+ ${PROJECT_NAME} _planner_plugins
159+ ${PROJECT_NAME} _information_gain_plugins
160+ )
147161
148- add_library (roadmap_exploration_bt SHARED
149- src/Parameters.cpp
150- src/Nav2Interface.cpp
162+
163+ add_library (${PROJECT_NAME} _bt SHARED
151164src/ExplorationBT.cpp
152- src/CostAssigner.cpp
153- src/FullPathOptimizer.cpp
154165src/ExplorationServer.cpp
155- src/SensorSimulator.cpp
156166)
157- ament_target_dependencies (roadmap_exploration_bt ${dependencies} )
158- target_link_libraries (roadmap_exploration_bt ${PCL_LIBRARIES} ${YAML_CPP_LIBRARIES} ${PROJECT_NAME} _frontier ${PROJECT_NAME} _utils roadmap_explorer_bt_plugins roadmap_explorer_frontier_search_plugins roadmap_explorer_planner_plugins roadmap_explorer_information_gain_plugins )
167+ ament_target_dependencies (${PROJECT_NAME} _bt ${dependencies} )
168+ target_link_libraries (${PROJECT_NAME} _bt
169+ ${PROJECT_NAME} _bt_plugins
170+ ${PROJECT_NAME} _frontier
171+ ${PROJECT_NAME} _utils
172+ ${PROJECT_NAME} _frontier_search_plugins
173+ ${PROJECT_NAME} _planner_plugins
174+ ${PROJECT_NAME} _information_gain_plugins
175+ ${PROJECT_NAME} _core
176+ )
159177
160- rclcpp_components_register_nodes (roadmap_exploration_bt "roadmap_exploration::ExplorationServer" )
178+ rclcpp_components_register_nodes (${PROJECT_NAME} _bt "roadmap_exploration::ExplorationServer" )
161179
162- ########################### EXECUTABLES ###########################
180+ # # ########################## EXECUTABLES ###########################
163181add_executable (roadmap_exploration_server
164182src/main.cpp
165183)
166184ament_target_dependencies (roadmap_exploration_server ${dependencies} )
167- target_link_libraries (roadmap_exploration_server ${PCL_LIBRARIES} ${YAML_CPP_LIBRARIES} ${PROJECT_NAME} _frontier roadmap_exploration_bt ${PROJECT_NAME} _utils roadmap_explorer_bt_plugins roadmap_explorer_frontier_search_plugins roadmap_explorer_planner_plugins roadmap_explorer_information_gain_plugins )
185+ target_link_libraries (roadmap_exploration_server
186+ ${PCL_LIBRARIES}
187+ ${PROJECT_NAME} _frontier
188+ ${PROJECT_NAME} _bt
189+ ${PROJECT_NAME} _utils
190+ ${PROJECT_NAME} _bt_plugins
191+ ${PROJECT_NAME} _frontier_search_plugins
192+ ${PROJECT_NAME} _planner_plugins
193+ ${PROJECT_NAME} _information_gain_plugins
194+ ${PROJECT_NAME} _core
195+ )
168196
169197########################### COMPARISON SCRIPTS ###########################
170198add_subdirectory (comparision_scripts )
171199
172200########################### INSTALLATION ###########################
173201
174202install (TARGETS
175- roadmap_exploration_bt
176203 ${PROJECT_NAME} _frontier
177204 ${PROJECT_NAME} _utils
178- roadmap_explorer_bt_plugins
179- roadmap_explorer_frontier_search_plugins
180- roadmap_explorer_planner_plugins
181- roadmap_explorer_information_gain_plugins
205+ ${PROJECT_NAME} _frontier_search_plugins
206+ ${PROJECT_NAME} _information_gain_plugins
207+ ${PROJECT_NAME} _planner_plugins
208+ ${PROJECT_NAME} _core
209+ ${PROJECT_NAME} _bt_plugins
210+ ${PROJECT_NAME} _bt
182211 ARCHIVE DESTINATION lib
183212 LIBRARY DESTINATION lib
184213 RUNTIME DESTINATION bin
@@ -197,7 +226,16 @@ DESTINATION share/${PROJECT_NAME}
197226)
198227
199228ament_export_include_directories (include ${EIGEN3_INCLUDE_DIR} )
200- ament_export_libraries (roadmap_exploration_bt ${PROJECT_NAME} _frontier ${PROJECT_NAME} _utils roadmap_explorer_bt_plugins roadmap_explorer_frontier_search_plugins roadmap_explorer_planner_plugins roadmap_explorer_information_gain_plugins )
229+ ament_export_libraries (
230+ ${PROJECT_NAME} _frontier
231+ ${PROJECT_NAME} _utils
232+ ${PROJECT_NAME} _frontier_search_plugins
233+ ${PROJECT_NAME} _information_gain_plugins
234+ ${PROJECT_NAME} _planner_plugins
235+ ${PROJECT_NAME} _core
236+ ${PROJECT_NAME} _bt_plugins
237+ ${PROJECT_NAME} _bt
238+ )
201239ament_export_dependencies (rosidl_default_runtime ${dependencies} )
202240
203241install (FILES core_plugins_description.xml frontier_search_plugins.xml frontier_planner_plugins.xml
@@ -213,9 +251,9 @@ find_package(ament_cmake_gtest QUIET)
213251if (ament_cmake_gtest_FOUND)
214252 add_subdirectory (tests/utils )
215253 # add_subdirectory(tests/bt_plugins)
216- add_subdirectory (tests/frontier_search )
217- add_subdirectory (tests/information_gain )
218- add_subdirectory (tests/other_tests )
254+ # add_subdirectory(tests/frontier_search)
255+ # add_subdirectory(tests/information_gain)
256+ # add_subdirectory(tests/other_tests)
219257endif ()
220258
221259ament_package ()
0 commit comments