Add sample & test for segmentation/extract_clusters.cpp
This commit is contained in:
parent
419366b5f5
commit
f16207321b
@ -5,7 +5,7 @@ project(pcl_ros)
|
||||
find_package(cmake_modules REQUIRED)
|
||||
find_package(Boost REQUIRED COMPONENTS system filesystem thread)
|
||||
find_package(Eigen3 REQUIRED)
|
||||
find_package(PCL REQUIRED COMPONENTS core features filters io surface)
|
||||
find_package(PCL REQUIRED COMPONENTS core features filters io segmentation surface)
|
||||
|
||||
if(NOT "${PCL_LIBRARIES}" STREQUAL "")
|
||||
# FIXME: this causes duplicates and not found error in ubuntu:zesty
|
||||
@ -203,6 +203,7 @@ if(CATKIN_ENABLE_TESTING)
|
||||
add_rostest(samples/pcl_ros/features/sample_normal_3d.launch ARGS gui:=false)
|
||||
add_rostest(samples/pcl_ros/filters/sample_statistical_outlier_removal.launch ARGS gui:=false)
|
||||
add_rostest(samples/pcl_ros/filters/sample_voxel_grid.launch ARGS gui:=false)
|
||||
add_rostest(samples/pcl_ros/segmentation/sample_extract_clusters.launch ARGS gui:=false)
|
||||
endif(CATKIN_ENABLE_TESTING)
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
<launch>
|
||||
|
||||
<arg name="gui" default="true" />
|
||||
|
||||
<!-- use voxel_grid for small cpu load in filtering -->
|
||||
<include file="$(find pcl_ros)/samples/pcl_ros/filters/sample_voxel_grid.launch">
|
||||
<arg name="gui" value="false" />
|
||||
<arg name="test" value="false" />
|
||||
<arg name="leaf_size" value="0.02" />
|
||||
</include>
|
||||
|
||||
<node name="extract_clusters"
|
||||
pkg="nodelet" type="nodelet"
|
||||
args="standalone pcl/EuclideanClusterExtraction">
|
||||
<remap from="~input" to="voxel_grid/output" />
|
||||
<rosparam>
|
||||
cluster_tolerance: 0.03
|
||||
spatial_locator: 1 # FLANN
|
||||
</rosparam>
|
||||
</node>
|
||||
|
||||
<test test-name="test_extract_clusters"
|
||||
name="test_extract_clusters"
|
||||
pkg="rostest" type="hztest">
|
||||
<rosparam>
|
||||
topic: /extract_clusters/output
|
||||
hz: 3000
|
||||
hzerror: 1000
|
||||
test_duration: 5.0
|
||||
</rosparam>
|
||||
</test>
|
||||
|
||||
<!-- TODO(wkentaro): Add sample visualization
|
||||
<group if="$(arg gui)">
|
||||
<node name="rviz"
|
||||
pkg="rviz" type="rviz"
|
||||
args="-d $(find pcl_ros)/samples/pcl_ros/segmentation/config/extract_clusters.rviz">
|
||||
</node>
|
||||
</group>
|
||||
-->
|
||||
|
||||
</launch>
|
||||
Loading…
x
Reference in New Issue
Block a user