From 3819bf2fb4ce40923ee3474ed3838506122beec5 Mon Sep 17 00:00:00 2001 From: Ferry Schoenmakers Date: Mon, 5 Jan 2026 12:52:50 +0100 Subject: [PATCH 1/2] Also build composable version of topic-converter --- cloudini_ros/CMakeLists.txt | 36 ++++++++++++++++++++++------ cloudini_ros/package.xml | 1 + cloudini_ros/src/topic_converter.cpp | 3 +++ 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/cloudini_ros/CMakeLists.txt b/cloudini_ros/CMakeLists.txt index 6ab2a94..872adf0 100644 --- a/cloudini_ros/CMakeLists.txt +++ b/cloudini_ros/CMakeLists.txt @@ -14,6 +14,7 @@ find_package(point_cloud_transport REQUIRED) find_package(Draco QUIET) find_package(pcl_conversions REQUIRED) find_package(pcl_ros REQUIRED) +find_package(rclcpp_components REQUIRED) set(PLUGIN_DEPS pluginlib::pluginlib @@ -58,26 +59,47 @@ install( ######### topic converter ######### -add_executable(cloudini_topic_converter +add_library(cloudini_topic_converter_component SHARED src/topic_converter.cpp ) +ament_target_dependencies(cloudini_topic_converter_component + SYSTEM + cloudini_lib + rclcpp_components +) + +rclcpp_components_register_node( + cloudini_topic_converter_component + PLUGIN "CloudiniPointcloudConverter" + EXECUTABLE cloudini_topic_converter +) target_include_directories(cloudini_topic_converter PUBLIC $ ) -target_link_libraries(cloudini_topic_converter - cloudini_ros - cloudini_lib::cloudini_lib -) - -install(TARGETS cloudini_topic_converter +install( + TARGETS + cloudini_topic_converter_component + EXPORT export_cloudini_ros ARCHIVE DESTINATION lib LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +install( + TARGETS + cloudini_topic_converter RUNTIME DESTINATION lib/cloudini_ros ) +install( + DIRECTORY + launch + DESTINATION share/cloudini_ros +) + ######### rosbag benchmark ######### add_executable(rosbag_benchmark test/rosbag_benchmark.cpp diff --git a/cloudini_ros/package.xml b/cloudini_ros/package.xml index e31a5f2..ea232c1 100644 --- a/cloudini_ros/package.xml +++ b/cloudini_ros/package.xml @@ -25,6 +25,7 @@ mcap_vendor sensor_msgs rclcpp + rclcpp_components rosbag2_cpp pcl_conversions pcl_ros diff --git a/cloudini_ros/src/topic_converter.cpp b/cloudini_ros/src/topic_converter.cpp index 582b688..ab96bd4 100644 --- a/cloudini_ros/src/topic_converter.cpp +++ b/cloudini_ros/src/topic_converter.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -190,6 +191,8 @@ void CloudiniPointcloudConverter::callback(std::shared_ptr Date: Mon, 5 Jan 2026 12:56:06 +0100 Subject: [PATCH 2/2] No launch files here... --- cloudini_ros/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cloudini_ros/CMakeLists.txt b/cloudini_ros/CMakeLists.txt index 872adf0..31ea1ac 100644 --- a/cloudini_ros/CMakeLists.txt +++ b/cloudini_ros/CMakeLists.txt @@ -94,12 +94,6 @@ install( RUNTIME DESTINATION lib/cloudini_ros ) -install( - DIRECTORY - launch - DESTINATION share/cloudini_ros -) - ######### rosbag benchmark ######### add_executable(rosbag_benchmark test/rosbag_benchmark.cpp