diff --git a/nebula_common/CMakeLists.txt b/nebula_common/CMakeLists.txt index 154f8e453..2e4be4f14 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) @@ -28,21 +24,35 @@ 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( + ${PCL_LIBRARIES} + ${YAML_CPP_LIBRARIES} +) + +add_library(nebula_common SHARED + src/nebula_common.cpp + src/velodyne/velodyne_calibration_decoder.cpp ) -ament_auto_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..7238e0d67 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,58 +10,151 @@ 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(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(rclcpp REQUIRED) find_package(robosense_msgs REQUIRED) +find_package(sensor_msgs REQUIRED) +find_package(velodyne_msgs REQUIRED) +find_package(yaml-cpp REQUIRED) -include_directories( - include - SYSTEM - ${YAML_CPP_INCLUDE_DIRS} - ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} +include_directories(PUBLIC + include + SYSTEM + ${nebula_common_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} + ${PCL_INCLUDE_DIRS} + ${pcl_conversions_INCLUDE_DIRS} + ${rclcpp_INCLUDE_DIRS} + ${sensor_msgs_INCLUDE_DIRS} +) + +link_libraries( + ${nebula_common_TARGETS} + ${PCL_LIBRARIES} + ${pcl_conversions_LIBRARIES} + ${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} +) + +target_include_directories(nebula_decoders_hesai PUBLIC + ${pandar_msgs_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} +) +target_include_directories(nebula_decoders_velodyne PUBLIC + ${angles_INCLUDE_DIRS} + ${velodyne_msgs_INCLUDE_DIRS} +) # Robosense -ament_auto_add_library(nebula_decoders_robosense SHARED - src/nebula_decoders_robosense/robosense_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} +) +target_include_directories(nebula_decoders_robosense PUBLIC + ${robosense_msgs_INCLUDE_DIRS} +) -ament_auto_add_library(nebula_decoders_robosense_info SHARED - src/nebula_decoders_robosense/robosense_info_driver.cpp - ) +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} +) +target_include_directories(nebula_decoders_robosense_info PUBLIC + ${robosense_msgs_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} +) +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} +) + +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}) 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_robosense_info) +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 + rclcpp + robosense_msgs + sensor_msgs + velodyne_msgs + yaml-cpp +) + +ament_package() # Set ROS_DISTRO macros set(ROS_DISTRO $ENV{ROS_DISTRO}) 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_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 774580c04..311105e30 100644 --- a/nebula_examples/CMakeLists.txt +++ b/nebula_examples/CMakeLists.txt @@ -11,49 +11,80 @@ 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_common REQUIRED) find_package(nebula_decoders REQUIRED) find_package(nebula_ros REQUIRED) -find_package(nebula_common REQUIRED) - -ament_auto_find_build_dependencies() +find_package(PCL REQUIRED COMPONENTS common io) +find_package(rosbag2_cpp REQUIRED) +find_package(yaml-cpp REQUIRED) include_directories( - include - SYSTEM - ${YAML_CPP_INCLUDE_DIRS} - ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} + include + SYSTEM + ${nebula_common_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} + ${nebula_ros_INCLUDE_DIRS} + ${PCL_INCLUDE_DIRS} + ${rosbag2_cpp_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} ) -## HESAI + +link_libraries( + ${nebula_common_TARGETS} + ${rosbag2_cpp_TARGETS} + ${PCL_LIBRARIES} +) + +## 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 + ${CMAKE_CURRENT_SOURCE_DIR}/src/common/parameter_descriptors.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 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_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 + ${CMAKE_CURRENT_SOURCE_DIR}/src/common/parameter_descriptors.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 ${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_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 ) if(BUILD_TESTING) @@ -62,18 +93,18 @@ if(BUILD_TESTING) 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 7cd8b8982..631d345dd 100644 --- a/nebula_hw_interfaces/CMakeLists.txt +++ b/nebula_hw_interfaces/CMakeLists.txt @@ -1,14 +1,6 @@ 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) - -ament_auto_find_build_dependencies() - # Default to C++17 if (NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) @@ -18,34 +10,109 @@ 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( - include - SYSTEM - ${YAML_CPP_INCLUDE_DIRS} - ${PCL_INCLUDE_DIRS} - ${PCL_COMMON_INCLUDE_DIRS} + ${nebula_common_INCLUDE_DIRS} + include + SYSTEM +) + +link_libraries( + ${nebula_common_TARGETS} +) + +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} +) + +target_include_directories(nebula_hw_interfaces_hesai PUBLIC + ${boost_tcp_driver_INCLUDE_DIRS} + ${boost_udp_driver_INCLUDE_DIRS} + ${pandar_msgs_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} -ament_auto_add_library(nebula_hw_interfaces_hesai SHARED - src/nebula_hesai_hw_interfaces/hesai_hw_interface.cpp - ) +) +target_include_directories(nebula_hw_interfaces_velodyne PUBLIC + ${boost_udp_driver_INCLUDE_DIRS} + ${boost_tcp_driver_INCLUDE_DIRS} + ${velodyne_msgs_INCLUDE_DIRS} +) -ament_auto_add_library(nebula_hw_interfaces_velodyne SHARED - src/nebula_velodyne_hw_interfaces/velodyne_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} -ament_auto_add_library(nebula_hw_interfaces_robosense SHARED - src/nebula_robosense_hw_interfaces/robosense_hw_interface.cpp - ) +) +target_include_directories(nebula_hw_interfaces_robosense PUBLIC + ${boost_udp_driver_INCLUDE_DIRS} + ${boost_tcp_driver_INCLUDE_DIRS} + ${robosense_msgs_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 +) +target_link_libraries(nebula_hw_interfaces_continental PUBLIC + ${boost_udp_driver_LIBRARIES} + ${nebula_msgs_TARGETS} +) +target_include_directories(nebula_hw_interfaces_continental PUBLIC + ${boost_udp_driver_INCLUDE_DIRS} + ${nebula_msgs_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) + +ament_export_dependencies( + boost_tcp_driver + boost_udp_driver + nebula_common + nebula_msgs + pandar_msgs + robosense_msgs + velodyne_msgs +) + +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 c8723cabb..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,93 +10,215 @@ 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_conversions REQUIRED) +find_package(ament_cmake_auto REQUIRED) +find_package(PCL REQUIRED components common) +find_package(continental_msgs REQUIRED) +find_package(continental_srvs 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(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_ros REQUIRED) +find_package(visualization_msgs REQUIRED) +find_package(yaml-cpp REQUIRED) 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} + ${rclcpp_components_INCLUDE_DIRS} ) -link_libraries(${YAML_CPP_LIBRARIES} ${PCL_LIBRARIES}) + +link_libraries( + ${nebula_common_TARGETS} + ${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 - ) +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 +) + +target_include_directories(hesai_ros_wrapper PUBLIC + ${diagnostic_updater_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${pandar_msgs_INCLUDE_DIRS} +) + +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 +) + rclcpp_components_register_node(hesai_ros_wrapper PLUGIN "HesaiRosWrapper" EXECUTABLE hesai_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 - ) +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 +) + +target_include_directories(velodyne_ros_wrapper PUBLIC + ${diagnostic_updater_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${velodyne_msgs_INCLUDE_DIRS} +) + +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 +) 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_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 +) + +target_include_directories(robosense_ros_wrapper PUBLIC + ${diagnostic_updater_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} + ${nebula_hw_interfaces_INCLUDE_DIRS} + ${robosense_msgs_INCLUDE_DIRS} +) + +target_link_libraries(robosense_ros_wrapper PUBLIC + ${diagnostic_updater_TARGETS} + ${diagnostic_msgs_TARGETS} + ${robosense_msgs_TARGETS} + nebula_decoders::nebula_decoders_robosense + nebula_decoders::nebula_decoders_robosense_info + nebula_hw_interfaces::nebula_hw_interfaces_robosense +) rclcpp_components_register_node(robosense_ros_wrapper - PLUGIN "RobosenseRosWrapper" - EXECUTABLE robosense_ros_wrapper_node - ) + 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 - ) +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 +) + +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} +) + +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 + nebula_hw_interfaces::nebula_hw_interfaces_continental +) rclcpp_components_register_node(continental_ars548_ros_wrapper - PLUGIN "ContinentalARS548RosWrapper" - EXECUTABLE continental_ars548_ros_wrapper_node - ) + PLUGIN "ContinentalARS548RosWrapper" + EXECUTABLE continental_ars548_ros_wrapper_node +) + +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) 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_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 + DESTINATION share/${PROJECT_NAME} ) +ament_export_dependencies( + PCL + continental_msgs + continental_srvs + diagnostic_msgs + diagnostic_updater + geometry_msgs + nebula_common + nebula_decoders + nebula_hw_interfaces + nebula_msgs + pandar_msgs + radar_msgs + rclcpp_components + robosense_msgs + sensor_msgs + tf2_ros + velodyne_msgs + visualization_msgs + yaml-cpp +) + +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..c07aca2e3 100644 --- a/nebula_ros/package.xml +++ b/nebula_ros/package.xml @@ -23,12 +23,10 @@ nebula_hw_interfaces nebula_msgs pandar_msgs - pcl_conversions + radar_msgs 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 ac8943890..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,15 +21,12 @@ elseif(${ROS_DISTRO} STREQUAL "humble") add_compile_definitions(ROS_DISTRO_HUMBLE) endif() - -find_package(PCL REQUIRED) -find_package(rosbag2_cpp REQUIRED) -find_package(pcl_conversions 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(PCL REQUIRED COMPONENTS common) +find_package(rosbag2_cpp REQUIRED) + if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) @@ -45,15 +38,33 @@ 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 + ${nebula_common_INCLUDE_DIRS} + ${nebula_decoders_INCLUDE_DIRS} + ${PCL_INCLUDE_DIRS} + ${rosbag2_cpp_INCLUDE_DIRS} + ) + + set(NEBULA_TEST_LIBRARIES + ${nebula_common_TARGETS} + ${PCL_LIBRARIES} + ${rosbag2_cpp_TARGETS} + ) + + set(CONTINENTAL_TEST_LIBRARIES + ${NEBULA_TEST_LIBRARIES} + nebula_decoders::nebula_decoders_continental + ) + + set(HESAI_TEST_LIBRARIES + ${NEBULA_TEST_LIBRARIES} + nebula_decoders::nebula_decoders_hesai + ) + set(VELODYNE_TEST_LIBRARIES + ${NEBULA_TEST_LIBRARIES} + nebula_decoders::nebula_decoders_velodyne + ) add_subdirectory(continental) add_subdirectory(hesai) @@ -61,4 +72,4 @@ if(BUILD_TESTING) endif() -ament_auto_package() +ament_package() diff --git a/nebula_tests/continental/CMakeLists.txt b/nebula_tests/continental/CMakeLists.txt index 44daf8813..fa28a594d 100644 --- a/nebula_tests/continental/CMakeLists.txt +++ b/nebula_tests/continental/CMakeLists.txt @@ -1,20 +1,25 @@ # 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 + ${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 - ) + 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 8a06fd07f..56370ddae 100644 --- a/nebula_tests/hesai/CMakeLists.txt +++ b/nebula_tests/hesai/CMakeLists.txt @@ -1,22 +1,23 @@ -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 + ${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 - ) + 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 f166997bd..7991c53df 100644 --- a/nebula_tests/velodyne/CMakeLists.txt +++ b/nebula_tests/velodyne/CMakeLists.txt @@ -1,62 +1,72 @@ # 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 + ${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 - ) + 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 + ${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 - ) + ${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 - ) + 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 + ${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 ) + 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 +) 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