|
| 1 | +cmake_minimum_required(VERSION 2.8.3) |
| 2 | +project(ed) |
| 3 | + |
| 4 | +## Find catkin macros and libraries |
| 5 | +find_package(catkin REQUIRED COMPONENTS |
| 6 | + class_loader |
| 7 | + cv_bridge |
| 8 | + ed_object_models |
| 9 | + geolib2 |
| 10 | + geometry_msgs |
| 11 | +# libsiftfast |
| 12 | + rgbd |
| 13 | + pcl |
| 14 | + roscpp |
| 15 | + roslib |
| 16 | + std_srvs |
| 17 | + tue_config |
| 18 | + tue_filesystem |
| 19 | + tue_serialization |
| 20 | + vocabulary_tree |
| 21 | + message_generation |
| 22 | +) |
| 23 | + |
| 24 | +# Generate messages in the 'msg' folder |
| 25 | +add_message_files( |
| 26 | + FILES |
| 27 | + EntityInfo.msg |
| 28 | +) |
| 29 | + |
| 30 | +# Generate services in the 'srv' folder |
| 31 | +add_service_files( |
| 32 | + FILES |
| 33 | + GetGUICommand.srv |
| 34 | + GetMeasurements.srv |
| 35 | + RaiseEvent.srv |
| 36 | + SetClick.srv |
| 37 | + SetLabel.srv |
| 38 | + SimpleQuery.srv |
| 39 | +) |
| 40 | + |
| 41 | +# Generate added messages and services with any dependencies listed here |
| 42 | +generate_messages( |
| 43 | + DEPENDENCIES |
| 44 | + geometry_msgs |
| 45 | + tue_serialization |
| 46 | +) |
| 47 | + |
| 48 | +################################### |
| 49 | +## catkin specific configuration ## |
| 50 | +################################### |
| 51 | +catkin_package() |
| 52 | + |
| 53 | +########### |
| 54 | +## Build ## |
| 55 | +########### |
| 56 | + |
| 57 | +include_directories( |
| 58 | + include |
| 59 | + ${catkin_INCLUDE_DIRS} |
| 60 | +) |
| 61 | + |
| 62 | +# ------------------------------------------------------------------------------------------------ |
| 63 | +# ED CORE |
| 64 | +# ------------------------------------------------------------------------------------------------ |
| 65 | + |
| 66 | +# Get all the headers |
| 67 | +file(GLOB_RECURSE HEADER_FILES include/*.h) |
| 68 | + |
| 69 | +# Declare a cpp library |
| 70 | +add_library(ed_core |
| 71 | + src/entity.cpp |
| 72 | + src/measurement.cpp |
| 73 | + |
| 74 | + # DDP is used by measurement.cpp, so put here |
| 75 | + src/helpers/depth_data_processing.cpp |
| 76 | + src/helpers/clipper/clipper.cpp |
| 77 | + ${HEADER_FILES} |
| 78 | +) |
| 79 | +target_link_libraries(ed_core ${catkin_LIBRARIES}) |
| 80 | +add_dependencies(ed_core ${PROJECT_NAME}_gencpp) |
| 81 | + |
| 82 | +add_library(ed_perception |
| 83 | + src/perception_modules/perception_module.cpp |
| 84 | + src/perception.cpp |
| 85 | + src/perception_worker.cpp |
| 86 | + src/perception/aggregator.cpp |
| 87 | + src/perception/model_fitter.cpp |
| 88 | +) |
| 89 | +target_link_libraries(ed_perception ed_core) |
| 90 | +add_dependencies(ed_perception ${PROJECT_NAME}_gencpp) |
| 91 | + |
| 92 | +add_library(ed_io |
| 93 | + src/serialization/serialization.cpp |
| 94 | + src/io/filesystem/read.cpp |
| 95 | + src/io/filesystem/write.cpp |
| 96 | +) |
| 97 | +add_dependencies(ed_io ${PROJECT_NAME}_gencpp) |
| 98 | + |
| 99 | +add_library(ed_association |
| 100 | + src/association_localization_modules/point_normal_alm.cpp |
| 101 | + src/association_localization_modules/polygon_height_alm.cpp |
| 102 | + src/association_localization_modules/world_model_renderer.cpp |
| 103 | +) |
| 104 | +add_dependencies(ed_association ${PROJECT_NAME}_gencpp) |
| 105 | + |
| 106 | +add_library(ed_segmentation |
| 107 | + src/segmentation_modules/euclidean_clustering_sm.cpp |
| 108 | + src/segmentation_modules/floodfill_sm.cpp |
| 109 | +) |
| 110 | +add_dependencies(ed_segmentation ${PROJECT_NAME}_gencpp) |
| 111 | + |
| 112 | +add_library(ed_kinect |
| 113 | + src/sensor_modules/kinect.cpp |
| 114 | +) |
| 115 | +target_link_libraries(ed_kinect ed_segmentation ed_association) |
| 116 | +add_dependencies(ed_kinect ${PROJECT_NAME}_gencpp) |
| 117 | + |
| 118 | +add_library(ed_visualization |
| 119 | + src/helpers/visualization.cpp |
| 120 | +) |
| 121 | +add_dependencies(ed_visualization ${PROJECT_NAME}_gencpp) |
| 122 | + |
| 123 | +add_library(ed_gui |
| 124 | + src/perception/label_gui_server.cpp |
| 125 | +) |
| 126 | +add_dependencies(ed_gui ${PROJECT_NAME}_gencpp) |
| 127 | + |
| 128 | +# ------------------------------------------------------------------------------------------------ |
| 129 | +# PERCEPTION MODULES |
| 130 | +# ------------------------------------------------------------------------------------------------ |
| 131 | + |
| 132 | +add_library(size_matcher |
| 133 | + perception/size_matcher.cpp |
| 134 | + perception/size_matcher.h |
| 135 | +) |
| 136 | +target_link_libraries(size_matcher ed_perception) |
| 137 | + |
| 138 | +add_library(human_contour_matcher |
| 139 | + perception/human_contour_matcher.cpp |
| 140 | + perception/human_contour_matcher.h |
| 141 | + perception/human_classifier.cpp |
| 142 | + perception/human_classifier.h |
| 143 | + perception/human_classifier_structs.h |
| 144 | +# perception/opencl_toolbox.cpp |
| 145 | +# perception/opencl_toolbox.h |
| 146 | +) |
| 147 | +target_link_libraries(human_contour_matcher ed_perception) |
| 148 | + |
| 149 | +#add_library(odu_finder |
| 150 | +# perception/odu_finder/odu_finder_module.cpp |
| 151 | +# perception/odu_finder/odu_finder_module.h |
| 152 | +# perception/odu_finder/odu_finder.cpp |
| 153 | +# perception/odu_finder/odu_finder.h |
| 154 | +#) |
| 155 | +#target_link_libraries(odu_finder ed_perception) |
| 156 | + |
| 157 | +add_library(qr_detector |
| 158 | + perception/qr_detector.cpp |
| 159 | + perception/qr_detector.h |
| 160 | + perception/qr_detector_zbar/qr_detector_zbar.cpp |
| 161 | + perception/qr_detector_zbar/qr_detector_zbar.h |
| 162 | +) |
| 163 | +target_link_libraries(qr_detector ed_perception) |
| 164 | +target_link_libraries(qr_detector /usr/lib/libzbar.so) |
| 165 | + |
| 166 | +#rosbuild_add_library(model_fitter |
| 167 | +# perception/model_fitter.cpp |
| 168 | +# perception/model_fitter.h |
| 169 | +#) |
| 170 | +#target_link_libraries(model_fitter ed) |
| 171 | + |
| 172 | +# ------------------------------------------------------------------------------------------------ |
| 173 | +# SERVER |
| 174 | +# ------------------------------------------------------------------------------------------------ |
| 175 | + |
| 176 | +# Create executable |
| 177 | +add_executable(ed_server |
| 178 | + src/ed.cpp |
| 179 | + src/server.cpp |
| 180 | + src/plugin_container.cpp |
| 181 | +) |
| 182 | +target_link_libraries(ed_server ed_core ed_perception ed_association ed_segmentation ed_io ed_kinect ed_gui ed_visualization map_publisher) |
| 183 | +add_dependencies(ed_server ${PROJECT_NAME}_gencpp) |
| 184 | + |
| 185 | +# ------------------------------------------------------------------------------------------------ |
| 186 | +# PLUGINS |
| 187 | +# ------------------------------------------------------------------------------------------------ |
| 188 | + |
| 189 | +add_library(map_publisher |
| 190 | + src/plugins/map_publisher.cpp |
| 191 | +) |
| 192 | +target_link_libraries(map_publisher ed_core) |
| 193 | + |
| 194 | +# ------------------------------------------------------------------------------------------------ |
| 195 | +# TOOLS |
| 196 | +# ------------------------------------------------------------------------------------------------ |
| 197 | + |
| 198 | +add_executable(view-measurement tools/view_measurement.cpp) |
| 199 | +target_link_libraries(view-measurement ed_core ed_io) |
| 200 | +add_dependencies(view-measurement ${PROJECT_NAME}_gencpp) |
| 201 | + |
| 202 | +add_executable(test-perception tools/test_perception.cpp) |
| 203 | +target_link_libraries(test-perception ed_core ed_perception ed_io) |
| 204 | +add_dependencies(test-perception ${PROJECT_NAME}_gencpp) |
| 205 | + |
| 206 | +add_executable(create-rgbd-measurement tools/create_rgbd_measurement.cpp) |
| 207 | +target_link_libraries(create-rgbd-measurement ed_core ed_io) |
| 208 | +add_dependencies(create-rgbd-measurement ${PROJECT_NAME}_gencpp) |
| 209 | + |
| 210 | +# ------------------------------------------------------------------------------------------------ |
| 211 | +# TESTS |
| 212 | +# ------------------------------------------------------------------------------------------------ |
| 213 | + |
| 214 | +add_executable(test_mask test/test_mask.cpp) |
| 215 | +target_link_libraries(test_mask ed_core) |
| 216 | +add_dependencies(test_mask ${PROJECT_NAME}_gencpp) |
| 217 | + |
| 218 | +add_executable(test_sampling test/test_sampling.cpp) |
| 219 | +target_link_libraries(test_sampling ed_core ed_visualization) |
| 220 | +add_dependencies(test_sampling ${PROJECT_NAME}_gencpp) |
| 221 | + |
| 222 | +add_executable(test_human_classifier test/test_human_classifier.cpp) |
| 223 | +target_link_libraries(test_human_classifier human_contour_matcher) |
| 224 | +add_dependencies(test_human_classifier ${PROJECT_NAME}_gencpp) |
| 225 | + |
| 226 | +add_executable(test_label_gui_server test/test_label_gui_server.cpp) |
| 227 | +target_link_libraries(test_label_gui_server ed_core ed_gui) |
| 228 | +add_dependencies(test_label_gui_server ${PROJECT_NAME}_gencpp) |
| 229 | + |
| 230 | +add_executable(test_service_speed test/test_service_speed.cpp) |
| 231 | +target_link_libraries(test_service_speed ed_core) |
| 232 | +add_dependencies(test_service_speed ${PROJECT_NAME}_gencpp) |
| 233 | + |
| 234 | +add_executable(show_gui test/show_gui.cpp) |
| 235 | +target_link_libraries(show_gui ed_core) |
| 236 | +add_dependencies(show_gui ${PROJECT_NAME}_gencpp) |
| 237 | + |
0 commit comments