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

Armita_samandarian's profile - activity

2015-06-09 03:08:35 -0500 received badge  Famous Question (source)
2015-02-28 14:12:37 -0500 received badge  Notable Question (source)
2015-01-03 16:52:51 -0500 received badge  Popular Question (source)
2014-12-10 09:28:52 -0500 asked a question assertion failed px !=0 in PCL 1.6

Hi expert. I am new in PCL and I have written a code for finding correspondences between two point clouds and then I tried to remove bad correspondences by writing some code. when I debug my code No error happens and when the code is running during the process in my Cmd window this error appears : Assertion Failed: Px !=0 I search in the internet and I know that the problem is related to the initialization of my shared_pointer! I tried to initialize them but still the same error happens. Please help me and let me know Where is my initialization is wrong. I am r eally confused right now! THX in advance

//Input data 
 pcl::PointCloud<pcl::PFHSignature125>::Ptr descriptors1_MVS_src (new   pcl::PointCloud<pcl::PFHSignature125>); 
 pcl::PointCloud<pcl::PFHSignature125>::Ptr descriptors1_TLS_trg (new pcl::PointCloud<pcl::PFHSignature125>); 
 pcl::CorrespondencesPtr correspondences_all(new pcl::Correspondences); 

    //Load MVS files From 
     .......... 

cout << "Finding correspondences..." << flush; 

pcl::registration::CorrespondenceEstimation<pcl::PFHSignature125, pcl::PFHSignature125> ce; 
ce.setInputCloud(descriptors1_MVS_src); 
ce.setInputTarget(descriptors1_TLS_trg); 
ce.determineReciprocalCorrespondences(*correspondences_all); 
cout << "OK! Correspondences found: " << correspondences_all->size() << endl; 


    pcl::CorrespondencesPtr correspondences_filtered(new pcl::Correspondences); 

    cout << "Finding Filtered correspondences..." << flush; 
    double inlierThreshold = 40; 
    pcl::registration::CorrespondenceRejectorFeatures  rejector; 
    rejector.setSourceFeature<pcl::PFHSignature125>(descriptors1_MVS_src,"pfh_source"); 
    rejector.setTargetFeature<pcl::PFHSignature125>(descriptors1_TLS_trg,"pfh_target"); 
    rejector.setDistanceThreshold<pcl::PFHSignature125>(inlierThreshold, "inlierThreshold"); 
    rejector.setInputCorrespondences(correspondences_all); 
    rejector.getCorrespondences(*correspondences_filtered); 
    cout << "OK! Correspondences filtered: " << correspondences_filtered->size()<< endl;