Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EuclideanClustering crashes with cluster_filter=1 #2737

Closed
Affonso-Gui opened this issue Nov 2, 2022 · 1 comment
Closed

EuclideanClustering crashes with cluster_filter=1 #2737

Affonso-Gui opened this issue Nov 2, 2022 · 1 comment

Comments

@Affonso-Gui
Copy link
Member

    <node name="detic_euclidean_clustering"
          pkg="jsk_pcl_ros" type="euclidean_clustering"
          clear_params="true">
      <remap from="~input" to="depth_registered/points"/>
      <remap from="~input/cluster_indices" to="detic_segmentor/indices"/>
      <rosparam>
        multi: true
        tolerance: 0.03
        min_size: 10
        downsample_enable: true
        cluster_filter: 1
        approximate_sync: true
        queue_size: 100
      </rosparam>
    </node>

Sometimes fails at EuclideanClustering::clusteringClusterIndices with:

terminate called after throwing an instance of 'std::out_of_range'
        what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
[docker/detic_euclidean_clustering-1] killing on exit

I still haven't been able to dive on this.

@nakane11
Copy link
Member

nakane11 commented Nov 3, 2022

I haven't run it, but this error seems to occur here.

result_point_indices.indices = output_indices.at(index).indices;

If cluster_filter: 1 and output_indices.size() is 0, examine_indices.size() is set to 1.
int index = 0;
for(size_t i=0; i < output_indices.size(); i++){
if(output_indices[i].indices.size() > size){
size = output_indices[i].indices.size();
index = i;
}
}
examine_indices.push_back(index);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants