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

how to take fast_gicp in my own code? #129

Open
Nothand0212 opened this issue Jul 28, 2023 · 3 comments
Open

how to take fast_gicp in my own code? #129

Nothand0212 opened this issue Jul 28, 2023 · 3 comments

Comments

@Nothand0212
Copy link

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!

@ZepherusFF
Copy link

Hi ! Did you manage to figure out the issue ?

@Nothand0212
Copy link
Author

Hi ! Did you manage to figure out the issue ?

Sorry, I cannot find out what cause this problem.

@themightyoarfish
Copy link
Contributor

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

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

3 participants