-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Nacho/generalized icp #3181
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
Nacho/generalized icp #3181
Conversation
This somehow extends PR isl-org#2425
This somehow extends PR isl-org#2425
Ideally one could also add a robust kernel in this step. This extends PR isl-org#2425
After changing how we compute the Jacbonians API
This finally works!
No time to deal with API changes, will fix this later
This static method always requires to resize the output vector of matrices
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
This actually works in gcc-9
theNded
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 20 of 22 files at r1, 2 of 2 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @nachovizzo)
cpp/open3d/geometry/PointCloud.h, line 99 at r2 (raw file):
/// Returns 'true' if the point cloud contains per-point covariance matrix. bool HasCovariances() const { return !points_.empty() && covariances_.size() == points_.size();
One potential change could be inheriting PointCloud in a specific context in the pipelines: https://github.com/intel-isl/Open3D/blob/master/cpp/open3d/pipelines/registration/ColoredICP.cpp#L45
The same applies to other extensions.
The current implementation looks fine though, as it couples with normal estimation.
cpp/open3d/pipelines/registration/GeneralizedICP.cpp, line 134 at r2 (raw file):
const Eigen::Matrix3d &Ct = target.covariances_[corres[i][1]]; const Eigen::Vector3d d = vs - vt; const Eigen::Matrix3d M = Ct + Cs;
You have mentioned that Ct + T @ Cs @ T.T was not implemented. Is it still the case? If so, please add a TODO line and leave it as a future work.
nachovizzo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @theNded)
cpp/open3d/geometry/PointCloud.h, line 99 at r2 (raw file):
Previously, theNded (Wei Dong) wrote…
One potential change could be inheriting PointCloud in a specific context in the pipelines: https://github.com/intel-isl/Open3D/blob/master/cpp/open3d/pipelines/registration/ColoredICP.cpp#L45
The same applies to other extensions.
The current implementation looks fine though, as it couples with normal estimation.
That was the original implementation on PR #2521. But without changing the whole registration pipeline to use Geometry3D instead of PointCloud it's sort of "impossible" to efficiently implement G-ICP. The main reasons could be (just for the records)
- You need to have access to the transformation on each iteration, this adds an extra member to all
TransformationPointToXclasses. Not a big deal, but more noise in there. - If we don't change this line https://github.com/intel-isl/Open3D/blob/784cb5ef4b6ba68f39c00aca4e887d13d8be1c96/cpp/open3d/pipelines/registration/Registration.cpp#L160 then, if we pass a
PointCloudforGeneralizedICPthere, we lose the nonPointCloudmembers when we perform the copy. - Because of the last point, we need to re-compute the covariances matrices at each ICP iteration that it's how I was doing it in the past, but it's slower.
Overall I still feel "unsafe" of adding a 4th private member to the PointCloud class, but this might also bring more flexibility for different applications.
cpp/open3d/pipelines/registration/GeneralizedICP.cpp, line 134 at r2 (raw file):
Previously, theNded (Wei Dong) wrote…
You have mentioned that Ct + T @ Cs @ T.T was not implemented. Is it still the case? If so, please add a TODO line and leave it as a future work.
It used to be like that, but since now the covariance is a private member of the PointCloud when you hit this line https://github.com/intel-isl/Open3D/blob/784cb5ef4b6ba68f39c00aca4e887d13d8be1c96/cpp/open3d/pipelines/registration/Registration.cpp#L162 then the Cs matrix will also get transformed here: https://github.com/nachovizzo/Open3D/blob/nacho/generalized_icp/cpp/open3d/geometry/Geometry3D.cpp#L164. Which is a nice outcome of the "new" implementation. That also might explain why when re-running the experiments there was a small improvement on the G-ICP approach.
PR #2521
| Method | Implementation | avg. translational error | avg. rotational error |
|---|---|---|---|
| gicp | Open3D | 1.18 | 0.568 |
PR #3181
| Method | Implementation | avg. translational error | avg. rotational error |
|---|---|---|---|
| gicp | Open3D | 1.16 | 0.561 |
Is not a big deal, but, it's better :)
theNded
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @nachovizzo)
@theNded Should I do something? It looks good to me so far. |
Looks fine for me -- I will take some time to test the entire reconstruction system before merging just in case. Thanks! |
|
@nachovizzo Sorry I forgot about this... Let me fix it today. |
Generalized ICP
This PR brings the power of gicp to Open3D.
Experiments
KITTI benchmark, Sequence 00
Sequence 00
I also did some other experiments on different sequences that I will omit to
save space on this PR description.
Footnote
I'd like to create a more precise tutorial. The problem is I ran out of time and I can't contribute any more to this implementation(although I wish I had more time!).
I'm more than happy to review and comment if anyone from the
Open3Dcommunity or wants to extend this Pull Request.From my point of view, some stuff that needs to be addressed in future changes are:
transformationused inPointCloud.Transformtest is not even in homogenous coordinates)DISABLEDunit tests, related toGeneralizedICPandEstimateCovariancesPointCloudexamples showing the use case of the new data memberpcd.covariances_I'm sorry but this is the best I can do with my available free time.
Old PR
I have created a deprecated PR: #2521 but there was some discussion in there
This change is