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 modify parameters when use lidar pointcloud #7

Open
xiaoxueshengyao opened this issue Jun 27, 2023 · 6 comments
Open

How to modify parameters when use lidar pointcloud #7

xiaoxueshengyao opened this issue Jun 27, 2023 · 6 comments

Comments

@xiaoxueshengyao
Copy link

Thank you for your excellent work! I tried to use this algorithm for lidar point cloud of 16 scans. While I can not get correct transform. Should I modify some parameters for that. The picture is the transform result.

WXWorkCapture_16878557976169

@zhangxy0517
Copy link
Owner

To test KITTI data by running ./MAC --demo command, you should modify the demo function in main.cpp:

    float downsample = 0.3; //larger value for sparse pointcloud
    Voxel_grid_downsample(src_cloud, new_src_cloud, downsample);
    Voxel_grid_downsample(des_cloud, new_des_cloud, downsample);
    vector<vector<float>> src_feature, des_feature;
    FPFH_descriptor(new_src_cloud, downsample*5, src_feature);
    FPFH_descriptor(new_des_cloud, downsample*5, des_feature);

    vector<Corre_3DMatch>raw_correspondence, correspondence;
    feature_matching(new_src_cloud, new_des_cloud, src_feature, des_feature, raw_correspondence);
    
    // randomly downsample correspondences
    vector<int>rand_idx;
    boost_rand(5000, 0, (int)raw_correspondence.size() - 1, 5000, rand_idx);
    for(int i = 0; i< 5000; i++){
        correspondence.push_back(raw_correspondence[rand_idx[i]]);
    }

    registration(src_cloud, des_cloud, correspondence, ov_lable, folderPath, resolution, 0.95); //FPFH 0.95 or 0.9

@xiaoxueshengyao
Copy link
Author

Thanks for your reply. I tyied fix code like you suggested, and it is really useful for sparse lidar pointcoud. While it can not cover all of frame to frame registration.
And I can not get correct result when I tried to use it for frame to map registration. Is it not applicable for that?
Some bad results like this
frame2map

@zhangxy0517
Copy link
Owner

It seems that the frame point cloud is too sparse for FPFH to extract discriminative features. I think you may try some deep-learned methods mentioned in our paper to generate correspondences first, then feed the correspondences to MAC.

@CHANdaFeng
Copy link

Hello, may I ask how to modify the parameters according to the above operation and test two frames of 16 line LiDAR point clouds? One frame of point cloud has about 50000 points, but the calculation time is very long. Can you give some suggestions on how to modify the parameters。
The following are the results of terminal operation:
./MAC --demo
Start registration.
graph construction: 29.6819

coefficient computation: 368.68
340.93->min(340.93 1127.72 576.63)
clique computation: 5.57187
clique selection: 32.3755
hypothesis generation & evaluation: 0.216686
14 : 1206
1133 1220.67

Untitled

@zhangxy0517
Copy link
Owner

To test KITTI data by running ./MAC --demo command, you should modify the demo function in main.cpp:

    float downsample = 0.3; //larger value for sparse pointcloud
    Voxel_grid_downsample(src_cloud, new_src_cloud, downsample);
    Voxel_grid_downsample(des_cloud, new_des_cloud, downsample);
    vector<vector<float>> src_feature, des_feature;
    FPFH_descriptor(new_src_cloud, downsample*5, src_feature);
    FPFH_descriptor(new_des_cloud, downsample*5, des_feature);

    vector<Corre_3DMatch>raw_correspondence, correspondence;
    feature_matching(new_src_cloud, new_des_cloud, src_feature, des_feature, raw_correspondence);
    
    // randomly downsample correspondences
    vector<int>rand_idx;
    boost_rand(5000, 0, (int)raw_correspondence.size() - 1, 5000, rand_idx);
    for(int i = 0; i< 5000; i++){
        correspondence.push_back(raw_correspondence[rand_idx[i]]);
    }

    registration(src_cloud, des_cloud, correspondence, ov_lable, folderPath, resolution, 0.95); //FPFH 0.95 or 0.9

Please follow the above instructions. If the processing time is still significant, increase the parameter of the last line, for example, to 0.999

@CHANdaFeng
Copy link

Hello, my problem has been resolved,Thank you very much!

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