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 21 commits intoPointCloudLibrary:masterfrom
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!
| updateCorrespondences(const Matrix4d& transform, | ||
| const Matrix3Xd& source, | ||
| const Matrix3Xd& target, | ||
| pcl::search::KdTree<pcl::PointXYZ>& tree, |
There was a problem hiding this comment.
| pcl::search::KdTree<pcl::PointXYZ>& tree, | |
| pcl::search::Search<pcl::PointXYZ>& tree, |
| * \ingroup common | ||
| */ | ||
| inline unsigned int | ||
| computeWeighted3DCentroid(ConstCloudIterator<PointSource>& cloud_iterator, |
There was a problem hiding this comment.
Using PointSource here is a problem if PointSource and PointTarget are not the same. Please add a template parameter to this function. computeWeighted3DCentroid could also be moved out of the TransformationEstimationPointToPointRobust class and be a free function instead.
registration/src/fricp.cpp
Outdated
| @@ -0,0 +1,37 @@ | |||
| /* | |||
There was a problem hiding this comment.
I think having these .cpp files that only include the .h files are not really necessary?
| Matrix4& transformation_matrix) const override; | ||
|
|
||
| void | ||
| set_sigma(Scalar sigma) |
There was a problem hiding this comment.
Please add some documentation to this method, for example: what does this parameter do (short description), which values are allowed (positive/negative?), does the user have to call this function or is there a good default (I think there is a good default value, right?)
|
|
||
| template <typename PointSource, typename PointTarget, typename Scalar> | ||
| double | ||
| FastRobustIterativeClosestPoint<PointSource, PointTarget, Scalar>::computeMedian( |
There was a problem hiding this comment.
PCL already has a computeMedian function in common.h: https://pointclouds.org/documentation/namespacepcl.html#aba79ef8875ca3f1085f257ca1530fffe Can you use that one?
| void | ||
| setDynamicWelschBeginRatio(double ratio); | ||
|
|
||
| void | ||
| setDynamicWelschEndRatio(double ratio); | ||
|
|
||
| void | ||
| setDynamicWelschDecay(double ratio); |
There was a problem hiding this comment.
Please add some documentation to these functions, e.g. what effect does it have when they are set to a smaller/larger value than before?
| matrixLog(const Matrix4d& transform) const; | ||
|
|
||
| RobustFunction robust_function_; | ||
| bool use_anderson_ = true; |
There was a problem hiding this comment.
I have tested several point clouds with and without Anderson acceleration enabled, and I have found that when it is enabled, the registration progress is often rather unpredictable and chaotic. Therefore I would rather make this option false by default and users can opt-in.
| @@ -0,0 +1,581 @@ | |||
| /* | |||
There was a problem hiding this comment.
Please use the shorter license text as described here: https://pcl.readthedocs.io/projects/tutorials/en/latest/writing_new_classes.html#licenses
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.