From 05c9b25d8e70019d9472b5fd42f7c2cac62cee1f Mon Sep 17 00:00:00 2001 From: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:38:24 +0900 Subject: [PATCH 1/3] fix(pointcloud_preprocessor): separate targets for base class (#1982) Signed-off-by: Daisuke Nishimatsu Signed-off-by: Daisuke Nishimatsu Signed-off-by: tomoya.kimura --- .../compare_map_segmentation/CMakeLists.txt | 20 +++++++++- .../pointcloud_preprocessor/CMakeLists.txt | 40 ++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/perception/compare_map_segmentation/CMakeLists.txt b/perception/compare_map_segmentation/CMakeLists.txt index 396a22beb54d7..5cc1f7bad104b 100644 --- a/perception/compare_map_segmentation/CMakeLists.txt +++ b/perception/compare_map_segmentation/CMakeLists.txt @@ -21,7 +21,7 @@ include_directories( ${GRID_MAP_INCLUDE_DIR} ) -ament_auto_add_library(compare_map_segmentation SHARED +add_library(compare_map_segmentation SHARED src/distance_based_compare_map_filter_nodelet.cpp src/voxel_based_approximate_compare_map_filter_nodelet.cpp src/voxel_based_compare_map_filter_nodelet.cpp @@ -30,11 +30,22 @@ ament_auto_add_library(compare_map_segmentation SHARED ) target_link_libraries(compare_map_segmentation + pointcloud_preprocessor::pointcloud_preprocessor_filter_base ${Boost_LIBRARIES} ${OpenCV_LIBRARIES} ${PCL_LIBRARIES} ) +ament_target_dependencies(compare_map_segmentation + grid_map_pcl + grid_map_ros + pcl_conversions + rclcpp + rclcpp_components + sensor_msgs + tier4_autoware_utils +) + if(OPENMP_FOUND) set_target_properties(compare_map_segmentation PROPERTIES COMPILE_FLAGS ${OpenMP_CXX_FLAGS} @@ -68,6 +79,13 @@ rclcpp_components_register_node(compare_map_segmentation PLUGIN "compare_map_segmentation::CompareElevationMapFilterComponent" EXECUTABLE compare_elevation_map_filter_node) +install( + TARGETS compare_map_segmentation + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + ament_auto_package(INSTALL_TO_SHARE launch ) diff --git a/sensing/pointcloud_preprocessor/CMakeLists.txt b/sensing/pointcloud_preprocessor/CMakeLists.txt index bb79ff4089082..b35138eb4306e 100644 --- a/sensing/pointcloud_preprocessor/CMakeLists.txt +++ b/sensing/pointcloud_preprocessor/CMakeLists.txt @@ -21,8 +21,26 @@ include_directories( ${GRID_MAP_INCLUDE_DIR} ) -ament_auto_add_library(pointcloud_preprocessor_filter SHARED +add_library(pointcloud_preprocessor_filter_base SHARED src/filter.cpp +) + +target_include_directories(pointcloud_preprocessor_filter_base PUBLIC + "$" + "$" +) + +ament_target_dependencies(pointcloud_preprocessor_filter_base + message_filters + pcl_conversions + rclcpp + sensor_msgs + tf2_ros + tier4_autoware_utils +) + +ament_auto_add_library(pointcloud_preprocessor_filter SHARED + src/utility/utilities.cpp src/concatenate_data/concatenate_data_nodelet.cpp src/crop_box_filter/crop_box_filter_nodelet.cpp src/downsample_filter/voxel_grid_downsample_filter_nodelet.cpp @@ -43,6 +61,7 @@ ament_auto_add_library(pointcloud_preprocessor_filter SHARED ) target_link_libraries(pointcloud_preprocessor_filter + pointcloud_preprocessor_filter_base ${Boost_LIBRARIES} ${OpenCV_LIBRARIES} ${PCL_LIBRARIES} @@ -145,6 +164,25 @@ rclcpp_components_register_node(pointcloud_preprocessor_filter set(CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE TRUE) target_link_libraries(polygon_remover_node gmp CGAL CGAL::CGAL CGAL::CGAL_Core) +# ========== Vector Map Inside Area Filter =========== +rclcpp_components_register_node(pointcloud_preprocessor_filter + PLUGIN "pointcloud_preprocessor::VectorMapInsideAreaFilterComponent" + EXECUTABLE vector_map_inside_area_filter_node) + +install( + TARGETS pointcloud_preprocessor_filter_base EXPORT export_${PROJECT_NAME} + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +install( + DIRECTORY include/ + DESTINATION include/${PROJECT_NAME} +) + +ament_export_targets(export_${PROJECT_NAME}) + ament_auto_package(INSTALL_TO_SHARE launch ) From 10e1950a865b7b6a59a2af9d2c57ee3547f38635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20=C3=87olak?= Date: Fri, 21 Oct 2022 08:20:34 +0300 Subject: [PATCH 2/3] fix(pointcloud_preprocessor): add missed target dependency (#2101) Signed-off-by: Kaan Colak Signed-off-by: Kaan Colak --- sensing/pointcloud_preprocessor/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/sensing/pointcloud_preprocessor/CMakeLists.txt b/sensing/pointcloud_preprocessor/CMakeLists.txt index b35138eb4306e..57be1763ebe47 100644 --- a/sensing/pointcloud_preprocessor/CMakeLists.txt +++ b/sensing/pointcloud_preprocessor/CMakeLists.txt @@ -37,6 +37,7 @@ ament_target_dependencies(pointcloud_preprocessor_filter_base sensor_msgs tf2_ros tier4_autoware_utils + pcl_ros ) ament_auto_add_library(pointcloud_preprocessor_filter SHARED From 2f0fa572c01e2f330271fbcdf2217f8a13033521 Mon Sep 17 00:00:00 2001 From: "tomoya.kimura" Date: Fri, 28 Oct 2022 12:15:23 +0900 Subject: [PATCH 3/3] fix: remove un-existed file from cmake Signed-off-by: tomoya.kimura --- sensing/pointcloud_preprocessor/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/sensing/pointcloud_preprocessor/CMakeLists.txt b/sensing/pointcloud_preprocessor/CMakeLists.txt index 57be1763ebe47..0989e52b4c4cb 100644 --- a/sensing/pointcloud_preprocessor/CMakeLists.txt +++ b/sensing/pointcloud_preprocessor/CMakeLists.txt @@ -41,7 +41,6 @@ ament_target_dependencies(pointcloud_preprocessor_filter_base ) ament_auto_add_library(pointcloud_preprocessor_filter SHARED - src/utility/utilities.cpp src/concatenate_data/concatenate_data_nodelet.cpp src/crop_box_filter/crop_box_filter_nodelet.cpp src/downsample_filter/voxel_grid_downsample_filter_nodelet.cpp