From e1ce6cd970fe08c7c793620d489bd67f9a27b831 Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Tue, 14 May 2024 17:30:13 +0900 Subject: [PATCH 1/6] feat: cmake optimization in progress Signed-off-by: Kenzo Lobos-Tsunekawa --- nebula_common/CMakeLists.txt | 31 +- nebula_common/package.xml | 1 - nebula_decoders/CMakeLists.txt | 167 +++++++-- nebula_examples/CMakeLists.txt | 100 ++++-- nebula_hw_interfaces/CMakeLists.txt | 150 ++++++-- nebula_ros/CMakeLists.txt | 446 +++++++++++++++++++++--- nebula_ros/package.xml | 2 +- nebula_tests/CMakeLists.txt | 77 +++- nebula_tests/continental/CMakeLists.txt | 37 +- nebula_tests/hesai/CMakeLists.txt | 35 +- nebula_tests/velodyne/CMakeLists.txt | 102 +++--- 11 files changed, 916 insertions(+), 232 deletions(-) diff --git a/nebula_common/CMakeLists.txt b/nebula_common/CMakeLists.txt index 154f8e453..67d573198 100644 --- a/nebula_common/CMakeLists.txt +++ b/nebula_common/CMakeLists.txt @@ -2,13 +2,9 @@ cmake_minimum_required(VERSION 3.14) project(nebula_common) find_package(ament_cmake_auto REQUIRED) -find_package(PCL REQUIRED) find_package(PCL REQUIRED COMPONENTS common) -find_package(pcl_conversions REQUIRED) find_package(yaml-cpp REQUIRED) -ament_auto_find_build_dependencies() - # Default to C++17 if (NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) @@ -35,14 +31,29 @@ include_directories( ${PCL_COMMON_INCLUDE_DIRS} ) -ament_auto_add_library(nebula_common SHARED - src/nebula_common.cpp - src/velodyne/velodyne_calibration_decoder.cpp - ) +link_libraries( + ${PCL_LIBRARIES} + ${YAML_CPP_LIBRARIES} +) + +add_library(nebula_common SHARED + src/nebula_common.cpp + src/velodyne/velodyne_calibration_decoder.cpp +) + +install(TARGETS nebula_common EXPORT export_nebula_common) +install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME}) + +ament_export_include_directories("include/${PROJECT_NAME}") +ament_export_targets(export_nebula_common) + +ament_export_dependencies( + PCL + yaml-cpp +) -target_link_libraries(nebula_common yaml-cpp) +ament_package() -ament_auto_package() # Set ROS_DISTRO macros set(ROS_DISTRO $ENV{ROS_DISTRO}) diff --git a/nebula_common/package.xml b/nebula_common/package.xml index d769e273e..f5d6c83ac 100644 --- a/nebula_common/package.xml +++ b/nebula_common/package.xml @@ -13,7 +13,6 @@ ros_environment libpcl-all-dev - pcl_conversions yaml-cpp ament_cmake_gtest diff --git a/nebula_decoders/CMakeLists.txt b/nebula_decoders/CMakeLists.txt index 31385de6f..20284bbb8 100644 --- a/nebula_decoders/CMakeLists.txt +++ b/nebula_decoders/CMakeLists.txt @@ -3,7 +3,7 @@ project(nebula_decoders) find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() +#ament_auto_find_build_dependencies() # Default to C++17 if (NOT CMAKE_CXX_STANDARD) @@ -14,58 +14,159 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic -Wunused-function) endif () +find_package(PCL REQUIRED COMPONENTS common) +#find_package(pcl_conversions REQUIRED) + find_package(angles REQUIRED) -find_package(PCL REQUIRED) -find_package(pcl_conversions REQUIRED) -find_package(yaml-cpp REQUIRED) +find_package(continental_msgs REQUIRED) +find_package(diagnostic_msgs REQUIRED) find_package(nebula_common REQUIRED) +find_package(nebula_msgs REQUIRED) +find_package(pandar_msgs REQUIRED) +find_package(pcl_conversions REQUIRED) +find_package(radar_msgs REQUIRED) +find_package(rclcpp REQUIRED) find_package(robosense_msgs REQUIRED) +find_package(sensor_msgs REQUIRED) +find_package(velodyne_msgs REQUIRED) +find_package(yaml-cpp REQUIRED) + +include_directories(PUBLIC + include + SYSTEM +) -include_directories( - include - SYSTEM - ${YAML_CPP_INCLUDE_DIRS} - ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} +set(common_include_dirs + ${nebula_common_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} + ${PCL_INCLUDE_DIRS} + ${PCL_COMMON_INCLUDE_DIRS} + ${pcl_conversions_INCLUDE_DIRS} + ${rcl_INCLUDE_DIRS} + ${rclcpp_INCLUDE_DIRS} + ${sensor_msgs_INCLUDE_DIRS} +) + +set(common_targets + ${nebula_common_TARGETS} + ${pcl_conversions_LIBRARIES} + ${rcl_TARGETS} + ${rclcpp_TARGETS} + ${sensor_msgs_TARGETS} ) # Lidar Decoders # Hesai -ament_auto_add_library(nebula_decoders_hesai SHARED - src/nebula_decoders_hesai/hesai_driver.cpp - ) +add_library(nebula_decoders_hesai SHARED + src/nebula_decoders_hesai/hesai_driver.cpp +) +target_link_libraries(nebula_decoders_hesai PUBLIC + ${pandar_msgs_TARGETS} + ${common_targets} +) + +target_include_directories(nebula_decoders_hesai PUBLIC + ${pandar_msgs_INCLUDE_DIRS} + ${common_include_dirs} +) # Velodyne -ament_auto_add_library(nebula_decoders_velodyne SHARED - src/nebula_decoders_velodyne/velodyne_driver.cpp - src/nebula_decoders_velodyne/decoders/vls128_decoder.cpp - src/nebula_decoders_velodyne/decoders/vlp16_decoder.cpp - src/nebula_decoders_velodyne/decoders/vlp32_decoder.cpp - ) +add_library(nebula_decoders_velodyne SHARED + src/nebula_decoders_velodyne/velodyne_driver.cpp + src/nebula_decoders_velodyne/decoders/vls128_decoder.cpp + src/nebula_decoders_velodyne/decoders/vlp16_decoder.cpp + src/nebula_decoders_velodyne/decoders/vlp32_decoder.cpp +) +target_link_libraries(nebula_decoders_velodyne PUBLIC + ${angles_msgs_TARGETS} + ${velodyne_msgs_TARGETS} + ${common_targets} +) +target_include_directories(nebula_decoders_velodyne PUBLIC + ${angles_INCLUDE_DIRS} + ${velodyne_msgs_INCLUDE_DIRS} + ${common_include_dirs} +) # Robosense -ament_auto_add_library(nebula_decoders_robosense SHARED - src/nebula_decoders_robosense/robosense_driver.cpp - ) - -ament_auto_add_library(nebula_decoders_robosense_info SHARED - src/nebula_decoders_robosense/robosense_info_driver.cpp - ) +add_library(nebula_decoders_robosense SHARED +src/nebula_decoders_robosense/robosense_driver.cpp +) +target_link_libraries(nebula_decoders_robosense PUBLIC + ${robosense_msgs_TARGETS} + ${common_targets} +) +target_include_directories(nebula_decoders_robosense PUBLIC + ${robosense_msgs_INCLUDE_DIRS} + ${common_include_dirs} +) # Continental -ament_auto_add_library(nebula_decoders_continental SHARED - src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp - ) +add_library(nebula_decoders_continental SHARED + src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp +) +target_link_libraries(nebula_decoders_continental PUBLIC + ${continental_msgs_TARGETS} + ${diagnostic_msgs_TARGETS} + ${boost_udp_driver_TARGETS} + ${nebula_common_TARGETS} + ${nebula_msgs_TARGETS} + ${radar_msgs_TARGETS} + ${common_targets} +) +target_include_directories(nebula_decoders_continental PUBLIC + ${continental_msgs_INCLUDE_DIRS} + ${diagnostic_msgs_INCLUDE_DIRS} + ${boost_udp_driver_INCLUDE_DIRS} + ${nebula_common_INCLUDE_DIRS} + ${nebula_msgs_INCLUDE_DIRS} + ${radar_msgs_INCLUDE_DIRS} + ${common_include_dirs} +) + +install(TARGETS nebula_decoders_hesai EXPORT export_nebula_decoders_hesai) +install(TARGETS nebula_decoders_velodyne EXPORT export_nebula_decoders_velodyne) +install(TARGETS nebula_decoders_robosense EXPORT export_nebula_decoders_robosense) +install(TARGETS nebula_decoders_continental EXPORT export_nebula_decoders_continental) +install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME}) if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() endif() -ament_auto_package( - INSTALL_TO_SHARE - calibration - ) +ament_export_include_directories("include/${PROJECT_NAME}") +ament_export_targets(export_nebula_decoders_hesai) +ament_export_targets(export_nebula_decoders_velodyne) +ament_export_targets(export_nebula_decoders_robosense) +ament_export_targets(export_nebula_decoders_continental) + +install( + DIRECTORY calibration + DESTINATION share/${PROJECT_NAME} +) + +ament_export_dependencies( + PCL + pcl_conversions + angles + continental_msgs + diagnostic_msgs + nebula_common + nebula_msgs + pandar_msgs + radar_msgs + rcl + rclcpp + rclcpp_components + robosense_msgs + sensor_msgs + velodyne_msgs + yaml-cpp +) + +#ament_auto_package( +ament_package() # Set ROS_DISTRO macros set(ROS_DISTRO $ENV{ROS_DISTRO}) diff --git a/nebula_examples/CMakeLists.txt b/nebula_examples/CMakeLists.txt index 774580c04..7e206e591 100644 --- a/nebula_examples/CMakeLists.txt +++ b/nebula_examples/CMakeLists.txt @@ -11,51 +11,101 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() find_package(ament_cmake_auto REQUIRED) -find_package(PCL REQUIRED COMPONENTS common) -find_package(PCL REQUIRED) -find_package(pcl_conversions REQUIRED) -find_package(yaml-cpp REQUIRED) find_package(nebula_decoders REQUIRED) +find_package(nebula_hw_interfaces REQUIRED) find_package(nebula_ros REQUIRED) find_package(nebula_common REQUIRED) +find_package(PCL REQUIRED COMPONENTS common) +find_package(pcl_conversions REQUIRED) +find_package(rclcpp REQUIRED) +find_package(rosbag2_cpp REQUIRED) +find_package(yaml-cpp REQUIRED) -ament_auto_find_build_dependencies() +#ament_auto_find_build_dependencies() include_directories( - include - SYSTEM - ${YAML_CPP_INCLUDE_DIRS} - ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} + include + SYSTEM + ${nebula_decoders_INCLUDE_DIRS} + ${nebula_ros_INCLUDE_DIRS} + ${PCL_INCLUDE_DIRS} + ${PCL_COMMON_INCLUDE_DIRS} + ${rosbag2_cpp_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} +) + +message(STATUS "rosbag_cpp_INCLUDE_DIRS: ${rosbag2_cpp_INCLUDE_DIRS}") +message(STATUS "rosbag_cpp_LIBRARIES: ${rosbag2_cpp_LIBRARIES}") +message(STATUS "rosbag_cpp_TARGETS: ${rosbag2_cpp_TARGETS}") + +link_libraries( + ${rosbag2_cpp_TARGETS} + ${PCL_LIBRARIES} ) + +message(STATUS "nebula_ros_INCLUDE_DIRS: ${nebula_ros_INCLUDE_DIRS}") + ## HESAI # Offline Lib -ament_auto_add_library(hesai_ros_offline_extract_pcd SHARED - ${CMAKE_CURRENT_SOURCE_DIR}/src/hesai/hesai_ros_offline_extract_pcd.cpp +add_library(hesai_ros_offline_extract_pcd SHARED + ${CMAKE_CURRENT_SOURCE_DIR}/src/hesai/hesai_ros_offline_extract_pcd.cpp +) +target_link_libraries(hesai_ros_offline_extract_pcd PUBLIC + nebula_decoders::nebula_decoders_hesai +) + +add_executable(hesai_ros_offline_extract_pcd_node + ${CMAKE_CURRENT_SOURCE_DIR}/src/hesai/hesai_ros_offline_extract_pcd_main.cpp ) -target_link_libraries(hesai_ros_offline_extract_pcd ${PCL_LIBRARIES}) -ament_auto_add_executable(hesai_ros_offline_extract_pcd_node - ${CMAKE_CURRENT_SOURCE_DIR}/src/hesai/hesai_ros_offline_extract_pcd_main.cpp + +target_link_libraries(hesai_ros_offline_extract_pcd_node PUBLIC + hesai_ros_offline_extract_pcd ) + # Extraction for TEST Lib -ament_auto_add_library(hesai_ros_offline_extract_bag_pcd SHARED - ${CMAKE_CURRENT_SOURCE_DIR}/src/hesai/hesai_ros_offline_extract_bag_pcd.cpp +add_library(hesai_ros_offline_extract_bag_pcd SHARED + ${CMAKE_CURRENT_SOURCE_DIR}/src/hesai/hesai_ros_offline_extract_bag_pcd.cpp ) -target_link_libraries(hesai_ros_offline_extract_bag_pcd ${PCL_LIBRARIES}) -ament_auto_add_executable(hesai_ros_offline_extract_bag_pcd_node - ${CMAKE_CURRENT_SOURCE_DIR}/src/hesai/hesai_ros_offline_extract_bag_pcd_main.cpp +target_link_libraries(hesai_ros_offline_extract_bag_pcd PUBLIC + nebula_decoders::nebula_decoders_hesai +) + +add_executable(hesai_ros_offline_extract_bag_pcd_node + ${CMAKE_CURRENT_SOURCE_DIR}/src/hesai/hesai_ros_offline_extract_bag_pcd_main.cpp +) + +target_link_libraries(hesai_ros_offline_extract_bag_pcd_node PUBLIC + hesai_ros_offline_extract_bag_pcd ) ## Velodyne # Extraction for TEST Lib -ament_auto_add_library(velodyne_ros_offline_extract_bag_pcd SHARED - ${CMAKE_CURRENT_SOURCE_DIR}/src/velodyne/velodyne_ros_offline_extract_bag_pcd.cpp +add_library(velodyne_ros_offline_extract_bag_pcd SHARED + ${CMAKE_CURRENT_SOURCE_DIR}/src/velodyne/velodyne_ros_offline_extract_bag_pcd.cpp +) +target_link_libraries(velodyne_ros_offline_extract_bag_pcd PUBLIC + nebula_decoders::nebula_decoders_velodyne ) -target_link_libraries(velodyne_ros_offline_extract_bag_pcd ${PCL_LIBRARIES}) -ament_auto_add_executable(velodyne_ros_offline_extract_bag_pcd_node - ${CMAKE_CURRENT_SOURCE_DIR}/src/velodyne/velodyne_ros_offline_extract_bag_pcd_main.cpp + +add_executable(velodyne_ros_offline_extract_bag_pcd_node + ${CMAKE_CURRENT_SOURCE_DIR}/src/velodyne/velodyne_ros_offline_extract_bag_pcd_main.cpp +) + +target_link_libraries(velodyne_ros_offline_extract_bag_pcd_node PUBLIC + velodyne_ros_offline_extract_bag_pcd ) + +#ament_auto_add_library(velodyne_ros_offline_extract_bag_pcd SHARED +# ${CMAKE_CURRENT_SOURCE_DIR}/src/velodyne/velodyne_ros_offline_extract_bag_pcd.cpp +#) +#target_link_libraries(velodyne_ros_offline_extract_bag_pcd ${PCL_LIBRARIES}) +#ament_auto_add_executable(velodyne_ros_offline_extract_bag_pcd_node +# ${CMAKE_CURRENT_SOURCE_DIR}/src/velodyne/velodyne_ros_offline_extract_bag_pcd_main.cpp +#) + + + if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() diff --git a/nebula_hw_interfaces/CMakeLists.txt b/nebula_hw_interfaces/CMakeLists.txt index 7cd8b8982..5754c3882 100644 --- a/nebula_hw_interfaces/CMakeLists.txt +++ b/nebula_hw_interfaces/CMakeLists.txt @@ -2,12 +2,27 @@ cmake_minimum_required(VERSION 3.14) project(nebula_hw_interfaces) find_package(ament_cmake_auto REQUIRED) -find_package(PCL REQUIRED) find_package(PCL REQUIRED COMPONENTS common) -find_package(pcl_conversions REQUIRED) -find_package(robosense_msgs REQUIRED) +#find_package(pcl_conversions REQUIRED) +find_package(boost_tcp_driver) +find_package(boost_udp_driver) +find_package(nebula_common) +find_package(nebula_msgs) +find_package(pandar_msgs) +find_package(rclcpp) +find_package(rclcpp_components) +find_package(robosense_msgs) +find_package(sensor_msgs) +find_package(velodyne_msgs) -ament_auto_find_build_dependencies() +#ament_auto_find_build_dependencies() # this finds all components to it is slower + +message(STATUS "boost_tcp_driver_TARGETS : ${boost_tcp_driver_TARGETS}") +message(STATUS "boost_tcp_driver_LIBRARIES : ${boost_tcp_driver_LIBRARIES}") +message(STATUS "boost_tcp_driver_INCLUDE_DIRS : ${boost_tcp_driver_INCLUDE_DIRS}") +message(STATUS "boost_udp_driver_TARGETS : ${boost_udp_driver_TARGETS}") +message(STATUS "boost_udp_driver_LIBRARIES : ${boost_udp_driver_LIBRARIES}") +message(STATUS "boost_udp_driver_INCLUDE_DIRS : ${boost_udp_driver_INCLUDE_DIRS}") # Default to C++17 if (NOT CMAKE_CXX_STANDARD) @@ -18,34 +33,125 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic -Wunused-function) endif () +# Common includes for all targets include_directories( - include - SYSTEM - ${YAML_CPP_INCLUDE_DIRS} - ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} + include + SYSTEM +) + +set(common_include_dirs + ${nebula_common_INCLUDE_DIRS} + ${PCL_INCLUDE_DIRS} + ${PCL_COMMON_INCLUDE_DIRS} + ${rcl_INCLUDE_DIRS} + ${rclcpp_INCLUDE_DIRS} + ${rclcpp_components_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} ) -ament_auto_add_library(nebula_hw_interfaces_hesai SHARED - src/nebula_hesai_hw_interfaces/hesai_hw_interface.cpp - ) +set(common_targets + ${nebula_common_TARGETS} + ${rcl_TARGETS} + ${rclcpp_TARGETS} +) -ament_auto_add_library(nebula_hw_interfaces_velodyne SHARED - src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp - ) +add_library(nebula_hw_interfaces_hesai SHARED + src/nebula_hesai_hw_interfaces/hesai_hw_interface.cpp +) +target_link_libraries(nebula_hw_interfaces_hesai PUBLIC + ${boost_tcp_driver_LIBRARIES} + ${boost_udp_driver_LIBRARIES} + ${pandar_msgs_TARGETS} + ${common_targets} +) + +target_include_directories(nebula_hw_interfaces_hesai PUBLIC + ${boost_tcp_driver_INCLUDE_DIRS} + ${boost_udp_driver_INCLUDE_DIRS} + ${pandar_msgs_INCLUDE_DIRS} + ${common_include_dirs} +) + +add_library(nebula_hw_interfaces_velodyne SHARED + src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp +) +target_link_libraries(nebula_hw_interfaces_velodyne PUBLIC + ${boost_tcp_driver_LIBRARIES} + ${boost_udp_driver_LIBRARIES} + ${velodyne_msgs_TARGETS} + ${common_targets} +) +target_include_directories(nebula_hw_interfaces_velodyne PUBLIC + ${boost_udp_driver_INCLUDE_DIRS} + ${boost_tcp_driver_INCLUDE_DIRS} + ${velodyne_msgs_INCLUDE_DIRS} + ${common_include_dirs} +) -ament_auto_add_library(nebula_hw_interfaces_robosense SHARED - src/nebula_robosense_hw_interfaces/robosense_hw_interface.cpp - ) +add_library(nebula_hw_interfaces_robosense SHARED + src/nebula_robosense_hw_interfaces/robosense_hw_interface.cpp +) +target_link_libraries(nebula_hw_interfaces_robosense PUBLIC + ${boost_tcp_driver_LIBRARIES} + ${boost_udp_driver_LIBRARIES} + ${robosense_msgs_TARGETS} + ${common_targets} +) +target_include_directories(nebula_hw_interfaces_robosense PUBLIC + ${boost_udp_driver_INCLUDE_DIRS} + ${boost_tcp_driver_INCLUDE_DIRS} + ${robosense_msgs_INCLUDE_DIRS} + ${common_include_dirs} +) -ament_auto_add_library(nebula_hw_interfaces_continental SHARED - src/nebula_continental_hw_interfaces/continental_ars548_hw_interface.cpp - ) +add_library(nebula_hw_interfaces_continental SHARED + src/nebula_continental_hw_interfaces/continental_ars548_hw_interface.cpp + src/nebula_continental_hw_interfaces/multi_continental_ars548_hw_interface.cpp +) +target_link_libraries(nebula_hw_interfaces_continental PUBLIC + ${boost_udp_driver_LIBRARIES} + ${nebula_msgs_TARGETS} + ${common_targets} +) +target_include_directories(nebula_hw_interfaces_continental PUBLIC + ${boost_udp_driver_INCLUDE_DIRS} + ${nebula_msgs_INCLUDE_DIRS} + ${common_include_dirs} +) +install(TARGETS nebula_hw_interfaces_hesai EXPORT export_nebula_hw_interfaces_hesai) +install(TARGETS nebula_hw_interfaces_velodyne EXPORT export_nebula_hw_interfaces_velodyne) +install(TARGETS nebula_hw_interfaces_robosense EXPORT export_nebula_hw_interfaces_robosense) +install(TARGETS nebula_hw_interfaces_continental EXPORT export_nebula_hw_interfaces_continental) +install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME}) if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() endif() -ament_auto_package() +ament_export_include_directories("include/${PROJECT_NAME}") +ament_export_targets(export_nebula_hw_interfaces_hesai) +ament_export_targets(export_nebula_hw_interfaces_velodyne) +ament_export_targets(export_nebula_hw_interfaces_robosense) +ament_export_targets(export_nebula_hw_interfaces_continental) + +# Need to consider this +ament_export_dependencies( + PCL + boost_tcp_driver + boost_udp_driver + nebula_common + nebula_msgs + pandar_msgs + rcl + rclcpp + rclcpp_components + robosense_msgs + sensor_msgs + velodyne_msgs +) + + +#ament_auto_package() trying it without +ament_package() diff --git a/nebula_ros/CMakeLists.txt b/nebula_ros/CMakeLists.txt index c8723cabb..639ba79f3 100644 --- a/nebula_ros/CMakeLists.txt +++ b/nebula_ros/CMakeLists.txt @@ -3,7 +3,7 @@ project(nebula_ros) find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() +#ament_auto_find_build_dependencies() # Default to C++17 if (NOT CMAKE_CXX_STANDARD) @@ -14,93 +14,427 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic -Wunused-function) endif () -find_package(PCL REQUIRED) +find_package(PCL REQUIRED components common) +find_package(continental_msgs REQUIRED) +find_package(continental_srvs REQUIRED) find_package(pcl_conversions REQUIRED) find_package(diagnostic_msgs REQUIRED) find_package(diagnostic_updater REQUIRED) find_package(nebula_common REQUIRED) find_package(nebula_decoders REQUIRED) find_package(nebula_hw_interfaces REQUIRED) -find_package(yaml-cpp REQUIRED) -find_package(robosense_msgs REQUIRED) find_package(nebula_msgs REQUIRED) -find_package(pandar_msgs REQUIRED) +find_package(radar_msgs REQUIRED) +find_package(rclcpp_components REQUIRED) +find_package(robosense_msgs REQUIRED) +find_package(tf2_eigen REQUIRED) +find_package(tf2_msgs REQUIRED) +find_package(tf2_ros REQUIRED) +find_package(visualization_msgs REQUIRED) +find_package(yaml-cpp REQUIRED) + +#get_cmake_property(_variableNames VARIABLES) +#foreach(_variableName ${_variableNames}) +# message(STATUS "${_variableName}=${${_variableName}}") +#endforeach() + +message(STATUS "continental_msgs_LIBRARIES:" ${continental_msgs_LIBRARIES}) +message(STATUS "continental_srvs_LIBRARIES: " ${continental_srvs_LIBRARIES}) +message(STATUS "nebula_hw_interfaces_LIBRARIES: " ${nebula_hw_interfaces_LIBRARIES}) +message(STATUS "nebula_decoders_LIBRARIES: " ${nebula_decoders_LIBRARIES}) +message(STATUS "nebula_msgs_LIBRARIES: " ${nebula_msgs_LIBRARIES}) +message(STATUS "PCL_LIBRARIES: " ${PCL_LIBRARIES}) +message(STATUS "radar_msgs_LIBRARIES: " ${radar_msgs_LIBRARIES}) +message(STATUS "rclcpp_LIBRARIES: " ${rclcpp_LIBRARIES}) +message(STATUS "rcl_LIBRARIES: " ${rcl_LIBRARIES}) +message(STATUS "rclcpp_components_LIBRARIES: " ${rclcpp_components_LIBRARIES}) +message(STATUS "tf2_eigen_LIBRARIES: " ${tf2_eigen_LIBRARIES}) +message(STATUS "tf2_msgs_LIBRARIES: " ${tf2_msgs_LIBRARIES}) +message(STATUS "====nebula_decoders::nebula_decoders_continental: " nebula_decoders::nebula_decoders_continental) +message(STATUS "diagnostic_updater_TARGETS: ${diagnostic_updater_TARGETS}") +message(STATUS "diagnostic_updater_LIBRARIES: ${diagnostic_updater_LIBRARIES}") +message(STATUS "diagnostic_updater_INCLUDE_DIRS: ${diagnostic_updater_INCLUDE_DIRS}") + +#get_target_property(linked_libs nebula_decoders::nebula_decoders_continental INTERFACE_LINK_LIBRARIES) +#message(STATUS "Libraries linked by MyPackage::Comp1: ${linked_libs}") + +message(STATUS " --- rcl_INCLUDE_DIRS : ${rcl_INCLUDE_DIRS}") +message(STATUS " --- rclcpp_INCLUDE_DIRS : ${rclcpp_INCLUDE_DIRS}") +message(STATUS " --- rclcpp_components_INCLUDE_DIRS : ${rclcpp_components_INCLUDE_DIRS}") +message(STATUS " --- nebula_decoders_INCLUDE_DIRS : ${nebula_decoders_INCLUDE_DIRS}") +message(STATUS " --- nebula_hw_interfaces_INCLUDE_DIRS : ${nebula_hw_interfaces_INCLUDE_DIRS}") include_directories( - include - SYSTEM - ${YAML_CPP_INCLUDE_DIRS} - ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} + include + SYSTEM + ${nebula_common_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} + ${PCL_INCLUDE_DIRS} + ${PCL_COMMON_INCLUDE_DIRS} + #${rcl_INCLUDE_DIRS} + #${rclcpp_INCLUDE_DIRS} + ${rclcpp_components_INCLUDE_DIRS} +) +#link_libraries(${YAML_CPP_LIBRARIES} ${PCL_LIBRARIES}) + +link_libraries( + ${nebula_common_TARGETS} + ${rcl_TARGETS} + ${rclcpp_TARGETS} + # Consider rclcpp_components::component ) -link_libraries(${YAML_CPP_LIBRARIES} ${PCL_LIBRARIES}) + + + ## Hesai -ament_auto_add_library(hesai_ros_wrapper SHARED - src/hesai/hesai_ros_wrapper.cpp - src/hesai/decoder_wrapper.cpp - src/hesai/hw_interface_wrapper.cpp - src/hesai/hw_monitor_wrapper.cpp - src/common/parameter_descriptors.cpp - ) +# Hw Interface +add_library(hesai_hw_ros_wrapper SHARED + src/hesai/hesai_hw_interface_ros_wrapper.cpp +) +target_link_libraries(hesai_hw_ros_wrapper PUBLIC + ${pandar_msgs_TARGETS} + nebula_hw_interfaces::nebula_hw_interfaces_hesai +) +target_include_directories(hesai_hw_ros_wrapper PUBLIC + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${pandar_msgs_INCLUDE_DIRS} +) -rclcpp_components_register_node(hesai_ros_wrapper - PLUGIN "HesaiRosWrapper" - EXECUTABLE hesai_ros_wrapper_node - ) +rclcpp_components_register_node(hesai_hw_ros_wrapper + PLUGIN "HesaiHwInterfaceRosWrapper" + EXECUTABLE hesai_hw_interface_ros_wrapper_node +) + +# Monitor +add_library(hesai_hw_monitor_ros_wrapper SHARED + src/hesai/hesai_hw_monitor_ros_wrapper.cpp +) +target_link_libraries(hesai_hw_monitor_ros_wrapper PUBLIC + ${diagnostic_msgs_TARGETS} + ${diagnostic_updater_TARGETS} + ${pandar_msgs_TARGETS} + nebula_hw_interfaces::nebula_hw_interfaces_hesai +) +target_include_directories(hesai_hw_monitor_ros_wrapper PUBLIC + ${diagnostic_updater_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${pandar_msgs_INCLUDE_DIRS} +) + +rclcpp_components_register_node(hesai_hw_monitor_ros_wrapper + PLUGIN "HesaiHwMonitorRosWrapper" + EXECUTABLE hesai_hw_monitor_ros_wrapper_node +) + +# DriverDecoder +add_library(hesai_driver_ros_wrapper SHARED + src/hesai/hesai_decoder_ros_wrapper.cpp +) +target_link_libraries(hesai_driver_ros_wrapper PUBLIC + ${pandar_msgs_TARGETS} + nebula_decoders::nebula_decoders_hesai + nebula_hw_interfaces::nebula_hw_interfaces_hesai +) +target_include_directories(hesai_driver_ros_wrapper PUBLIC + ${nebula_decoders_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${pandar_msgs_INCLUDE_DIRS} +) + +rclcpp_components_register_node(hesai_driver_ros_wrapper + PLUGIN "HesaiDriverRosWrapper" + EXECUTABLE hesai_driver_ros_wrapper_node +) ## Velodyne -ament_auto_add_library(velodyne_ros_wrapper SHARED - src/velodyne/velodyne_ros_wrapper.cpp - src/velodyne/decoder_wrapper.cpp - src/velodyne/hw_interface_wrapper.cpp - src/velodyne/hw_monitor_wrapper.cpp - src/common/parameter_descriptors.cpp - ) +# Hw Interface +add_library(velodyne_hw_ros_wrapper SHARED + src/velodyne/velodyne_hw_interface_ros_wrapper.cpp +) +target_link_libraries(velodyne_hw_ros_wrapper PUBLIC + ${velodyne_msgs_TARGETS} + nebula_hw_interfaces::nebula_hw_interfaces_velodyne +) +target_include_directories(velodyne_hw_ros_wrapper PUBLIC + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${velodyne_msgs_INCLUDE_DIRS} +) + +rclcpp_components_register_node(velodyne_hw_ros_wrapper + PLUGIN "VelodyneHwInterfaceRosWrapper" + EXECUTABLE velodyne_hw_ros_wrapper_node +) + + +# Monitor +add_library(velodyne_hw_monitor_ros_wrapper SHARED + src/velodyne/velodyne_hw_monitor_ros_wrapper.cpp +) +target_link_libraries(velodyne_hw_monitor_ros_wrapper PUBLIC + ${diagnostic_updater_TARGETS} + ${diagnostic_msgs_TARGETS} + ${velodyne_msgs_TARGETS} + nebula_hw_interfaces::nebula_hw_interfaces_velodyne +) +target_include_directories(velodyne_hw_monitor_ros_wrapper PUBLIC + ${diagnostic_updater_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${velodyne_msgs_INCLUDE_DIRS} +) + +rclcpp_components_register_node(velodyne_hw_monitor_ros_wrapper + PLUGIN "VelodyneHwMonitorRosWrapper" + EXECUTABLE velodyne_hw_monitor_ros_wrapper_node +) + +# DriverDecoder +add_library(velodyne_driver_ros_wrapper SHARED + src/velodyne/velodyne_decoder_ros_wrapper.cpp +) +target_link_libraries(velodyne_driver_ros_wrapper PUBLIC + ${velodyne_msgs_TARGETS} + nebula_decoders::nebula_decoders_velodyne + nebula_hw_interfaces::nebula_hw_interfaces_velodyne +) +target_include_directories(velodyne_driver_ros_wrapper PUBLIC + ${nebula_decoders_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${velodyne_msgs_INCLUDE_DIRS} +) + +rclcpp_components_register_node(velodyne_driver_ros_wrapper + PLUGIN "VelodyneDriverRosWrapper" + EXECUTABLE velodyne_driver_ros_wrapper_node +) -rclcpp_components_register_node(velodyne_ros_wrapper - PLUGIN "VelodyneRosWrapper" - EXECUTABLE velodyne_ros_wrapper_node - ) ## Robosense # Hw Interface -ament_auto_add_library(robosense_ros_wrapper SHARED - src/robosense/robosense_ros_wrapper.cpp - src/robosense/decoder_wrapper.cpp - src/robosense/hw_interface_wrapper.cpp - src/robosense/hw_monitor_wrapper.cpp - src/common/parameter_descriptors.cpp - ) +add_library(robosense_hw_ros_wrapper SHARED + src/robosense/robosense_hw_interface_ros_wrapper.cpp +) +target_link_libraries(robosense_hw_ros_wrapper PUBLIC + ${robosense_msgs_TARGETS} + nebula_hw_interfaces::nebula_hw_interfaces_robosense +) +target_include_directories(robosense_hw_ros_wrapper PUBLIC + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${robosense_msgs_INCLUDE_DIRS} +) + +rclcpp_components_register_node(robosense_hw_ros_wrapper + PLUGIN "RobosenseHwInterfaceRosWrapper" + EXECUTABLE robosense_hw_interface_ros_wrapper_node +) + +# DriverDecoder +add_library(robosense_driver_ros_wrapper SHARED + src/robosense/robosense_decoder_ros_wrapper.cpp +) +target_link_libraries(robosense_driver_ros_wrapper PUBLIC + ${robosense_msgs_TARGETS} + nebula_decoders::nebula_decoders_robosense + nebula_hw_interfaces::nebula_hw_interfaces_robosense +) +target_include_directories(robosense_driver_ros_wrapper PUBLIC + ${nebula_decoders_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${robosense_msgs_INCLUDE_DIRS} +) + +rclcpp_components_register_node(robosense_driver_ros_wrapper + PLUGIN "RobosenseDriverRosWrapper" + EXECUTABLE robosense_driver_ros_wrapper_node +) + +# Monitor +add_library(robosense_hw_monitor_ros_wrapper SHARED + src/robosense/robosense_hw_monitor_ros_wrapper.cpp +) +target_link_libraries(robosense_hw_monitor_ros_wrapper PUBLIC + ${diagnostic_updater_TARGETS} + ${diagnostic_msgs_TARGETS} + ${robosense_msgs_TARGETS} + nebula_decoders::nebula_decoders_robosense + nebula_hw_interfaces::nebula_hw_interfaces_robosense +) +target_include_directories(robosense_hw_monitor_ros_wrapper PUBLIC + ${diagnostic_updater_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${robosense_msgs_INCLUDE_DIRS} +) + +rclcpp_components_register_node(robosense_hw_monitor_ros_wrapper + PLUGIN "RobosenseHwMonitorRosWrapper" + EXECUTABLE robosense_hw_monitor_ros_wrapper_node +) -rclcpp_components_register_node(robosense_ros_wrapper - PLUGIN "RobosenseRosWrapper" - EXECUTABLE robosense_ros_wrapper_node - ) ## Continental -ament_auto_add_library(continental_ars548_ros_wrapper SHARED - src/continental/continental_ars548_ros_wrapper.cpp - src/continental/continental_ars548_decoder_wrapper.cpp - src/continental/continental_ars548_hw_interface_wrapper.cpp - src/common/parameter_descriptors.cpp + +# Hw Interface +add_library(continental_ars548_hw_ros_wrapper SHARED + src/continental/continental_ars548_hw_interface_ros_wrapper.cpp +) +target_link_libraries(continental_ars548_hw_ros_wrapper PUBLIC + ${continental_msgs_TARGETS} + ${continental_srvs_TARGETS} + ${diagnostic_msgs_TARGETS} + ${nebula_msgs_TARGETS} + ${radar_msgs_TARGETS} + ${tf2_ros_TARGETS} + nebula_hw_interfaces::nebula_hw_interfaces_continental +) +target_include_directories(continental_ars548_hw_ros_wrapper PUBLIC + ${continental_msgs_INCLUDE_DIRS} + ${continental_srvs_INCLUDE_DIRS} + ${diagnostic_msgs_INCLUDE_DIRS} + ${nebula_msgs_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${radar_msgs_INCLUDE_DIRS} + ${tf2_ros_INCLUDE_DIRS} +) + +#ament_target_dependencies(continental_ars548_hw_ros_wrapper +# continental_msgs +# diagnostic_msgs +# nebula_msgs +# radar_msgs +#) + +rclcpp_components_register_node(continental_ars548_hw_ros_wrapper + PLUGIN "ContinentalARS548HwInterfaceRosWrapper" + EXECUTABLE continental_ars548_hw_interface_ros_wrapper_node ) -rclcpp_components_register_node(continental_ars548_ros_wrapper - PLUGIN "ContinentalARS548RosWrapper" - EXECUTABLE continental_ars548_ros_wrapper_node +add_library(multi_continental_ars548_hw_ros_wrapper SHARED + src/continental/multi_continental_ars548_hw_interface_ros_wrapper.cpp +) +target_link_libraries(multi_continental_ars548_hw_ros_wrapper PUBLIC + ${continental_msgs_TARGETS} + ${diagnostic_msgs_TARGETS} + ${nebula_msgs_TARGETS} + ${radar_msgs_TARGETS} + ${tf2_ros_TARGETS} + nebula_hw_interfaces::nebula_hw_interfaces_continental +) +target_include_directories(multi_continental_ars548_hw_ros_wrapper PUBLIC + ${continental_msgs_INCLUDE_DIRS} + ${diagnostic_msgs_INCLUDE_DIRS} + ${nebula_msgs_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${radar_msgs_INCLUDE_DIRS} + ${tf2_ros_INCLUDE_DIRS} +) + +# Consider changing lin libraries and include directories to ament_target_dependencies +#ament_target_dependencies(multi_continental_ars548_hw_ros_wrapper +# continental_msgs +# diagnostic_msgs +# nebula_msgs +# radar_msgs +#) + +rclcpp_components_register_node(multi_continental_ars548_hw_ros_wrapper + PLUGIN "MultiContinentalARS548HwInterfaceRosWrapper" + EXECUTABLE multi_continental_ars548_hw_interface_ros_wrapper_node ) +# DriverDecoder +add_library(continental_ars548_driver_ros_wrapper SHARED + src/continental/continental_ars548_decoder_ros_wrapper.cpp +) +target_link_libraries(continental_ars548_driver_ros_wrapper PUBLIC + ${continental_msgs_TARGETS} + ${diagnostic_msgs_TARGETS} + ${nebula_msgs_TARGETS} + ${radar_msgs_TARGETS} + ${tf2_ros_TARGETS} + ${visualization_msgs_TARGETS} + nebula_decoders::nebula_decoders_continental +) +target_include_directories(continental_ars548_driver_ros_wrapper PUBLIC + ${continental_msgs_INCLUDE_DIRS} + ${diagnostic_msgs_INCLUDE_DIRS} + ${nebula_msgs_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} + ${radar_msgs_INCLUDE_DIRS} + ${rclcpp_components_INCLUDE_DIRS} + ${tf2_ros_INCLUDE_DIRS} + ${visualization_msgs_INCLUDE_DIRS} +) + +rclcpp_components_register_node(continental_ars548_driver_ros_wrapper + PLUGIN "ContinentalARS548DriverRosWrapper" + EXECUTABLE continental_ars548_driver_ros_wrapper_node +) + +install(TARGETS hesai_hw_ros_wrapper EXPORT export_hesai_hw_ros_wrapper) +install(TARGETS hesai_hw_monitor_ros_wrapper EXPORT export_hesai_hw_monitor_ros_wrapper) +install(TARGETS hesai_driver_ros_wrapper EXPORT export_hesai_driver_ros_wrapper) +install(TARGETS velodyne_hw_ros_wrapper EXPORT export_velodyne_hw_ros_wrapper) +install(TARGETS velodyne_hw_monitor_ros_wrapper EXPORT export_velodyne_hw_monitor_ros_wrapper) +install(TARGETS velodyne_driver_ros_wrapper EXPORT export_velodyne_driver_ros_wrapper) +install(TARGETS robosense_hw_ros_wrapper EXPORT export_robosense_hw_ros_wrapper) +install(TARGETS robosense_hw_monitor_ros_wrapper EXPORT export_robosense_hw_monitor_ros_wrapper) +install(TARGETS robosense_driver_ros_wrapper EXPORT export_robosense_driver_ros_wrapper) +install(TARGETS continental_ars548_hw_ros_wrapper EXPORT export_continental_ars548_hw_ros_wrapper) +install(TARGETS multi_continental_ars548_hw_ros_wrapper EXPORT export_multi_continental_ars548_hw_ros_wrapper) +install(TARGETS continental_ars548_driver_ros_wrapper EXPORT export_continental_ars548_driver_ros_wrapper) +install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME}) + if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() endif() -ament_auto_package( - INSTALL_TO_SHARE - config - launch +ament_export_include_directories("include/${PROJECT_NAME}") +ament_export_targets(export_hesai_hw_ros_wrapper) +ament_export_targets(export_hesai_hw_monitor_ros_wrapper) +ament_export_targets(export_hesai_driver_ros_wrapper) +ament_export_targets(export_velodyne_hw_ros_wrapper) +ament_export_targets(export_velodyne_hw_monitor_ros_wrapper) +ament_export_targets(export_velodyne_driver_ros_wrapper) +ament_export_targets(export_robosense_hw_ros_wrapper) +ament_export_targets(export_robosense_hw_monitor_ros_wrapper) +ament_export_targets(export_robosense_driver_ros_wrapper) +ament_export_targets(export_continental_ars548_hw_ros_wrapper) +ament_export_targets(export_multi_continental_ars548_hw_ros_wrapper) +ament_export_targets(export_continental_ars548_driver_ros_wrapper) + +install( + DIRECTORY config launch + DESTINATION share/${PROJECT_NAME} ) +ament_export_dependencies( + PCL + continental_msgs + continental_srvs + diagnostic_msgs + diagnostic_updater + nebula_common + nebula_decoders + nebula_hw_interfaces + nebula_msgs + pandar_msgs + pcl_conversions + radar_msgs + rcl + rclcpp + rclcpp_components + robosense_msgs + sensor_msgs + tf2_ros + velodyne_msgs + visualization_msgs + yaml-cpp +) + +#ament_auto_package( +ament_package() + set(ROS_DISTRO $ENV{ROS_DISTRO}) if(${ROS_DISTRO} STREQUAL "rolling") add_compile_definitions(ROS_DISTRO_ROLLING) diff --git a/nebula_ros/package.xml b/nebula_ros/package.xml index a0bdec51f..90899350a 100644 --- a/nebula_ros/package.xml +++ b/nebula_ros/package.xml @@ -23,7 +23,7 @@ nebula_hw_interfaces nebula_msgs pandar_msgs - pcl_conversions + pcl_ros rclcpp rclcpp_components robosense_msgs diff --git a/nebula_tests/CMakeLists.txt b/nebula_tests/CMakeLists.txt index ac8943890..65743b6f6 100644 --- a/nebula_tests/CMakeLists.txt +++ b/nebula_tests/CMakeLists.txt @@ -3,7 +3,7 @@ project(nebula_tests) find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() +#ament_auto_find_build_dependencies() # Default to C++17 if (NOT CMAKE_CXX_STANDARD) @@ -26,14 +26,20 @@ elseif(${ROS_DISTRO} STREQUAL "humble") endif() -find_package(PCL REQUIRED) -find_package(rosbag2_cpp REQUIRED) -find_package(pcl_conversions REQUIRED) +find_package(PCL REQUIRED components common io) +find_package(continental_msgs REQUIRED) find_package(diagnostic_msgs REQUIRED) find_package(diagnostic_updater REQUIRED) find_package(nebula_common REQUIRED) find_package(nebula_decoders REQUIRED) find_package(nebula_hw_interfaces REQUIRED) +find_package(nebula_msgs REQUIRED) +find_package(nebula_ros REQUIRED) +find_package(pcl_conversions REQUIRED) +find_package(rclcpp REQUIRED) +find_package(rclcpp_components REQUIRED) +find_package(rosbag2_cpp REQUIRED) + if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) @@ -45,15 +51,62 @@ if(BUILD_TESTING) # TODO: FIX this path to point to nebula_decoders/calibration add_definitions(-D_SRC_CALIBRATION_DIR_PATH="${PROJECT_SOURCE_DIR}/../nebula_decoders/calibration/") - set(NEBULA_TEST_DEPENDENCIES - rclcpp - rosbag2_cpp - continental_msgs - nebula_msgs - pandar_msgs - velodyne_msgs - ) + set(NEBULA_TEST_INCLUDE_DIRS + ${continental_msgs_INCLUDE_DIRS} + ${diagnostic_msgs_INCLUDE_DIRS} + ${diagnostic_updater_INCLUDE_DIRS} + ${nebula_common_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${nebula_msgs_INCLUDE_DIRS} + ${nebula_ros_INCLUDE_DIRS} + ${pcl_conversions_INCLUDE_DIRS} + ${rclcpp_INCLUDE_DIRS} + ${rclcpp_components_INCLUDE_DIRS} + ${rosbag2_cpp_INCLUDE_DIRS} + ) + + set(NEBULA_TEST_LIBRARIES + #${continental_msgs_TARGETS} + ${diagnostic_msgs_TARGETS} + ${diagnostic_updater_TARGETS} + ${nebula_common_TARGETS} + #${nebula_decoders_TARGETS} + #${nebula_hw_interfaces_TARGETS} + #${nebula_msgs_TARGETS} + #${nebula_ros_TARGETS} + ${pcl_conversions_LIBRARIES} + ${rclcpp_TARGETS} + ${rclcpp_components_TARGETS} + ${rosbag2_cpp_TARGETS} + ) + + set(CONTINENTAL_TEST_LIBRARIES + ${NEBULA_TEST_LIBRARIES} + ${continental_msgs_TARGETS} + ${nebula_msgs_TARGETS} + nebula_hw_interfaces::nebula_hw_interfaces_continental + nebula_decoders::nebula_decoders_continental + ) + + set(HESAI_TEST_LIBRARIES + ${NEBULA_TEST_LIBRARIES} + nebula_hw_interfaces::nebula_hw_interfaces_hesai + nebula_decoders::nebula_decoders_hesai + ) + + set(VELODYNE_TEST_LIBRARIES + ${NEBULA_TEST_LIBRARIES} + nebula_hw_interfaces::nebula_hw_interfaces_velodyne + nebula_decoders::nebula_decoders_velodyne + ) + + message(STATUS "========== | NEBULA_TEST_LIBRARIES: ${NEBULA_TEST_LIBRARIES}") + #foreach(package ${NEBULA_TEST_DEPENDENCIES}) + # message(STATUS "LIBRARIES for ${package}: ${${package}_LIBRARIES}") + # message(STATUS "TARGETS for ${package}: ${${package}_TARGETS}") + #endforeach() add_subdirectory(continental) add_subdirectory(hesai) diff --git a/nebula_tests/continental/CMakeLists.txt b/nebula_tests/continental/CMakeLists.txt index 44daf8813..c8250bce5 100644 --- a/nebula_tests/continental/CMakeLists.txt +++ b/nebula_tests/continental/CMakeLists.txt @@ -1,20 +1,27 @@ # Continental ARS548 -ament_auto_add_library(continental_ros_decoder_test_ars548 SHARED -continental_ros_decoder_test_ars548.cpp - ) +add_library(continental_ros_decoder_test_ars548 SHARED + continental_ros_decoder_test_ars548.cpp +) + +target_include_directories(continental_ros_decoder_test_ars548 PUBLIC + ${NEBULA_TEST_INCLUDE_DIRS} +) + +target_link_libraries(continental_ros_decoder_test_ars548 + ${PCL_LIBRARIES} + ${CONTINENTAL_TEST_LIBRARIES} +) + ament_add_gtest(continental_ros_decoder_test_main_ars548 -continental_ros_decoder_test_main_ars548.cpp - ) -target_link_libraries(continental_ros_decoder_test_ars548 ${PCL_LIBRARIES} ${NEBULA_TEST_LIBRARIES}) + continental_ros_decoder_test_main_ars548.cpp +) -ament_target_dependencies(continental_ros_decoder_test_main_ars548 - ${NEBULA_TEST_DEPENDENCIES} - ) target_include_directories(continental_ros_decoder_test_main_ars548 PUBLIC - ${PROJECT_SOURCE_DIR}/src/continental - include - ) + ${PROJECT_SOURCE_DIR}/src/continental + include + ${NEBULA_TEST_INCLUDE_DIRS} +) target_link_libraries(continental_ros_decoder_test_main_ars548 - ${PCL_LIBRARIES} - continental_ros_decoder_test_ars548 - ) + ${PCL_LIBRARIES} + continental_ros_decoder_test_ars548 +) diff --git a/nebula_tests/hesai/CMakeLists.txt b/nebula_tests/hesai/CMakeLists.txt index 8a06fd07f..ffb49010c 100644 --- a/nebula_tests/hesai/CMakeLists.txt +++ b/nebula_tests/hesai/CMakeLists.txt @@ -1,22 +1,25 @@ -ament_auto_add_library(hesai_ros_decoder_test SHARED - hesai_ros_decoder_test.cpp - ) -target_link_libraries(hesai_ros_decoder_test ${PCL_LIBRARIES} ${NEBULA_TEST_LIBRARIES}) -ament_add_gtest(hesai_ros_decoder_test_main - hesai_ros_decoder_test_main.cpp - ) +add_library(hesai_ros_decoder_test SHARED + hesai_ros_decoder_test.cpp +) +target_include_directories(hesai_ros_decoder_test PUBLIC + ${NEBULA_TEST_INCLUDE_DIRS} +) +target_link_libraries(hesai_ros_decoder_test + ${PCL_LIBRARIES} + ${HESAI_TEST_LIBRARIES}) -ament_target_dependencies(hesai_ros_decoder_test_main - ${NEBULA_TEST_DEPENDENCIES} - ) +ament_add_gtest(hesai_ros_decoder_test_main + hesai_ros_decoder_test_main.cpp +) target_include_directories(hesai_ros_decoder_test_main PUBLIC - ${PROJECT_SOURCE_DIR}/src/hesai - include - ) + ${PROJECT_SOURCE_DIR}/src/hesai + include + ${NEBULA_TEST_INCLUDE_DIRS} +) target_link_libraries(hesai_ros_decoder_test_main - ${PCL_LIBRARIES} - hesai_ros_decoder_test - ) + ${PCL_LIBRARIES} + hesai_ros_decoder_test +) diff --git a/nebula_tests/velodyne/CMakeLists.txt b/nebula_tests/velodyne/CMakeLists.txt index f166997bd..ed4522ee6 100644 --- a/nebula_tests/velodyne/CMakeLists.txt +++ b/nebula_tests/velodyne/CMakeLists.txt @@ -1,62 +1,82 @@ # Velodyne VLP16 -ament_auto_add_library(velodyne_ros_decoder_test_vlp16 SHARED - velodyne_ros_decoder_test_vlp16.cpp - ) -target_link_libraries(velodyne_ros_decoder_test_vlp16 ${PCL_LIBRARIES} ${NEBULA_TEST_LIBRARIES}) + +add_library(velodyne_ros_decoder_test_vlp16 SHARED + velodyne_ros_decoder_test_vlp16.cpp +) +target_include_directories(velodyne_ros_decoder_test_vlp16 PUBLIC + ${NEBULA_TEST_INCLUDE_DIRS} +) +target_link_libraries(velodyne_ros_decoder_test_vlp16 + ${PCL_LIBRARIES} + ${VELODYNE_TEST_LIBRARIES}) ament_add_gtest(velodyne_ros_decoder_test_main_vlp16 - velodyne_ros_decoder_test_main_vlp16.cpp - ) + velodyne_ros_decoder_test_main_vlp16.cpp +) ament_target_dependencies(velodyne_ros_decoder_test_main_vlp16 - ${NEBULA_TEST_DEPENDENCIES} - ) + ${NEBULA_TEST_DEPENDENCIES} +) target_include_directories(velodyne_ros_decoder_test_main_vlp16 PUBLIC - ${PROJECT_SOURCE_DIR}/src/velodyne - include - ) + ${PROJECT_SOURCE_DIR}/src/velodyne + include + ${NEBULA_TEST_INCLUDE_DIRS} +) target_link_libraries(velodyne_ros_decoder_test_main_vlp16 - ${PCL_LIBRARIES} - velodyne_ros_decoder_test_vlp16 - ) + ${PCL_LIBRARIES} + velodyne_ros_decoder_test_vlp16 +) # Velodyne VLS128 -ament_auto_add_library(velodyne_ros_decoder_test_vls128 SHARED - velodyne_ros_decoder_test_vls128.cpp - ) +add_library(velodyne_ros_decoder_test_vls128 SHARED + velodyne_ros_decoder_test_vls128.cpp +) +target_include_directories(velodyne_ros_decoder_test_vls128 PUBLIC + ${NEBULA_TEST_INCLUDE_DIRS} +) ament_add_gtest(velodyne_ros_decoder_test_main_vls128 - velodyne_ros_decoder_test_main_vls128.cpp - ) -target_link_libraries(velodyne_ros_decoder_test_vls128 ${PCL_LIBRARIES} ${NEBULA_TEST_LIBRARIES}) + velodyne_ros_decoder_test_main_vls128.cpp +) +target_link_libraries(velodyne_ros_decoder_test_vls128 + ${PCL_LIBRARIES} + ${VELODYNE_TEST_LIBRARIES}) -ament_target_dependencies(velodyne_ros_decoder_test_main_vls128 - ${NEBULA_TEST_DEPENDENCIES} - ) +#ament_target_dependencies(velodyne_ros_decoder_test_main_vls128 +# ${NEBULA_TEST_DEPENDENCIES} +#) target_include_directories(velodyne_ros_decoder_test_main_vls128 PUBLIC - ${PROJECT_SOURCE_DIR}/src/velodyne - include - ) + ${PROJECT_SOURCE_DIR}/src/velodyne + include + ${NEBULA_TEST_INCLUDE_DIRS} +) target_link_libraries(velodyne_ros_decoder_test_main_vls128 - ${PCL_LIBRARIES} - velodyne_ros_decoder_test_vls128 - ) + ${PCL_LIBRARIES} + velodyne_ros_decoder_test_vls128 +) # Velodyne VLP32 -ament_auto_add_library(velodyne_ros_decoder_test_vlp32 SHARED -velodyne_ros_decoder_test_vlp32.cpp +add_library(velodyne_ros_decoder_test_vlp32 SHARED + velodyne_ros_decoder_test_vlp32.cpp +) +target_include_directories(velodyne_ros_decoder_test_vlp32 PUBLIC + ${NEBULA_TEST_INCLUDE_DIRS} +) +target_link_libraries(velodyne_ros_decoder_test_vlp32 + ${PCL_LIBRARIES} + ${VELODYNE_TEST_LIBRARIES} ) -target_link_libraries(velodyne_ros_decoder_test_vlp32 ${PCL_LIBRARIES} ${NEBULA_TEST_LIBRARIES}) ament_add_gtest(velodyne_ros_decoder_test_main_vlp32 -velodyne_ros_decoder_test_main_vlp32.cpp -) -ament_target_dependencies(velodyne_ros_decoder_test_main_vlp32 -${NEBULA_TEST_DEPENDENCIES} + velodyne_ros_decoder_test_main_vlp32.cpp ) +#ament_target_dependencies(velodyne_ros_decoder_test_main_vlp32 +# ${NEBULA_TEST_DEPENDENCIES} +#) target_include_directories(velodyne_ros_decoder_test_main_vlp32 PUBLIC -${PROJECT_SOURCE_DIR}/src/velodyne -include + ${PROJECT_SOURCE_DIR}/src/velodyne + include + ${NEBULA_TEST_INCLUDE_DIRS} ) target_link_libraries(velodyne_ros_decoder_test_main_vlp32 -${PCL_LIBRARIES} -velodyne_ros_decoder_test_vlp32 -) \ No newline at end of file + ${PCL_LIBRARIES} + velodyne_ros_decoder_test_vlp32 +) From 9d53eaef47f1556dea89fc8f204299b6394b5db8 Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Tue, 14 May 2024 19:43:15 +0900 Subject: [PATCH 2/6] fix: fixed robosense symbols Signed-off-by: Kenzo Lobos-Tsunekawa --- nebula_decoders/CMakeLists.txt | 16 +++++++++++++++- .../robosense_info_driver.hpp | 6 +++--- nebula_ros/CMakeLists.txt | 1 + 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/nebula_decoders/CMakeLists.txt b/nebula_decoders/CMakeLists.txt index 20284bbb8..3d5435a40 100644 --- a/nebula_decoders/CMakeLists.txt +++ b/nebula_decoders/CMakeLists.txt @@ -90,7 +90,7 @@ target_include_directories(nebula_decoders_velodyne PUBLIC # Robosense add_library(nebula_decoders_robosense SHARED -src/nebula_decoders_robosense/robosense_driver.cpp + src/nebula_decoders_robosense/robosense_driver.cpp ) target_link_libraries(nebula_decoders_robosense PUBLIC ${robosense_msgs_TARGETS} @@ -101,6 +101,18 @@ target_include_directories(nebula_decoders_robosense PUBLIC ${common_include_dirs} ) +add_library(nebula_decoders_robosense_info SHARED + src/nebula_decoders_robosense/robosense_info_driver.cpp +) +target_link_libraries(nebula_decoders_robosense_info PUBLIC + ${robosense_msgs_TARGETS} + ${common_targets} +) +target_include_directories(nebula_decoders_robosense_info PUBLIC + ${robosense_msgs_INCLUDE_DIRS} + ${common_include_dirs} +) + # Continental add_library(nebula_decoders_continental SHARED src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp @@ -127,6 +139,7 @@ target_include_directories(nebula_decoders_continental PUBLIC install(TARGETS nebula_decoders_hesai EXPORT export_nebula_decoders_hesai) install(TARGETS nebula_decoders_velodyne EXPORT export_nebula_decoders_velodyne) install(TARGETS nebula_decoders_robosense EXPORT export_nebula_decoders_robosense) +install(TARGETS nebula_decoders_robosense_info EXPORT export_nebula_decoders_robosense_info) install(TARGETS nebula_decoders_continental EXPORT export_nebula_decoders_continental) install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME}) @@ -139,6 +152,7 @@ ament_export_include_directories("include/${PROJECT_NAME}") ament_export_targets(export_nebula_decoders_hesai) ament_export_targets(export_nebula_decoders_velodyne) ament_export_targets(export_nebula_decoders_robosense) +ament_export_targets(export_nebula_decoders_robosense_info) ament_export_targets(export_nebula_decoders_continental) install( diff --git a/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/robosense_info_driver.hpp b/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/robosense_info_driver.hpp index a3b6d6d81..706d7942e 100644 --- a/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/robosense_info_driver.hpp +++ b/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/robosense_info_driver.hpp @@ -12,14 +12,14 @@ #include "nebula_decoders/nebula_decoders_robosense/decoders/robosense_info_decoder.hpp" #include "nebula_decoders/nebula_decoders_robosense/decoders/robosense_info_decoder_base.hpp" -#include "pandar_msgs/msg/pandar_packet.hpp" -#include "pandar_msgs/msg/pandar_scan.hpp" - #include #include +#include +#include #include #include +#include namespace nebula { diff --git a/nebula_ros/CMakeLists.txt b/nebula_ros/CMakeLists.txt index 639ba79f3..0e8bdc2e0 100644 --- a/nebula_ros/CMakeLists.txt +++ b/nebula_ros/CMakeLists.txt @@ -234,6 +234,7 @@ add_library(robosense_driver_ros_wrapper SHARED target_link_libraries(robosense_driver_ros_wrapper PUBLIC ${robosense_msgs_TARGETS} nebula_decoders::nebula_decoders_robosense + nebula_decoders::nebula_decoders_robosense_info nebula_hw_interfaces::nebula_hw_interfaces_robosense ) target_include_directories(robosense_driver_ros_wrapper PUBLIC From 72f0b08af44de87a14aaa0827fa4346074e3fa1b Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Tue, 14 May 2024 20:02:04 +0900 Subject: [PATCH 3/6] fix: fixed robosense hw monitor's cmake Signed-off-by: Kenzo Lobos-Tsunekawa --- nebula_ros/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/nebula_ros/CMakeLists.txt b/nebula_ros/CMakeLists.txt index 0e8bdc2e0..9df319620 100644 --- a/nebula_ros/CMakeLists.txt +++ b/nebula_ros/CMakeLists.txt @@ -257,6 +257,7 @@ target_link_libraries(robosense_hw_monitor_ros_wrapper PUBLIC ${diagnostic_msgs_TARGETS} ${robosense_msgs_TARGETS} nebula_decoders::nebula_decoders_robosense + nebula_decoders::nebula_decoders_robosense_info nebula_hw_interfaces::nebula_hw_interfaces_robosense ) target_include_directories(robosense_hw_monitor_ros_wrapper PUBLIC From dca4fb8ac6f3ee65b897dcdae0eee99876948469 Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Thu, 6 Jun 2024 19:53:33 +0900 Subject: [PATCH 4/6] chore: applied changed needed after the rebase, deleted debug code, and cleaned unused parts Signed-off-by: Kenzo Lobos-Tsunekawa --- nebula_common/CMakeLists.txt | 9 +- nebula_decoders/CMakeLists.txt | 33 +- nebula_decoders/package.xml | 2 +- nebula_examples/CMakeLists.txt | 45 +-- .../hesai_ros_offline_extract_bag_pcd.hpp | 1 - .../hesai/hesai_ros_offline_extract_pcd.hpp | 1 - .../velodyne_ros_offline_extract_bag_pcd.hpp | 1 - nebula_examples/package.xml | 9 - .../src/common/parameter_descriptors.cpp | 34 ++ nebula_hw_interfaces/CMakeLists.txt | 67 +--- nebula_hw_interfaces/package.xml | 3 - nebula_ros/CMakeLists.txt | 364 ++++-------------- nebula_ros/package.xml | 3 - nebula_tests/CMakeLists.txt | 52 +-- nebula_tests/continental/CMakeLists.txt | 2 - .../continental_ros_decoder_test_ars548.hpp | 5 +- nebula_tests/hesai/CMakeLists.txt | 2 - nebula_tests/hesai/hesai_common.hpp | 6 +- nebula_tests/hesai/hesai_ros_decoder_test.hpp | 2 - nebula_tests/package.xml | 10 - nebula_tests/velodyne/CMakeLists.txt | 12 +- .../velodyne_ros_decoder_test_vlp16.hpp | 2 - .../velodyne_ros_decoder_test_vlp32.hpp | 2 - .../velodyne_ros_decoder_test_vls128.hpp | 2 - 24 files changed, 152 insertions(+), 517 deletions(-) create mode 100644 nebula_examples/src/common/parameter_descriptors.cpp diff --git a/nebula_common/CMakeLists.txt b/nebula_common/CMakeLists.txt index 67d573198..2e4be4f14 100644 --- a/nebula_common/CMakeLists.txt +++ b/nebula_common/CMakeLists.txt @@ -24,11 +24,10 @@ if(BUILD_TESTING) endif() include_directories( - include - SYSTEM - ${YAML_CPP_INCLUDE_DIRS} - ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} + include + SYSTEM + ${YAML_CPP_INCLUDE_DIRS} + ${PCL_INCLUDE_DIRS} ) link_libraries( diff --git a/nebula_decoders/CMakeLists.txt b/nebula_decoders/CMakeLists.txt index 3d5435a40..a271b5bb8 100644 --- a/nebula_decoders/CMakeLists.txt +++ b/nebula_decoders/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 3.14) project(nebula_decoders) -find_package(ament_cmake_auto REQUIRED) - -#ament_auto_find_build_dependencies() - # Default to C++17 if (NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) @@ -14,9 +10,9 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic -Wunused-function) endif () -find_package(PCL REQUIRED COMPONENTS common) -#find_package(pcl_conversions REQUIRED) +find_package(ament_cmake_auto REQUIRED) +find_package(PCL REQUIRED COMPONENTS common) find_package(angles REQUIRED) find_package(continental_msgs REQUIRED) find_package(diagnostic_msgs REQUIRED) @@ -24,7 +20,6 @@ find_package(nebula_common REQUIRED) find_package(nebula_msgs REQUIRED) find_package(pandar_msgs REQUIRED) find_package(pcl_conversions REQUIRED) -find_package(radar_msgs REQUIRED) find_package(rclcpp REQUIRED) find_package(robosense_msgs REQUIRED) find_package(sensor_msgs REQUIRED) @@ -34,23 +29,18 @@ find_package(yaml-cpp REQUIRED) include_directories(PUBLIC include SYSTEM -) - -set(common_include_dirs ${nebula_common_INCLUDE_DIRS} ${YAML_CPP_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} ${pcl_conversions_INCLUDE_DIRS} - ${rcl_INCLUDE_DIRS} ${rclcpp_INCLUDE_DIRS} ${sensor_msgs_INCLUDE_DIRS} ) -set(common_targets +link_libraries( ${nebula_common_TARGETS} + ${PCL_LIBRARIES} ${pcl_conversions_LIBRARIES} - ${rcl_TARGETS} ${rclcpp_TARGETS} ${sensor_msgs_TARGETS} ) @@ -62,12 +52,10 @@ add_library(nebula_decoders_hesai SHARED ) target_link_libraries(nebula_decoders_hesai PUBLIC ${pandar_msgs_TARGETS} - ${common_targets} ) target_include_directories(nebula_decoders_hesai PUBLIC ${pandar_msgs_INCLUDE_DIRS} - ${common_include_dirs} ) # Velodyne @@ -80,12 +68,10 @@ add_library(nebula_decoders_velodyne SHARED target_link_libraries(nebula_decoders_velodyne PUBLIC ${angles_msgs_TARGETS} ${velodyne_msgs_TARGETS} - ${common_targets} ) target_include_directories(nebula_decoders_velodyne PUBLIC ${angles_INCLUDE_DIRS} ${velodyne_msgs_INCLUDE_DIRS} - ${common_include_dirs} ) # Robosense @@ -94,11 +80,9 @@ add_library(nebula_decoders_robosense SHARED ) target_link_libraries(nebula_decoders_robosense PUBLIC ${robosense_msgs_TARGETS} - ${common_targets} ) target_include_directories(nebula_decoders_robosense PUBLIC ${robosense_msgs_INCLUDE_DIRS} - ${common_include_dirs} ) add_library(nebula_decoders_robosense_info SHARED @@ -106,11 +90,9 @@ add_library(nebula_decoders_robosense_info SHARED ) target_link_libraries(nebula_decoders_robosense_info PUBLIC ${robosense_msgs_TARGETS} - ${common_targets} ) target_include_directories(nebula_decoders_robosense_info PUBLIC ${robosense_msgs_INCLUDE_DIRS} - ${common_include_dirs} ) # Continental @@ -123,8 +105,6 @@ target_link_libraries(nebula_decoders_continental PUBLIC ${boost_udp_driver_TARGETS} ${nebula_common_TARGETS} ${nebula_msgs_TARGETS} - ${radar_msgs_TARGETS} - ${common_targets} ) target_include_directories(nebula_decoders_continental PUBLIC ${continental_msgs_INCLUDE_DIRS} @@ -132,8 +112,6 @@ target_include_directories(nebula_decoders_continental PUBLIC ${boost_udp_driver_INCLUDE_DIRS} ${nebula_common_INCLUDE_DIRS} ${nebula_msgs_INCLUDE_DIRS} - ${radar_msgs_INCLUDE_DIRS} - ${common_include_dirs} ) install(TARGETS nebula_decoders_hesai EXPORT export_nebula_decoders_hesai) @@ -169,10 +147,7 @@ ament_export_dependencies( nebula_common nebula_msgs pandar_msgs - radar_msgs - rcl rclcpp - rclcpp_components robosense_msgs sensor_msgs velodyne_msgs diff --git a/nebula_decoders/package.xml b/nebula_decoders/package.xml index 462f3956e..b13b29d56 100644 --- a/nebula_decoders/package.xml +++ b/nebula_decoders/package.xml @@ -20,7 +20,7 @@ nebula_msgs pandar_msgs pcl_conversions - radar_msgs + rclcpp robosense_msgs sensor_msgs velodyne_msgs diff --git a/nebula_examples/CMakeLists.txt b/nebula_examples/CMakeLists.txt index 7e206e591..311105e30 100644 --- a/nebula_examples/CMakeLists.txt +++ b/nebula_examples/CMakeLists.txt @@ -11,44 +11,35 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() find_package(ament_cmake_auto REQUIRED) +find_package(nebula_common REQUIRED) find_package(nebula_decoders REQUIRED) -find_package(nebula_hw_interfaces REQUIRED) find_package(nebula_ros REQUIRED) -find_package(nebula_common REQUIRED) -find_package(PCL REQUIRED COMPONENTS common) -find_package(pcl_conversions REQUIRED) -find_package(rclcpp REQUIRED) +find_package(PCL REQUIRED COMPONENTS common io) find_package(rosbag2_cpp REQUIRED) find_package(yaml-cpp REQUIRED) -#ament_auto_find_build_dependencies() - include_directories( include SYSTEM + ${nebula_common_INCLUDE_DIRS} ${nebula_decoders_INCLUDE_DIRS} ${nebula_ros_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} ${rosbag2_cpp_INCLUDE_DIRS} ${YAML_CPP_INCLUDE_DIRS} ) -message(STATUS "rosbag_cpp_INCLUDE_DIRS: ${rosbag2_cpp_INCLUDE_DIRS}") -message(STATUS "rosbag_cpp_LIBRARIES: ${rosbag2_cpp_LIBRARIES}") -message(STATUS "rosbag_cpp_TARGETS: ${rosbag2_cpp_TARGETS}") - link_libraries( + ${nebula_common_TARGETS} ${rosbag2_cpp_TARGETS} ${PCL_LIBRARIES} ) -message(STATUS "nebula_ros_INCLUDE_DIRS: ${nebula_ros_INCLUDE_DIRS}") - -## HESAI +## Hesai # Offline Lib add_library(hesai_ros_offline_extract_pcd SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/hesai/hesai_ros_offline_extract_pcd.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/common/parameter_descriptors.cpp ) target_link_libraries(hesai_ros_offline_extract_pcd PUBLIC nebula_decoders::nebula_decoders_hesai @@ -65,6 +56,7 @@ target_link_libraries(hesai_ros_offline_extract_pcd_node PUBLIC # Extraction for TEST Lib add_library(hesai_ros_offline_extract_bag_pcd SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/hesai/hesai_ros_offline_extract_bag_pcd.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/common/parameter_descriptors.cpp ) target_link_libraries(hesai_ros_offline_extract_bag_pcd PUBLIC nebula_decoders::nebula_decoders_hesai @@ -95,35 +87,24 @@ target_link_libraries(velodyne_ros_offline_extract_bag_pcd_node PUBLIC velodyne_ros_offline_extract_bag_pcd ) - -#ament_auto_add_library(velodyne_ros_offline_extract_bag_pcd SHARED -# ${CMAKE_CURRENT_SOURCE_DIR}/src/velodyne/velodyne_ros_offline_extract_bag_pcd.cpp -#) -#target_link_libraries(velodyne_ros_offline_extract_bag_pcd ${PCL_LIBRARIES}) -#ament_auto_add_executable(velodyne_ros_offline_extract_bag_pcd_node -# ${CMAKE_CURRENT_SOURCE_DIR}/src/velodyne/velodyne_ros_offline_extract_bag_pcd_main.cpp -#) - - - if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() endif() ament_auto_package( - INSTALL_TO_SHARE - launch + INSTALL_TO_SHARE + launch ) # Set ROS_DISTRO macros set(ROS_DISTRO $ENV{ROS_DISTRO}) if(${ROS_DISTRO} STREQUAL "rolling") -add_compile_definitions(ROS_DISTRO_ROLLING) + add_compile_definitions(ROS_DISTRO_ROLLING) elseif(${ROS_DISTRO} STREQUAL "foxy") -add_compile_definitions(ROS_DISTRO_FOXY) + add_compile_definitions(ROS_DISTRO_FOXY) elseif(${ROS_DISTRO} STREQUAL "galactic") -add_compile_definitions(ROS_DISTRO_GALACTIC) + add_compile_definitions(ROS_DISTRO_GALACTIC) elseif(${ROS_DISTRO} STREQUAL "humble") -add_compile_definitions(ROS_DISTRO_HUMBLE) + add_compile_definitions(ROS_DISTRO_HUMBLE) endif() diff --git a/nebula_examples/include/hesai/hesai_ros_offline_extract_bag_pcd.hpp b/nebula_examples/include/hesai/hesai_ros_offline_extract_bag_pcd.hpp index b8bbe345c..da0807b64 100644 --- a/nebula_examples/include/hesai/hesai_ros_offline_extract_bag_pcd.hpp +++ b/nebula_examples/include/hesai/hesai_ros_offline_extract_bag_pcd.hpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/nebula_examples/include/hesai/hesai_ros_offline_extract_pcd.hpp b/nebula_examples/include/hesai/hesai_ros_offline_extract_pcd.hpp index 4551bd848..f41c0c795 100644 --- a/nebula_examples/include/hesai/hesai_ros_offline_extract_pcd.hpp +++ b/nebula_examples/include/hesai/hesai_ros_offline_extract_pcd.hpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/nebula_examples/include/velodyne/velodyne_ros_offline_extract_bag_pcd.hpp b/nebula_examples/include/velodyne/velodyne_ros_offline_extract_bag_pcd.hpp index 0bccb7200..21304c287 100644 --- a/nebula_examples/include/velodyne/velodyne_ros_offline_extract_bag_pcd.hpp +++ b/nebula_examples/include/velodyne/velodyne_ros_offline_extract_bag_pcd.hpp @@ -33,7 +33,6 @@ #include #include -#include #include #include diff --git a/nebula_examples/package.xml b/nebula_examples/package.xml index f63847cca..529a81865 100644 --- a/nebula_examples/package.xml +++ b/nebula_examples/package.xml @@ -12,20 +12,11 @@ ament_cmake_auto ros_environment - diagnostic_msgs - diagnostic_updater libpcl-all-dev nebula_common nebula_decoders nebula_ros - pandar_msgs - pcl_conversions - pcl_msgs - rclcpp - rclcpp_components rosbag2_cpp - sensor_msgs - velodyne_msgs yaml-cpp ament_cmake_gtest diff --git a/nebula_examples/src/common/parameter_descriptors.cpp b/nebula_examples/src/common/parameter_descriptors.cpp new file mode 100644 index 000000000..b62cb8a9e --- /dev/null +++ b/nebula_examples/src/common/parameter_descriptors.cpp @@ -0,0 +1,34 @@ +#include "nebula_ros/common/parameter_descriptors.hpp" + +namespace nebula +{ +namespace ros +{ + +rcl_interfaces::msg::ParameterDescriptor param_read_write() +{ + return rcl_interfaces::msg::ParameterDescriptor{}; +}; + +rcl_interfaces::msg::ParameterDescriptor param_read_only() +{ + return rcl_interfaces::msg::ParameterDescriptor{}.set__read_only(true); +} + +rcl_interfaces::msg::ParameterDescriptor::_floating_point_range_type float_range( + double start, double stop, double step) +{ + return { + rcl_interfaces::msg::FloatingPointRange().set__from_value(start).set__to_value(stop).set__step( + step)}; +} + +rcl_interfaces::msg::ParameterDescriptor::_integer_range_type int_range( + int start, int stop, int step) +{ + return { + rcl_interfaces::msg::IntegerRange().set__from_value(start).set__to_value(stop).set__step(step)}; +} + +} // namespace ros +} // namespace nebula diff --git a/nebula_hw_interfaces/CMakeLists.txt b/nebula_hw_interfaces/CMakeLists.txt index 5754c3882..631d345dd 100644 --- a/nebula_hw_interfaces/CMakeLists.txt +++ b/nebula_hw_interfaces/CMakeLists.txt @@ -1,29 +1,6 @@ cmake_minimum_required(VERSION 3.14) project(nebula_hw_interfaces) -find_package(ament_cmake_auto REQUIRED) -find_package(PCL REQUIRED COMPONENTS common) -#find_package(pcl_conversions REQUIRED) -find_package(boost_tcp_driver) -find_package(boost_udp_driver) -find_package(nebula_common) -find_package(nebula_msgs) -find_package(pandar_msgs) -find_package(rclcpp) -find_package(rclcpp_components) -find_package(robosense_msgs) -find_package(sensor_msgs) -find_package(velodyne_msgs) - -#ament_auto_find_build_dependencies() # this finds all components to it is slower - -message(STATUS "boost_tcp_driver_TARGETS : ${boost_tcp_driver_TARGETS}") -message(STATUS "boost_tcp_driver_LIBRARIES : ${boost_tcp_driver_LIBRARIES}") -message(STATUS "boost_tcp_driver_INCLUDE_DIRS : ${boost_tcp_driver_INCLUDE_DIRS}") -message(STATUS "boost_udp_driver_TARGETS : ${boost_udp_driver_TARGETS}") -message(STATUS "boost_udp_driver_LIBRARIES : ${boost_udp_driver_LIBRARIES}") -message(STATUS "boost_udp_driver_INCLUDE_DIRS : ${boost_udp_driver_INCLUDE_DIRS}") - # Default to C++17 if (NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) @@ -33,26 +10,24 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic -Wunused-function) endif () +find_package(ament_cmake_auto REQUIRED) +find_package(boost_tcp_driver) +find_package(boost_udp_driver) +find_package(nebula_common) +find_package(nebula_msgs) +find_package(pandar_msgs) +find_package(robosense_msgs) +find_package(velodyne_msgs) + # Common includes for all targets include_directories( + ${nebula_common_INCLUDE_DIRS} include SYSTEM ) -set(common_include_dirs - ${nebula_common_INCLUDE_DIRS} - ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} - ${rcl_INCLUDE_DIRS} - ${rclcpp_INCLUDE_DIRS} - ${rclcpp_components_INCLUDE_DIRS} - ${YAML_CPP_INCLUDE_DIRS} -) - -set(common_targets +link_libraries( ${nebula_common_TARGETS} - ${rcl_TARGETS} - ${rclcpp_TARGETS} ) add_library(nebula_hw_interfaces_hesai SHARED @@ -62,14 +37,12 @@ target_link_libraries(nebula_hw_interfaces_hesai PUBLIC ${boost_tcp_driver_LIBRARIES} ${boost_udp_driver_LIBRARIES} ${pandar_msgs_TARGETS} - ${common_targets} ) target_include_directories(nebula_hw_interfaces_hesai PUBLIC ${boost_tcp_driver_INCLUDE_DIRS} ${boost_udp_driver_INCLUDE_DIRS} ${pandar_msgs_INCLUDE_DIRS} - ${common_include_dirs} ) add_library(nebula_hw_interfaces_velodyne SHARED @@ -79,13 +52,12 @@ target_link_libraries(nebula_hw_interfaces_velodyne PUBLIC ${boost_tcp_driver_LIBRARIES} ${boost_udp_driver_LIBRARIES} ${velodyne_msgs_TARGETS} - ${common_targets} + ) target_include_directories(nebula_hw_interfaces_velodyne PUBLIC ${boost_udp_driver_INCLUDE_DIRS} ${boost_tcp_driver_INCLUDE_DIRS} ${velodyne_msgs_INCLUDE_DIRS} - ${common_include_dirs} ) add_library(nebula_hw_interfaces_robosense SHARED @@ -95,28 +67,25 @@ target_link_libraries(nebula_hw_interfaces_robosense PUBLIC ${boost_tcp_driver_LIBRARIES} ${boost_udp_driver_LIBRARIES} ${robosense_msgs_TARGETS} - ${common_targets} + ) target_include_directories(nebula_hw_interfaces_robosense PUBLIC ${boost_udp_driver_INCLUDE_DIRS} ${boost_tcp_driver_INCLUDE_DIRS} ${robosense_msgs_INCLUDE_DIRS} - ${common_include_dirs} ) add_library(nebula_hw_interfaces_continental SHARED src/nebula_continental_hw_interfaces/continental_ars548_hw_interface.cpp - src/nebula_continental_hw_interfaces/multi_continental_ars548_hw_interface.cpp ) target_link_libraries(nebula_hw_interfaces_continental PUBLIC ${boost_udp_driver_LIBRARIES} ${nebula_msgs_TARGETS} - ${common_targets} + ) target_include_directories(nebula_hw_interfaces_continental PUBLIC ${boost_udp_driver_INCLUDE_DIRS} ${nebula_msgs_INCLUDE_DIRS} - ${common_include_dirs} ) install(TARGETS nebula_hw_interfaces_hesai EXPORT export_nebula_hw_interfaces_hesai) @@ -136,22 +105,14 @@ ament_export_targets(export_nebula_hw_interfaces_velodyne) ament_export_targets(export_nebula_hw_interfaces_robosense) ament_export_targets(export_nebula_hw_interfaces_continental) -# Need to consider this ament_export_dependencies( - PCL boost_tcp_driver boost_udp_driver nebula_common nebula_msgs pandar_msgs - rcl - rclcpp - rclcpp_components robosense_msgs - sensor_msgs velodyne_msgs ) - -#ament_auto_package() trying it without ament_package() diff --git a/nebula_hw_interfaces/package.xml b/nebula_hw_interfaces/package.xml index b526108c9..f0167f6dc 100644 --- a/nebula_hw_interfaces/package.xml +++ b/nebula_hw_interfaces/package.xml @@ -13,13 +13,10 @@ boost_tcp_driver boost_udp_driver - libpcl-all-dev nebula_common nebula_msgs pandar_msgs - rclcpp robosense_msgs - sensor_msgs velodyne_msgs ament_cmake_gtest diff --git a/nebula_ros/CMakeLists.txt b/nebula_ros/CMakeLists.txt index 9df319620..45cd6262b 100644 --- a/nebula_ros/CMakeLists.txt +++ b/nebula_ros/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 3.14) project(nebula_ros) -find_package(ament_cmake_auto REQUIRED) - -#ament_auto_find_build_dependencies() - # Default to C++17 if (NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) @@ -14,245 +10,116 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic -Wunused-function) endif () +find_package(ament_cmake_auto REQUIRED) find_package(PCL REQUIRED components common) find_package(continental_msgs REQUIRED) find_package(continental_srvs REQUIRED) -find_package(pcl_conversions REQUIRED) find_package(diagnostic_msgs REQUIRED) find_package(diagnostic_updater REQUIRED) +find_package(geometry_msgs REQUIRED) find_package(nebula_common REQUIRED) find_package(nebula_decoders REQUIRED) find_package(nebula_hw_interfaces REQUIRED) find_package(nebula_msgs REQUIRED) +find_package(pandar_msgs REQUIRED) find_package(radar_msgs REQUIRED) find_package(rclcpp_components REQUIRED) find_package(robosense_msgs REQUIRED) -find_package(tf2_eigen REQUIRED) -find_package(tf2_msgs REQUIRED) find_package(tf2_ros REQUIRED) find_package(visualization_msgs REQUIRED) find_package(yaml-cpp REQUIRED) -#get_cmake_property(_variableNames VARIABLES) -#foreach(_variableName ${_variableNames}) -# message(STATUS "${_variableName}=${${_variableName}}") -#endforeach() - -message(STATUS "continental_msgs_LIBRARIES:" ${continental_msgs_LIBRARIES}) -message(STATUS "continental_srvs_LIBRARIES: " ${continental_srvs_LIBRARIES}) -message(STATUS "nebula_hw_interfaces_LIBRARIES: " ${nebula_hw_interfaces_LIBRARIES}) -message(STATUS "nebula_decoders_LIBRARIES: " ${nebula_decoders_LIBRARIES}) -message(STATUS "nebula_msgs_LIBRARIES: " ${nebula_msgs_LIBRARIES}) -message(STATUS "PCL_LIBRARIES: " ${PCL_LIBRARIES}) -message(STATUS "radar_msgs_LIBRARIES: " ${radar_msgs_LIBRARIES}) -message(STATUS "rclcpp_LIBRARIES: " ${rclcpp_LIBRARIES}) -message(STATUS "rcl_LIBRARIES: " ${rcl_LIBRARIES}) -message(STATUS "rclcpp_components_LIBRARIES: " ${rclcpp_components_LIBRARIES}) -message(STATUS "tf2_eigen_LIBRARIES: " ${tf2_eigen_LIBRARIES}) -message(STATUS "tf2_msgs_LIBRARIES: " ${tf2_msgs_LIBRARIES}) -message(STATUS "====nebula_decoders::nebula_decoders_continental: " nebula_decoders::nebula_decoders_continental) -message(STATUS "diagnostic_updater_TARGETS: ${diagnostic_updater_TARGETS}") -message(STATUS "diagnostic_updater_LIBRARIES: ${diagnostic_updater_LIBRARIES}") -message(STATUS "diagnostic_updater_INCLUDE_DIRS: ${diagnostic_updater_INCLUDE_DIRS}") - -#get_target_property(linked_libs nebula_decoders::nebula_decoders_continental INTERFACE_LINK_LIBRARIES) -#message(STATUS "Libraries linked by MyPackage::Comp1: ${linked_libs}") - -message(STATUS " --- rcl_INCLUDE_DIRS : ${rcl_INCLUDE_DIRS}") -message(STATUS " --- rclcpp_INCLUDE_DIRS : ${rclcpp_INCLUDE_DIRS}") -message(STATUS " --- rclcpp_components_INCLUDE_DIRS : ${rclcpp_components_INCLUDE_DIRS}") -message(STATUS " --- nebula_decoders_INCLUDE_DIRS : ${nebula_decoders_INCLUDE_DIRS}") -message(STATUS " --- nebula_hw_interfaces_INCLUDE_DIRS : ${nebula_hw_interfaces_INCLUDE_DIRS}") - include_directories( include SYSTEM ${nebula_common_INCLUDE_DIRS} ${YAML_CPP_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} - #${rcl_INCLUDE_DIRS} - #${rclcpp_INCLUDE_DIRS} ${rclcpp_components_INCLUDE_DIRS} ) -#link_libraries(${YAML_CPP_LIBRARIES} ${PCL_LIBRARIES}) link_libraries( ${nebula_common_TARGETS} - ${rcl_TARGETS} - ${rclcpp_TARGETS} - # Consider rclcpp_components::component + ${YAML_CPP_LIBRARIES} + ${PCL_LIBRARIES} ) - - ## Hesai -# Hw Interface -add_library(hesai_hw_ros_wrapper SHARED - src/hesai/hesai_hw_interface_ros_wrapper.cpp -) -target_link_libraries(hesai_hw_ros_wrapper PUBLIC - ${pandar_msgs_TARGETS} - nebula_hw_interfaces::nebula_hw_interfaces_hesai -) -target_include_directories(hesai_hw_ros_wrapper PUBLIC - ${nebula_hw_interfaces_INCLUDE_DIRS} - ${pandar_msgs_INCLUDE_DIRS} +add_library(hesai_ros_wrapper SHARED + src/hesai/hesai_ros_wrapper.cpp + src/hesai/decoder_wrapper.cpp + src/hesai/hw_interface_wrapper.cpp + src/hesai/hw_monitor_wrapper.cpp + src/common/parameter_descriptors.cpp ) -rclcpp_components_register_node(hesai_hw_ros_wrapper - PLUGIN "HesaiHwInterfaceRosWrapper" - EXECUTABLE hesai_hw_interface_ros_wrapper_node -) - -# Monitor -add_library(hesai_hw_monitor_ros_wrapper SHARED - src/hesai/hesai_hw_monitor_ros_wrapper.cpp -) -target_link_libraries(hesai_hw_monitor_ros_wrapper PUBLIC - ${diagnostic_msgs_TARGETS} - ${diagnostic_updater_TARGETS} - ${pandar_msgs_TARGETS} - nebula_hw_interfaces::nebula_hw_interfaces_hesai -) -target_include_directories(hesai_hw_monitor_ros_wrapper PUBLIC +target_include_directories(hesai_ros_wrapper PUBLIC ${diagnostic_updater_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} ${nebula_hw_interfaces_INCLUDE_DIRS} ${pandar_msgs_INCLUDE_DIRS} ) -rclcpp_components_register_node(hesai_hw_monitor_ros_wrapper - PLUGIN "HesaiHwMonitorRosWrapper" - EXECUTABLE hesai_hw_monitor_ros_wrapper_node -) - -# DriverDecoder -add_library(hesai_driver_ros_wrapper SHARED - src/hesai/hesai_decoder_ros_wrapper.cpp -) -target_link_libraries(hesai_driver_ros_wrapper PUBLIC +target_link_libraries(hesai_ros_wrapper PUBLIC + ${diagnostic_msgs_TARGETS} + ${diagnostic_updater_TARGETS} ${pandar_msgs_TARGETS} nebula_decoders::nebula_decoders_hesai nebula_hw_interfaces::nebula_hw_interfaces_hesai ) -target_include_directories(hesai_driver_ros_wrapper PUBLIC - ${nebula_decoders_INCLUDE_DIRS} - ${nebula_hw_interfaces_INCLUDE_DIRS} - ${pandar_msgs_INCLUDE_DIRS} -) -rclcpp_components_register_node(hesai_driver_ros_wrapper - PLUGIN "HesaiDriverRosWrapper" - EXECUTABLE hesai_driver_ros_wrapper_node -) -## Velodyne -# Hw Interface -add_library(velodyne_hw_ros_wrapper SHARED - src/velodyne/velodyne_hw_interface_ros_wrapper.cpp -) -target_link_libraries(velodyne_hw_ros_wrapper PUBLIC - ${velodyne_msgs_TARGETS} - nebula_hw_interfaces::nebula_hw_interfaces_velodyne -) -target_include_directories(velodyne_hw_ros_wrapper PUBLIC - ${nebula_hw_interfaces_INCLUDE_DIRS} - ${velodyne_msgs_INCLUDE_DIRS} +rclcpp_components_register_node(hesai_ros_wrapper + PLUGIN "HesaiRosWrapper" + EXECUTABLE hesai_ros_wrapper_node ) -rclcpp_components_register_node(velodyne_hw_ros_wrapper - PLUGIN "VelodyneHwInterfaceRosWrapper" - EXECUTABLE velodyne_hw_ros_wrapper_node +## Velodyne +add_library(velodyne_ros_wrapper SHARED + src/velodyne/velodyne_ros_wrapper.cpp + src/velodyne/decoder_wrapper.cpp + src/velodyne/hw_interface_wrapper.cpp + src/velodyne/hw_monitor_wrapper.cpp + src/common/parameter_descriptors.cpp ) - -# Monitor -add_library(velodyne_hw_monitor_ros_wrapper SHARED - src/velodyne/velodyne_hw_monitor_ros_wrapper.cpp -) -target_link_libraries(velodyne_hw_monitor_ros_wrapper PUBLIC - ${diagnostic_updater_TARGETS} - ${diagnostic_msgs_TARGETS} - ${velodyne_msgs_TARGETS} - nebula_hw_interfaces::nebula_hw_interfaces_velodyne -) -target_include_directories(velodyne_hw_monitor_ros_wrapper PUBLIC +target_include_directories(velodyne_ros_wrapper PUBLIC ${diagnostic_updater_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} ${nebula_hw_interfaces_INCLUDE_DIRS} ${velodyne_msgs_INCLUDE_DIRS} ) -rclcpp_components_register_node(velodyne_hw_monitor_ros_wrapper - PLUGIN "VelodyneHwMonitorRosWrapper" - EXECUTABLE velodyne_hw_monitor_ros_wrapper_node -) - -# DriverDecoder -add_library(velodyne_driver_ros_wrapper SHARED - src/velodyne/velodyne_decoder_ros_wrapper.cpp -) -target_link_libraries(velodyne_driver_ros_wrapper PUBLIC +target_link_libraries(velodyne_ros_wrapper PUBLIC + ${diagnostic_updater_TARGETS} + ${diagnostic_msgs_TARGETS} ${velodyne_msgs_TARGETS} nebula_decoders::nebula_decoders_velodyne nebula_hw_interfaces::nebula_hw_interfaces_velodyne ) -target_include_directories(velodyne_driver_ros_wrapper PUBLIC - ${nebula_decoders_INCLUDE_DIRS} - ${nebula_hw_interfaces_INCLUDE_DIRS} - ${velodyne_msgs_INCLUDE_DIRS} -) -rclcpp_components_register_node(velodyne_driver_ros_wrapper - PLUGIN "VelodyneDriverRosWrapper" - EXECUTABLE velodyne_driver_ros_wrapper_node +rclcpp_components_register_node(velodyne_ros_wrapper + PLUGIN "VelodyneRosWrapper" + EXECUTABLE velodyne_ros_wrapper_node ) - ## Robosense -# Hw Interface -add_library(robosense_hw_ros_wrapper SHARED - src/robosense/robosense_hw_interface_ros_wrapper.cpp -) -target_link_libraries(robosense_hw_ros_wrapper PUBLIC - ${robosense_msgs_TARGETS} - nebula_hw_interfaces::nebula_hw_interfaces_robosense -) -target_include_directories(robosense_hw_ros_wrapper PUBLIC - ${nebula_hw_interfaces_INCLUDE_DIRS} - ${robosense_msgs_INCLUDE_DIRS} +add_library(robosense_ros_wrapper SHARED + src/robosense/robosense_ros_wrapper.cpp + src/robosense/decoder_wrapper.cpp + src/robosense/hw_interface_wrapper.cpp + src/robosense/hw_monitor_wrapper.cpp + src/common/parameter_descriptors.cpp ) -rclcpp_components_register_node(robosense_hw_ros_wrapper - PLUGIN "RobosenseHwInterfaceRosWrapper" - EXECUTABLE robosense_hw_interface_ros_wrapper_node -) - -# DriverDecoder -add_library(robosense_driver_ros_wrapper SHARED - src/robosense/robosense_decoder_ros_wrapper.cpp -) -target_link_libraries(robosense_driver_ros_wrapper PUBLIC - ${robosense_msgs_TARGETS} - nebula_decoders::nebula_decoders_robosense - nebula_decoders::nebula_decoders_robosense_info - nebula_hw_interfaces::nebula_hw_interfaces_robosense -) -target_include_directories(robosense_driver_ros_wrapper PUBLIC +target_include_directories(robosense_ros_wrapper PUBLIC + ${diagnostic_updater_INCLUDE_DIRS} ${nebula_decoders_INCLUDE_DIRS} ${nebula_hw_interfaces_INCLUDE_DIRS} ${robosense_msgs_INCLUDE_DIRS} ) -rclcpp_components_register_node(robosense_driver_ros_wrapper - PLUGIN "RobosenseDriverRosWrapper" - EXECUTABLE robosense_driver_ros_wrapper_node -) - -# Monitor -add_library(robosense_hw_monitor_ros_wrapper SHARED - src/robosense/robosense_hw_monitor_ros_wrapper.cpp -) -target_link_libraries(robosense_hw_monitor_ros_wrapper PUBLIC +target_link_libraries(robosense_ros_wrapper PUBLIC ${diagnostic_updater_TARGETS} ${diagnostic_msgs_TARGETS} ${robosense_msgs_TARGETS} @@ -260,130 +127,56 @@ target_link_libraries(robosense_hw_monitor_ros_wrapper PUBLIC nebula_decoders::nebula_decoders_robosense_info nebula_hw_interfaces::nebula_hw_interfaces_robosense ) -target_include_directories(robosense_hw_monitor_ros_wrapper PUBLIC - ${diagnostic_updater_INCLUDE_DIRS} - ${nebula_decoders_INCLUDE_DIRS} - ${nebula_hw_interfaces_INCLUDE_DIRS} - ${robosense_msgs_INCLUDE_DIRS} -) -rclcpp_components_register_node(robosense_hw_monitor_ros_wrapper - PLUGIN "RobosenseHwMonitorRosWrapper" - EXECUTABLE robosense_hw_monitor_ros_wrapper_node +rclcpp_components_register_node(robosense_ros_wrapper + PLUGIN "RobosenseRosWrapper" + EXECUTABLE robosense_ros_wrapper_node ) - ## Continental - -# Hw Interface -add_library(continental_ars548_hw_ros_wrapper SHARED - src/continental/continental_ars548_hw_interface_ros_wrapper.cpp -) -target_link_libraries(continental_ars548_hw_ros_wrapper PUBLIC - ${continental_msgs_TARGETS} - ${continental_srvs_TARGETS} - ${diagnostic_msgs_TARGETS} - ${nebula_msgs_TARGETS} - ${radar_msgs_TARGETS} - ${tf2_ros_TARGETS} - nebula_hw_interfaces::nebula_hw_interfaces_continental -) -target_include_directories(continental_ars548_hw_ros_wrapper PUBLIC - ${continental_msgs_INCLUDE_DIRS} - ${continental_srvs_INCLUDE_DIRS} - ${diagnostic_msgs_INCLUDE_DIRS} - ${nebula_msgs_INCLUDE_DIRS} - ${nebula_hw_interfaces_INCLUDE_DIRS} - ${radar_msgs_INCLUDE_DIRS} - ${tf2_ros_INCLUDE_DIRS} +add_library(continental_ars548_ros_wrapper SHARED + src/continental/continental_ars548_ros_wrapper.cpp + src/continental/continental_ars548_decoder_wrapper.cpp + src/continental/continental_ars548_hw_interface_wrapper.cpp + src/common/parameter_descriptors.cpp ) -#ament_target_dependencies(continental_ars548_hw_ros_wrapper -# continental_msgs -# diagnostic_msgs -# nebula_msgs -# radar_msgs -#) - -rclcpp_components_register_node(continental_ars548_hw_ros_wrapper - PLUGIN "ContinentalARS548HwInterfaceRosWrapper" - EXECUTABLE continental_ars548_hw_interface_ros_wrapper_node - ) - -add_library(multi_continental_ars548_hw_ros_wrapper SHARED - src/continental/multi_continental_ars548_hw_interface_ros_wrapper.cpp -) -target_link_libraries(multi_continental_ars548_hw_ros_wrapper PUBLIC - ${continental_msgs_TARGETS} - ${diagnostic_msgs_TARGETS} - ${nebula_msgs_TARGETS} - ${radar_msgs_TARGETS} - ${tf2_ros_TARGETS} - nebula_hw_interfaces::nebula_hw_interfaces_continental -) -target_include_directories(multi_continental_ars548_hw_ros_wrapper PUBLIC +target_include_directories(continental_ars548_ros_wrapper PUBLIC ${continental_msgs_INCLUDE_DIRS} + ${continental_srvs_INCLUDE_DIRS} ${diagnostic_msgs_INCLUDE_DIRS} + ${geometry_msgs_INCLUDE_DIRS} ${nebula_msgs_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} ${nebula_hw_interfaces_INCLUDE_DIRS} ${radar_msgs_INCLUDE_DIRS} + ${rclcpp_components_INCLUDE_DIRS} ${tf2_ros_INCLUDE_DIRS} + ${visualization_msgs_INCLUDE_DIRS} ) -# Consider changing lin libraries and include directories to ament_target_dependencies -#ament_target_dependencies(multi_continental_ars548_hw_ros_wrapper -# continental_msgs -# diagnostic_msgs -# nebula_msgs -# radar_msgs -#) - -rclcpp_components_register_node(multi_continental_ars548_hw_ros_wrapper - PLUGIN "MultiContinentalARS548HwInterfaceRosWrapper" - EXECUTABLE multi_continental_ars548_hw_interface_ros_wrapper_node - ) - -# DriverDecoder -add_library(continental_ars548_driver_ros_wrapper SHARED - src/continental/continental_ars548_decoder_ros_wrapper.cpp -) -target_link_libraries(continental_ars548_driver_ros_wrapper PUBLIC +target_link_libraries(continental_ars548_ros_wrapper PUBLIC ${continental_msgs_TARGETS} + ${continental_srvs_TARGETS} ${diagnostic_msgs_TARGETS} + ${geometry_msgs_TARGETS} ${nebula_msgs_TARGETS} ${radar_msgs_TARGETS} ${tf2_ros_TARGETS} ${visualization_msgs_TARGETS} nebula_decoders::nebula_decoders_continental -) -target_include_directories(continental_ars548_driver_ros_wrapper PUBLIC - ${continental_msgs_INCLUDE_DIRS} - ${diagnostic_msgs_INCLUDE_DIRS} - ${nebula_msgs_INCLUDE_DIRS} - ${nebula_decoders_INCLUDE_DIRS} - ${radar_msgs_INCLUDE_DIRS} - ${rclcpp_components_INCLUDE_DIRS} - ${tf2_ros_INCLUDE_DIRS} - ${visualization_msgs_INCLUDE_DIRS} + nebula_hw_interfaces::nebula_hw_interfaces_continental ) -rclcpp_components_register_node(continental_ars548_driver_ros_wrapper - PLUGIN "ContinentalARS548DriverRosWrapper" - EXECUTABLE continental_ars548_driver_ros_wrapper_node +rclcpp_components_register_node(continental_ars548_ros_wrapper + PLUGIN "ContinentalARS548RosWrapper" + EXECUTABLE continental_ars548_ros_wrapper_node ) -install(TARGETS hesai_hw_ros_wrapper EXPORT export_hesai_hw_ros_wrapper) -install(TARGETS hesai_hw_monitor_ros_wrapper EXPORT export_hesai_hw_monitor_ros_wrapper) -install(TARGETS hesai_driver_ros_wrapper EXPORT export_hesai_driver_ros_wrapper) -install(TARGETS velodyne_hw_ros_wrapper EXPORT export_velodyne_hw_ros_wrapper) -install(TARGETS velodyne_hw_monitor_ros_wrapper EXPORT export_velodyne_hw_monitor_ros_wrapper) -install(TARGETS velodyne_driver_ros_wrapper EXPORT export_velodyne_driver_ros_wrapper) -install(TARGETS robosense_hw_ros_wrapper EXPORT export_robosense_hw_ros_wrapper) -install(TARGETS robosense_hw_monitor_ros_wrapper EXPORT export_robosense_hw_monitor_ros_wrapper) -install(TARGETS robosense_driver_ros_wrapper EXPORT export_robosense_driver_ros_wrapper) -install(TARGETS continental_ars548_hw_ros_wrapper EXPORT export_continental_ars548_hw_ros_wrapper) -install(TARGETS multi_continental_ars548_hw_ros_wrapper EXPORT export_multi_continental_ars548_hw_ros_wrapper) -install(TARGETS continental_ars548_driver_ros_wrapper EXPORT export_continental_ars548_driver_ros_wrapper) +install(TARGETS hesai_ros_wrapper EXPORT export_hesai_ros_wrapper) +install(TARGETS velodyne_ros_wrapper EXPORT export_velodyne_ros_wrapper) +install(TARGETS robosense_ros_wrapper EXPORT export_robosense_ros_wrapper) +install(TARGETS continental_ars548_ros_wrapper EXPORT export_continental_ars548_ros_wrapper) install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME}) if(BUILD_TESTING) @@ -392,18 +185,10 @@ if(BUILD_TESTING) endif() ament_export_include_directories("include/${PROJECT_NAME}") -ament_export_targets(export_hesai_hw_ros_wrapper) -ament_export_targets(export_hesai_hw_monitor_ros_wrapper) -ament_export_targets(export_hesai_driver_ros_wrapper) -ament_export_targets(export_velodyne_hw_ros_wrapper) -ament_export_targets(export_velodyne_hw_monitor_ros_wrapper) -ament_export_targets(export_velodyne_driver_ros_wrapper) -ament_export_targets(export_robosense_hw_ros_wrapper) -ament_export_targets(export_robosense_hw_monitor_ros_wrapper) -ament_export_targets(export_robosense_driver_ros_wrapper) -ament_export_targets(export_continental_ars548_hw_ros_wrapper) -ament_export_targets(export_multi_continental_ars548_hw_ros_wrapper) -ament_export_targets(export_continental_ars548_driver_ros_wrapper) +ament_export_targets(export_hesai_ros_wrapper) +ament_export_targets(export_velodyne_ros_wrapper) +ament_export_targets(export_robosense_ros_wrapper) +ament_export_targets(export_continental_ars548_ros_wrapper) install( DIRECTORY config launch @@ -416,15 +201,13 @@ ament_export_dependencies( continental_srvs diagnostic_msgs diagnostic_updater + geometry_msgs nebula_common nebula_decoders nebula_hw_interfaces nebula_msgs pandar_msgs - pcl_conversions radar_msgs - rcl - rclcpp rclcpp_components robosense_msgs sensor_msgs @@ -434,7 +217,6 @@ ament_export_dependencies( yaml-cpp ) -#ament_auto_package( ament_package() set(ROS_DISTRO $ENV{ROS_DISTRO}) diff --git a/nebula_ros/package.xml b/nebula_ros/package.xml index 90899350a..f153844c6 100644 --- a/nebula_ros/package.xml +++ b/nebula_ros/package.xml @@ -23,12 +23,9 @@ nebula_hw_interfaces nebula_msgs pandar_msgs - pcl_ros rclcpp rclcpp_components robosense_msgs - tf2_eigen - tf2_geometry_msgs tf2_ros velodyne_msgs visualization_msgs diff --git a/nebula_tests/CMakeLists.txt b/nebula_tests/CMakeLists.txt index 65743b6f6..4753586da 100644 --- a/nebula_tests/CMakeLists.txt +++ b/nebula_tests/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 3.14) project(nebula_tests) -find_package(ament_cmake_auto REQUIRED) - -#ament_auto_find_build_dependencies() - # Default to C++17 if (NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) @@ -25,19 +21,10 @@ elseif(${ROS_DISTRO} STREQUAL "humble") add_compile_definitions(ROS_DISTRO_HUMBLE) endif() - -find_package(PCL REQUIRED components common io) -find_package(continental_msgs REQUIRED) -find_package(diagnostic_msgs REQUIRED) -find_package(diagnostic_updater REQUIRED) +find_package(ament_cmake_auto REQUIRED) find_package(nebula_common REQUIRED) find_package(nebula_decoders REQUIRED) -find_package(nebula_hw_interfaces REQUIRED) -find_package(nebula_msgs REQUIRED) -find_package(nebula_ros REQUIRED) -find_package(pcl_conversions REQUIRED) -find_package(rclcpp REQUIRED) -find_package(rclcpp_components REQUIRED) +find_package(PCL REQUIRED COMPONENTS common) find_package(rosbag2_cpp REQUIRED) @@ -52,66 +39,37 @@ if(BUILD_TESTING) add_definitions(-D_SRC_CALIBRATION_DIR_PATH="${PROJECT_SOURCE_DIR}/../nebula_decoders/calibration/") set(NEBULA_TEST_INCLUDE_DIRS - ${continental_msgs_INCLUDE_DIRS} - ${diagnostic_msgs_INCLUDE_DIRS} - ${diagnostic_updater_INCLUDE_DIRS} ${nebula_common_INCLUDE_DIRS} ${nebula_decoders_INCLUDE_DIRS} - ${nebula_hw_interfaces_INCLUDE_DIRS} - ${nebula_msgs_INCLUDE_DIRS} - ${nebula_ros_INCLUDE_DIRS} - ${pcl_conversions_INCLUDE_DIRS} - ${rclcpp_INCLUDE_DIRS} - ${rclcpp_components_INCLUDE_DIRS} + ${PCL_INCLUDE_DIRS} ${rosbag2_cpp_INCLUDE_DIRS} ) set(NEBULA_TEST_LIBRARIES - #${continental_msgs_TARGETS} - ${diagnostic_msgs_TARGETS} - ${diagnostic_updater_TARGETS} ${nebula_common_TARGETS} - #${nebula_decoders_TARGETS} - #${nebula_hw_interfaces_TARGETS} - #${nebula_msgs_TARGETS} - #${nebula_ros_TARGETS} - ${pcl_conversions_LIBRARIES} - ${rclcpp_TARGETS} - ${rclcpp_components_TARGETS} + ${PCL_LIBRARIES} ${rosbag2_cpp_TARGETS} ) set(CONTINENTAL_TEST_LIBRARIES ${NEBULA_TEST_LIBRARIES} - ${continental_msgs_TARGETS} - ${nebula_msgs_TARGETS} - nebula_hw_interfaces::nebula_hw_interfaces_continental nebula_decoders::nebula_decoders_continental ) set(HESAI_TEST_LIBRARIES ${NEBULA_TEST_LIBRARIES} - nebula_hw_interfaces::nebula_hw_interfaces_hesai nebula_decoders::nebula_decoders_hesai ) set(VELODYNE_TEST_LIBRARIES ${NEBULA_TEST_LIBRARIES} - nebula_hw_interfaces::nebula_hw_interfaces_velodyne nebula_decoders::nebula_decoders_velodyne ) - message(STATUS "========== | NEBULA_TEST_LIBRARIES: ${NEBULA_TEST_LIBRARIES}") - - #foreach(package ${NEBULA_TEST_DEPENDENCIES}) - # message(STATUS "LIBRARIES for ${package}: ${${package}_LIBRARIES}") - # message(STATUS "TARGETS for ${package}: ${${package}_TARGETS}") - #endforeach() - add_subdirectory(continental) add_subdirectory(hesai) add_subdirectory(velodyne) endif() -ament_auto_package() +ament_package() diff --git a/nebula_tests/continental/CMakeLists.txt b/nebula_tests/continental/CMakeLists.txt index c8250bce5..fa28a594d 100644 --- a/nebula_tests/continental/CMakeLists.txt +++ b/nebula_tests/continental/CMakeLists.txt @@ -8,7 +8,6 @@ target_include_directories(continental_ros_decoder_test_ars548 PUBLIC ) target_link_libraries(continental_ros_decoder_test_ars548 - ${PCL_LIBRARIES} ${CONTINENTAL_TEST_LIBRARIES} ) @@ -22,6 +21,5 @@ target_include_directories(continental_ros_decoder_test_main_ars548 PUBLIC ${NEBULA_TEST_INCLUDE_DIRS} ) target_link_libraries(continental_ros_decoder_test_main_ars548 - ${PCL_LIBRARIES} continental_ros_decoder_test_ars548 ) diff --git a/nebula_tests/continental/continental_ros_decoder_test_ars548.hpp b/nebula_tests/continental/continental_ros_decoder_test_ars548.hpp index f36cac677..bf79912b7 100644 --- a/nebula_tests/continental/continental_ros_decoder_test_ars548.hpp +++ b/nebula_tests/continental/continental_ros_decoder_test_ars548.hpp @@ -19,11 +19,9 @@ #include "nebula_common/nebula_status.hpp" #include "nebula_common/velodyne/velodyne_common.hpp" #include "nebula_decoders/nebula_decoders_continental/decoders/continental_ars548_decoder.hpp" -#include "nebula_ros/common/nebula_driver_ros_wrapper_base.hpp" #include #include -#include #include #include @@ -38,8 +36,7 @@ namespace nebula { namespace ros { -class ContinentalRosDecoderTest final : public rclcpp::Node, - NebulaDriverRosWrapperBase //, testing::Test +class ContinentalRosDecoderTest final : public rclcpp::Node //, testing::Test { std::shared_ptr driver_ptr_; Status wrapper_status_; diff --git a/nebula_tests/hesai/CMakeLists.txt b/nebula_tests/hesai/CMakeLists.txt index ffb49010c..56370ddae 100644 --- a/nebula_tests/hesai/CMakeLists.txt +++ b/nebula_tests/hesai/CMakeLists.txt @@ -6,7 +6,6 @@ target_include_directories(hesai_ros_decoder_test PUBLIC ${NEBULA_TEST_INCLUDE_DIRS} ) target_link_libraries(hesai_ros_decoder_test - ${PCL_LIBRARIES} ${HESAI_TEST_LIBRARIES}) ament_add_gtest(hesai_ros_decoder_test_main @@ -20,6 +19,5 @@ target_include_directories(hesai_ros_decoder_test_main PUBLIC ) target_link_libraries(hesai_ros_decoder_test_main - ${PCL_LIBRARIES} hesai_ros_decoder_test ) diff --git a/nebula_tests/hesai/hesai_common.hpp b/nebula_tests/hesai/hesai_common.hpp index 784d8cd55..84c7fbbdd 100644 --- a/nebula_tests/hesai/hesai_common.hpp +++ b/nebula_tests/hesai/hesai_common.hpp @@ -5,11 +5,9 @@ #include "nebula_common/nebula_status.hpp" #include "nebula_decoders/nebula_decoders_hesai/decoders/hesai_scan_decoder.hpp" #include "nebula_decoders/nebula_decoders_hesai/hesai_driver.hpp" -#include "nebula_ros/common/nebula_driver_ros_wrapper_base.hpp" #include #include -#include #include "pandar_msgs/msg/pandar_packet.hpp" #include "pandar_msgs/msg/pandar_scan.hpp" @@ -69,5 +67,5 @@ void printPCD(nebula::drivers::NebulaPointCloudPtr pp) } } -} // namespace ros -} // namespace nebula \ No newline at end of file +} // namespace test +} // namespace nebula diff --git a/nebula_tests/hesai/hesai_ros_decoder_test.hpp b/nebula_tests/hesai/hesai_ros_decoder_test.hpp index f12e56020..a10a9e5f4 100644 --- a/nebula_tests/hesai/hesai_ros_decoder_test.hpp +++ b/nebula_tests/hesai/hesai_ros_decoder_test.hpp @@ -5,11 +5,9 @@ #include "nebula_common/nebula_common.hpp" #include "nebula_common/nebula_status.hpp" #include "nebula_decoders/nebula_decoders_hesai/hesai_driver.hpp" -#include "nebula_ros/common/nebula_driver_ros_wrapper_base.hpp" #include #include -#include #include "pandar_msgs/msg/pandar_packet.hpp" #include "pandar_msgs/msg/pandar_scan.hpp" diff --git a/nebula_tests/package.xml b/nebula_tests/package.xml index 57593c96f..375dd0e3d 100644 --- a/nebula_tests/package.xml +++ b/nebula_tests/package.xml @@ -12,18 +12,8 @@ ament_cmake_auto ros_environment - continental_msgs - diagnostic_msgs - diagnostic_updater - libpcl-all-dev nebula_common nebula_decoders - nebula_hw_interfaces - nebula_msgs - nebula_ros - pcl_conversions - rclcpp - rclcpp_components rosbag2_cpp ament_cmake_gtest diff --git a/nebula_tests/velodyne/CMakeLists.txt b/nebula_tests/velodyne/CMakeLists.txt index ed4522ee6..7991c53df 100644 --- a/nebula_tests/velodyne/CMakeLists.txt +++ b/nebula_tests/velodyne/CMakeLists.txt @@ -7,7 +7,6 @@ target_include_directories(velodyne_ros_decoder_test_vlp16 PUBLIC ${NEBULA_TEST_INCLUDE_DIRS} ) target_link_libraries(velodyne_ros_decoder_test_vlp16 - ${PCL_LIBRARIES} ${VELODYNE_TEST_LIBRARIES}) ament_add_gtest(velodyne_ros_decoder_test_main_vlp16 @@ -22,7 +21,6 @@ target_include_directories(velodyne_ros_decoder_test_main_vlp16 PUBLIC ${NEBULA_TEST_INCLUDE_DIRS} ) target_link_libraries(velodyne_ros_decoder_test_main_vlp16 - ${PCL_LIBRARIES} velodyne_ros_decoder_test_vlp16 ) @@ -37,19 +35,14 @@ ament_add_gtest(velodyne_ros_decoder_test_main_vls128 velodyne_ros_decoder_test_main_vls128.cpp ) target_link_libraries(velodyne_ros_decoder_test_vls128 - ${PCL_LIBRARIES} ${VELODYNE_TEST_LIBRARIES}) -#ament_target_dependencies(velodyne_ros_decoder_test_main_vls128 -# ${NEBULA_TEST_DEPENDENCIES} -#) target_include_directories(velodyne_ros_decoder_test_main_vls128 PUBLIC ${PROJECT_SOURCE_DIR}/src/velodyne include ${NEBULA_TEST_INCLUDE_DIRS} ) target_link_libraries(velodyne_ros_decoder_test_main_vls128 - ${PCL_LIBRARIES} velodyne_ros_decoder_test_vls128 ) @@ -61,16 +54,13 @@ target_include_directories(velodyne_ros_decoder_test_vlp32 PUBLIC ${NEBULA_TEST_INCLUDE_DIRS} ) target_link_libraries(velodyne_ros_decoder_test_vlp32 - ${PCL_LIBRARIES} ${VELODYNE_TEST_LIBRARIES} ) ament_add_gtest(velodyne_ros_decoder_test_main_vlp32 velodyne_ros_decoder_test_main_vlp32.cpp ) -#ament_target_dependencies(velodyne_ros_decoder_test_main_vlp32 -# ${NEBULA_TEST_DEPENDENCIES} -#) + target_include_directories(velodyne_ros_decoder_test_main_vlp32 PUBLIC ${PROJECT_SOURCE_DIR}/src/velodyne include diff --git a/nebula_tests/velodyne/velodyne_ros_decoder_test_vlp16.hpp b/nebula_tests/velodyne/velodyne_ros_decoder_test_vlp16.hpp index 8ff23a456..7beb47807 100644 --- a/nebula_tests/velodyne/velodyne_ros_decoder_test_vlp16.hpp +++ b/nebula_tests/velodyne/velodyne_ros_decoder_test_vlp16.hpp @@ -6,9 +6,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/nebula_tests/velodyne/velodyne_ros_decoder_test_vlp32.hpp b/nebula_tests/velodyne/velodyne_ros_decoder_test_vlp32.hpp index 8ff23a456..7beb47807 100644 --- a/nebula_tests/velodyne/velodyne_ros_decoder_test_vlp32.hpp +++ b/nebula_tests/velodyne/velodyne_ros_decoder_test_vlp32.hpp @@ -6,9 +6,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/nebula_tests/velodyne/velodyne_ros_decoder_test_vls128.hpp b/nebula_tests/velodyne/velodyne_ros_decoder_test_vls128.hpp index 99169c374..7397ff029 100644 --- a/nebula_tests/velodyne/velodyne_ros_decoder_test_vls128.hpp +++ b/nebula_tests/velodyne/velodyne_ros_decoder_test_vls128.hpp @@ -6,9 +6,7 @@ #include #include #include -#include #include -#include #include #include From 865cd5a69cf0078792bb595451febe456793bfaa Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Thu, 6 Jun 2024 20:02:57 +0900 Subject: [PATCH 5/6] chore: forgot to delete a comment Signed-off-by: Kenzo Lobos-Tsunekawa --- nebula_decoders/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/nebula_decoders/CMakeLists.txt b/nebula_decoders/CMakeLists.txt index a271b5bb8..7238e0d67 100644 --- a/nebula_decoders/CMakeLists.txt +++ b/nebula_decoders/CMakeLists.txt @@ -154,7 +154,6 @@ ament_export_dependencies( yaml-cpp ) -#ament_auto_package( ament_package() # Set ROS_DISTRO macros From d1ee0346a12b834a14f1ff740e8c7e7e2ff2f128 Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Thu, 6 Jun 2024 20:14:44 +0900 Subject: [PATCH 6/6] fix: missed a package in the depends list Signed-off-by: Kenzo Lobos-Tsunekawa --- nebula_ros/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/nebula_ros/package.xml b/nebula_ros/package.xml index f153844c6..c07aca2e3 100644 --- a/nebula_ros/package.xml +++ b/nebula_ros/package.xml @@ -23,6 +23,7 @@ nebula_hw_interfaces nebula_msgs pandar_msgs + radar_msgs rclcpp rclcpp_components robosense_msgs