GithubHelp home page GithubHelp logo

tim-robotics / nano_gicp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from engcang/nano_gicp

0.0 0.0 0.0 112.17 MB

Nano-GICP as a module from the official github repo: [IEEE RA-L & ICRA'22] A lightweight and computationally-efficient frontend LiDAR odometry solution with consistent and accurate localization.

License: MIT License

C++ 98.67% CMake 1.33%

nano_gicp's Introduction

Nano-GICP: Fast-GICP + Nano-FLANN

Dependencies

  • PCL >= 1.8
  • C++ >= 14
  • OpenMP >= 4.5
  • CMake >= 3.10.0
  • Eigen >= 3.3.7

Use case

  • Refer - here
  • Or, refer to the example usage as follows:
    1. catkin build this repository in your workspace,
    2. In the CMakeLists.txt of your wanted package, import nano_gicp as a component of catkin
    find_package(catkin REQUIRED COMPONENTS
      ...
      nano_gicp #Include here
      ...
    )
    include_directories(
      ...
      ${catkin_INCLUDE_DIRS} #Header files are included in catkin_INCLUDE_DIRS
      ...
    )
    add_library(some_library src/some_src.cpp)
    target_link_libraries(some_library ${catkin_LIBRARIES}) #Libraries are included in catkin_LIBRARIES
    1. Use in the source file of your wanted package as:
    #include <nano_gicp/point_type_nano_gicp.hpp> //change PointType in this headerfile, currently pcl::PointXYZI
    #include <nano_gicp/nano_gicp.hpp>
    
    nano_gicp::NanoGICP<PointType, PointType> m_nano_gicp;
    
    ////// nano_gicp init
    m_nano_gicp.setMaxCorrespondenceDistance(max_corres_dist_);
    m_nano_gicp.setNumThreads(thread_number_);
    m_nano_gicp.setCorrespondenceRandomness(correspondences_number_);
    m_nano_gicp.setMaximumIterations(max_iter_);
    m_nano_gicp.setTransformationEpsilon(transformation_epsilon_);
    m_nano_gicp.setEuclideanFitnessEpsilon(euclidean_fitness_epsilon_);
    m_nano_gicp.setRANSACIterations(ransac_max_iter_);
    m_nano_gicp.setRANSACOutlierRejectionThreshold(ransac_outlier_rejection_threshold_);
    
    ////// use
    pcl::PointCloud<pcl::PointXYZI>::Ptr src_(new pcl::PointCloud<pcl::PointXYZI>);
    pcl::PointCloud<pcl::PointXYZI>::Ptr dst_(new pcl::PointCloud<pcl::PointXYZI>);
    pcl::PointCloud<PointType> dummy_;
    /* watch out! */
    *src_ = src_data; //put your data here
    *dst_ = dst_data; //put your data here
    /* watch out! */
    m_nano_gicp.setInputSource(src_);
    m_nano_gicp.calculateSourceCovariances();
    m_nano_gicp.setInputTarget(dst_);
    m_nano_gicp.calculateTargetCovariances();
    m_nano_gicp.align(dummy_);
    
    double score_ = m_nano_gicp.getFitnessScore();
    // if matchness score is lower than threshold, (lower is better)
    if(m_nano_gicp.hasConverged() && score_ < icp_score_threshold)
    {
      Eigen::Matrix4f pose_betweenf_ = m_nano_gicp.getFinalTransformation(); //float
      Eigen::Matrix4d pose_betweend_ = m_nano_gicp.getFinalTransformation().cast<double>(); //double
    }

License and acknowledgements

This work is licensed under the terms of the MIT license.

  • FastGICP - Kenji Koide, Masashi Yokozuka, Shuji Oishi, and Atsuhiko Banno, “Voxelized GICP for Fast and Accurate 3D Point Cloud Registration,” in IEEE International Conference on Robotics and Automation (ICRA), IEEE, 2021, pp. 11 054–11 059.
  • NanoFLANN - Jose Luis Blanco and Pranjal Kumar Rai, “NanoFLANN: a C++ Header-Only Fork of FLANN, A Library for Nearest Neighbor (NN) with KD-Trees,” https://github.com/jlblancoc/nanoflann, 2014.
  • DLO - Kenny Chen, Brett T. Lopez, Ali-akbar Agha-mohammadi, and Ankur Mehta, “Direct LiDAR Odometry: Fast Localization With Dense Point Clouds,” in IEEE Robotics and Automation Letters, 2022.

nano_gicp's People

Contributors

kennyjchen avatar engcang avatar sumanthrao1997 avatar btlopez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.