Add a part of the new rigid registration method [FRICP] #6199
Add a part of the new rigid registration method [FRICP] #6199yaoyx689 wants to merge 33 commits into
Conversation
|
Hello, thanks for the pull request. A few things:
I assume you mean
I am not completely sure what you mean with this. Would you have to duplicate code from this pull request to |
|
Please update the license as per https://pcl.readthedocs.io/projects/tutorials/en/latest/writing_new_classes.html#licenses and use the |
|
Thanks for your reply. I will modify them as you said.
In cases where the two point clouds used for registration have partial overlap or noise, our robust ICP algorithm can achieve higher accuracy compared to traditional ICP algorithms. On one hand, this is due to using the Welsch function instead of the L2-norm as the objective function. It reduces the impact of outliers, which is similar to the idea that ICP uses a distance threshold to filter outlier points, but it can achieve better results by giving each correspondence a different threshold instead of just 0,1. On the other hand, the Welsch function can provide a coarse-to-fine result by adjusting parameters (
By default, it will be set based on the maximum distance between corresponding points. This means it has the same effect as setting
In our method, an important part is that the parameters of the Welsch function can be adaptively adjusted. During the iteration process, the parameter |
|
Hello, We have recently added a subclass However, our PR is currently failing the automated checks because the server used for code verification runs out of disk space. Specifically, we are seeing the following error: It seems that #6364encountered a similar issue before. Could you please clean up the disk space on the server corresponding to the Ubuntu 24.04 GCC build environment so that our PR can proceed successfully? Thank you very much for your help. |
|
Hi, thanks for adding the new class. I will take a closer look and test your changes as soon as I have time, but that might take a few weeks. |
mvieth
left a comment
There was a problem hiding this comment.
Hello, I have finally found some time to test your code in detail. With several point clouds, FRICP was indeed able to find a more accurate alignment than other registration algorithms. So I think it would be great to have it in PCL, but first, here are a few review comments I would ask you to address. Thank you!
|
Thanks for the detailed review — I’ve addressed all actionable comments from your latest review.
|
|
AI had suggestions to use () instead of [] at some eigen indexing. |
The whole Out of interest, which LLM did you use?
Not sure where the difference/advantage is?
|
Ahh, doh. I just thought the indexing of the method after :: was odd, but it seemingly is so.
Copilot - but what specific model, unsure. Either GPT 5 mini, Haiku 4.5 or GPT 4.1.
AIs own reply when I asked about the same. Short answer: use residuals(i) because () is the canonical, unambiguous Eigen element-access operator and is preferred for matrices/vectors and expression-proxy types.
|
|
Thanks for the review and suggestions. I’ll update the PR accordingly, including the index type changes, Eigen access style cleanup, and the residual handling improvements. |
…duals, Eigen::Index
|
I just asked GPT 5.3-codes - and it came up with the following issues(discussions): Findings (ordered by severity) I haven't reviewed them closely, but I think some of them should be looked at. |
|
I have tested in a program that I'm currently working on and it works really well, so its a nice addition btw 👍 |
|
The clang-tidy warning in concave_hull.cpp is a pre‑existing issue in the codebase and might be addressed separately. |
@larshg So which of these points do you think make sense, and which ones do you think we should ignore (or postpone)? For example I think "FRICP ignores max correspondence distance from the Registration/ICP API" -- this is fine because FRICP has its own mechanism of rejecting correspondences with high distance. At most, we could consider adding a note in the documentation or warning if the max correspondence distance has been set to a non-default value. |
I see no warning in concave_hull.cpp, but I see the following: |
My apologies — Copilot gave me an incorrect explanation. I correct this issue and submit it. Sorry for the confusion and the trouble caused. |
I agree, it was also my own initial thought. But maybe it should be overwritten and output a warning that it doesn't have any effect in this algorithm?
I guess this is fine - it seems faster already anways.
Maybe just document that you can't add the other correspondence estimators/rejectors since they are not used.
If it is expected not to handle this, its fine as is (maybe add assert for it?) and document that it can't handle NAN/Inf
Minor adjustment to documentation.
Easy to add
We have changed many to field initialization, so lets do that here and remove the values from the init-list. |
…ocumentation - Add Ptr/ConstPtr type aliases to FRICP class header - Add assert for finite source/target points (no NaN/Inf) - Document that FRICP ignores maxCorrespondenceDistance, correspondence estimators/rejectors, and that maxIterations controls inner-loop iterations only - Fix setDynamicWelschDecay() doc to note 0 maps to 0.5 - Remove redundant ctor init-list values (robust_function_, nu_end_ratio_ already have in-class defaults)
…it-list Previously removed robust_function_ from constructor init-list along with nu_end_ratio_, but robust_function_ had no in-class initializer, leading to default-initialization of an enum class (indeterminate value). Add explicit in-class default to WELSCH to preserve correct behavior.
|
Thanks for the thorough review! I've addressed all points in the latest commit:
|
|
Do you have any strong opnion about your convergence criteria - your Matrix substraction delta, or would you consider using the Default Convergence Criteria instead? It stops quite earlier than your default implementation when I test with bun0 + bun4. I made the changes here: larshg@a80912a FYI. its mostly AI generated. |
|
Sounds good, I'll switch to DefaultConvergenceCriteria to stay consistent with PCL. |
- Add ConvergenceTrigger enum to track why FRICP stopped - Add getLastConvergenceTrigger() for diagnostic queries - Integrate DefaultConvergenceCriteria as an additional convergence check alongside the existing transform delta - Populate pcl::Correspondences in updateCorrespondences so getFitnessScore() works correctly - Set transformation_ delta each iteration for criteria checks - Track convergence state on all error/early-return paths Based on larshg's proposal in PR discussion.
|
getLastConvergenceTrigger - is not common PCL - it was my own testing to figure out when it finished on default criteria vs. your original matrix substraction. So if you replace the matrix substraction with defaultcriteria, you don't need getLastConvergenceTrigger. But you more or less just added my test code? I think we should go with either of them - not both? Should probably be moved under the Anderson acceleration step - same place where you currently calculate the matrix substraction delta? |
|
Also DefaultConvergenceCritria already has |
|
Sorry for not being more specific in what I was expecting from showing my test code. |
|
Looks like some formatting went horribly wrong 😄 |
- Remove ConvergenceTrigger enum and getLastConvergenceTrigger() (larshg's test code, not needed for production) - Replace FRICP's own matrix delta check with DefaultConvergenceCriteria - Move delta_transform calculation after Anderson acceleration step - Use CONVERGENCE_CRITERIA_NO_CORRESPONDENCES on error paths - Populate correspondences_ so getFitnessScore() works
Hi, thanks for the suggestions of the contributor (#6061 (comment)), I added a class,
TransformationEstimationPointToPointRobust, which contains the implementation of the robust ICP part of the FRICP (https://github.com/yaoyx689/Fast-Robust-ICP).Compared with
TransformationEstimation, I added a parameter setting function, because its adaptive setting is very important for the results. If there is no additional setting for the parameter, I define a default setting.If possible, I hope to add a
FastRobustIterativeClosestPointclass later, similar toIterativeClosestPoint, to perform adaptive parameter adjustment and pass it into theTransformationEstimationPointToPointRobustclass.Furthermore, for Anderson acceleration, it is not enough to just create an accelerated class of
TransformationEstimation. The iterative process needs to be modified. If possible, these parts can also be organized inFastRobustIterativeClosestPoint.