Skip to content

Commit d99c319

Browse files
committed
Migrate pcl_ros::SACSegmentation to ROS 2
1 parent 11d26da commit d99c319

File tree

3 files changed

+1024
-871
lines changed

3 files changed

+1024
-871
lines changed

pcl_ros/CMakeLists.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,23 @@ rclcpp_components_register_node(pcl_ros_filters
137137
class_loader_hide_library_symbols(pcl_ros_filters)
138138
#
139139
### Declare the pcl_ros_segmentation library
140-
#add_library (pcl_ros_segmentation
140+
add_library (pcl_ros_segmentation SHARED
141141
# src/pcl_ros/segmentation/extract_clusters.cpp
142142
# src/pcl_ros/segmentation/extract_polygonal_prism_data.cpp
143-
# src/pcl_ros/segmentation/sac_segmentation.cpp
143+
src/pcl_ros/segmentation/sac_segmentation.cpp
144144
# src/pcl_ros/segmentation/segment_differences.cpp
145145
# src/pcl_ros/segmentation/segmentation.cpp
146-
#)
147-
#target_link_libraries(pcl_ros_segmentation pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
148-
#add_dependencies(pcl_ros_segmentation ${PROJECT_NAME}_gencfg)
149-
#class_loader_hide_library_symbols(pcl_ros_segmentation)
146+
)
147+
target_link_libraries(pcl_ros_segmentation PUBLIC
148+
${PCL_LIBRARIES}
149+
pcl_ros_tf
150+
rclcpp_components::component
151+
)
152+
rclcpp_components_register_node(pcl_ros_segmentation
153+
PLUGIN "pcl_ros::SACSegmentation"
154+
EXECUTABLE segmentation_sac_node
155+
)
156+
class_loader_hide_library_symbols(pcl_ros_segmentation)
150157
#
151158
### Declare the pcl_ros_surface library
152159
#add_library (pcl_ros_surface
@@ -293,7 +300,7 @@ install(
293300
pcl_ros_filter
294301
pcl_ros_filters
295302
# pcl_ros_surface
296-
# pcl_ros_segmentation
303+
pcl_ros_segmentation
297304
pointcloud_to_pcd_lib
298305
combined_pointcloud_to_pcd_lib
299306
bag_to_pcd_lib

0 commit comments

Comments
 (0)