fast_gicp icon indicating copy to clipboard operation
fast_gicp copied to clipboard

how to take fast_gicp in my own code?

Open Nothand0212 opened this issue 1 year ago • 3 comments

the example can run perfectly, but when I take fast_gicp in my own code, I receive signal SIGSEGV, Segmentation fault.

0x00007ffff6f05a5a in pcl::search::KdTree<pcl::PointXYZI, pcl::KdTreeFLANN<pcl::PointXYZI, flann::L2_Simple<float> > >::setPointRepresentation(boost::shared_ptr<pcl::PointRepresentation<pcl::PointXYZI> const> const&) () from /lib/x86_64-linux-gnu/libpcl_search.so.1.10
(gdb) bt

  #0  0x00007ffff6f05a5a in pcl::search::KdTree<pcl::PointXYZI, pcl::KdTreeFLANN<pcl::PointXYZI, flann::L2_Simple<float> > >::setPointRepresentation(boost::shared_ptr<pcl::PointRepresentation<pcl::PointXYZI> const> const&) ()
   from /lib/x86_64-linux-gnu/libpcl_search.so.1.10
#1  0x00005555555b6360 in pcl::Registration<pcl::PointXYZI, pcl::PointXYZI, float>::align(pcl::PointCloud<pcl::PointXYZI>&, Eigen::Matrix<float, 4, 4, 0, 4, 4> const&) ()
#2  0x00005555555e3d47 in mapLocalization::initializeSystem() ()

this is my code, the pcl_icp can run.

    // pcl::IterativeClosestPoint<PointType, PointType> icp;
    // icp.setInputSource( sourceCloud );
    // icp.setInputTarget( targetCloud );
    // icp.setRANSACIterations( 0 );
    // icp.setMaxCorrespondenceDistance( 25 );
    // icp.setMaximumIterations( 100 );
    // icp.setTransformationEpsilon( 1e-6 );
    // icp.setEuclideanFitnessEpsilon( 1e-6 );
    // icp.align( *aligned_cloud_icp, initialGuess );
    // correctedLidarFrame = icp.getFinalTransformation();

    fast_gicp::FastVGICP<pcl::PointXYZI, pcl::PointXYZI> icp;
    icp.setResolution( 1.0 );
    icp.setNumThreads( 4 );
    icp.setInputSource( sourceCloud );
    icp.setInputTarget( targetCloud );
    icp.align( *aligned_cloud_icp, initialGuess );
    correctedLidarFrame = icp.getFinalTransformation();

hope some help,thanks!

Nothand0212 avatar Jul 28 '23 06:07 Nothand0212

Hi ! Did you manage to figure out the issue ?

ZepherusFF avatar Jul 31 '23 21:07 ZepherusFF

Hi ! Did you manage to figure out the issue ?

Sorry, I cannot find out what cause this problem.

Nothand0212 avatar Aug 01 '23 03:08 Nothand0212

Try recent PCL if you can build from source and/or add add_definitions(${PCL_DEFINITIONS}) to both fast_gicp and your dependent project.

themightyoarfish avatar Sep 30 '23 19:09 themightyoarfish