ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I don't have a lot of experience with ROS nodelets, but I think I can help a little bit in this case. I believe the sphere segmentation algorithm is expecting surface normals in addition to to the 3D points. Try adding another nodelet and setting it as the "normals" input for your segmentation filter, like this:

<!-- snip -->

<!-- Estimate surface normals -->
<node pkg="nodelet" type="nodelet" name="normal_estimation" args="load pcl/NormalEstimation pcl_manager" output="screen">
  <remap from="~input" to="/voxel_grid/output" />
  <rosparam>
    spatial_locator: 0
    k_search: 0
    radius_search: 0.02
  </rosparam>
</node>

<!-- Run a Sphere Segmentation filter -->
<node pkg="nodelet" type="nodelet" name="sac_sphere" args="load pcl/SACSegmentation pcl_manager" output="screen">
  <remap from="~input" to="/voxel_grid/output" />
  <remap from="~normals" to="/normal_estimation/output" />
  <rosparam>
    model_type: 4
    distance_threshold: 0.01
  </rosparam>
</node>


<!-- snip -->

I don't really have a good set-up for testing this, so I'm not sure if the parameters I picked will work under your conditions, but this will at least get the segmentation node to return something. Hope this helps.