wh200720041 / floam

Fast LOAM: Fast and Optimized Lidar Odometry And Mapping for indoor/outdoor localization IROS 2021
Other
1.07k stars 278 forks source link

compile error with floam #3

Closed Freeecode closed 4 years ago

Freeecode commented 4 years ago

Hi! Thanks for sharing the great work! However, there are some problems in the repository, the definitions of feature extraction in 'laserProcessingClass.h' are different from the realizations of feature extraction in 'laserProcessingClass.cpp'

DarrenWong commented 4 years ago

first of all, the performance is quite good. It works after syncing the header in the iscloam, https://github.com/wh200720041/iscloam/blob/master/include/laserProcessingClass.h @wh200720041 might be you need to sync the header file for the compile error


        LaserProcessingClass();
        void init(lidar::Lidar lidar_param_in);
-       void preFiltering(const pcl::PointCloud<pcl::PointXYZI>::Ptr pc_in, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_out);
-       void featureExtraction(const pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_in, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_out_sharp, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_out_lessSharp, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_out_flat, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_out_lessFlat);
-       void featureExtractionFromSector(const pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_in, std::vector<Double2d>& cloudCurvature, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_edge_sharp, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_edge_lessSharp, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_surf_flat, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_surf_lessFlat);   
+       void featureExtraction(const pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_in, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_out_edge, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_out_surf);
+       void featureExtractionFromSector(const pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_in, std::vector<Double2d>& cloudCurvature, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_out_edge, pcl::PointCloud<pcl::PointXYZI>::Ptr& pc_out_surf);   
    private:
        lidar::Lidar lidar_param;
-
-       pcl::CropBox<pcl::PointXYZI> closePointFilter;
-       pcl::CropBox<pcl::PointXYZI> farPointFilter;
-       pcl::VoxelGrid<pcl::PointXYZI> downSizeFilter;
wh200720041 commented 4 years ago

Hi!

Thanks for posting question here, and @DarrenWong his answer is right.

I have updated code, you may try to compile again.

Thanks Han