CUDA ransac error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CUDA ransac error

peter9606
Hi,

I'm getting trouble when doing cuda RANSAC, hope someone can point me out
what's going on there.
Basically I just copied source code from CUDA apps demo code from  here
<https://github.com/PointCloudLibrary/pcl/blob/master/cuda/apps/src/kinect_ransac.cpp>
. And when I tried to use CUDA to compute, I got below output with error

[RANSAC] Using GPU...
Normal Estimation took 0.39196ms.
setInputCloud :241407 valid points ( 0.78583 %)
terminate called after throwing an instance of
'thrust::system::system_error'
  what():  function_attributes(): after cudaFuncGetAttributes: invalid
device function
Aborted


And I'm thinking it's nothing to do with my environment because I can run
CUDA normal estimation in the same enviroment. Anyway, I list my environment
below:
OS: Ubuntu 16.04
CPU: Intel(R) Xeon(R) CPU E5-1607 v4 @ 3.10GHz
GPU: NVIDIA Corporation Device 1430 (rev a1)
CUDA: Cuda compilation tools, release 8.0, V8.0.61


Here's my code snippet.

 typename PointCloudAOS<Storage>::Ptr data = toStorage<Host,
Storage>(data_host);

    boost::shared_ptr<typename Storage<float4>::type> normals;
    {
      ScopeTimeCPU time("Normal Estimation");
      normals = computeFastPointNormals<Storage>(data);
    }

    typename SampleConsensusModel1PointPlane<Storage>::Ptr sac_model(
        new SampleConsensusModel1PointPlane<Storage>(data));
    sac_model->setNormals(normals);
    RandomSampleConsensus<Storage> sac(sac_model);
    sac.setMaxIterations(10000);
    sac.setDistanceThreshold(0.05);

    typename SampleConsensusModel1PointPlane<Storage>::IndicesPtr
inliers_stencil;
    {
      ScopeTimeCPU timer("computeModel: ");
      if (!sac.computeModel(0))
      {
        std::cerr << "Failed to compute model" << std::endl;
      }
      else
      {
        inliers_stencil = sac.getInliersStencil();
      }
    }

Thanks a lot!
Peter






--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: CUDA ransac error

Sérgio Agostinho
Between your code snippet and kinnect_ransac.cpp, you use normals
additionally and the app doesn't. What happens if you don't specify those?

Cheers

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users