NVIDIA-AI-IOT / cuPCL

A project demonstrating how to use the libs of cuPCL.
MIT License
573 stars 93 forks source link

cluster size always zero using cuda-cluster #29

Open orekides opened 2 years ago

orekides commented 2 years ago

Using cuda-cluster for some down-sampled robosense pointcloud, the cudaExtractCluster always return zero cluster, while normal pcl::EuclideanClusterExtraction works fine.

env: jetson xavier nx jetpack 4.6 ubuntu18.04 cuda10.2

sample pcd file: sample_pcd.zip

run the cuda-cluster demo with modified 'extractClusterParam' in testCUDA

  ecp.minClusterSize = 5;
  ecp.maxClusterSize = 2500000;
  ecp.voxelX = 0.2;
  ecp.voxelY = 0.2;
  ecp.voxelZ = 0.2;
  ecp.countThreshold = 20;

tried different ClusterParams several times, none succeed(:

orekides commented 2 years ago

anyone knows the meaning of ecp.countThreshold here? please help. when i set the countThreshold to zero, the func may return one or two cluster sometimes.

Haoyu-NV commented 2 years ago

anyone knows the meaning of ecp.countThreshold here? please help. when i set the countThreshold to zero, the func may return one or two cluster sometimes.

Hi, countThreshold means the minimal number of points in one voxel, and if the number of points in a voxel is less than this number, the voxel will be discarded for the cluster. You may need to adjust voxel size(voxelXYZ) and countThreshold together to get the clusters you want, since there is no clusterTolerance in cuda-cluster. Later I will write annotations for those parameters.

ry4nzhu commented 1 year ago

A followup question: I tried to use cuCluster on cuSegmentation/example.pcd after running the cuSegmentation, but I always got ERROR: Leaf size is too small for the input dataset. Integer indices would overflow. no matter how I tune the parameters. Any ideas on this?