Comments (5)
@mawenwuda Sorry, I am having difficulties interpreting your modifications. Could you explain, what exactly does not work currently? If you could provide an example where you call GICP, and show how the result does not match your expectations, that would be very helpful.
from pcl.
@mvieth While reading the source code of the computeTransformation function in the gicp.hpp file, I encountered some issues that I couldn't understand, as follows:
1.The defined matrix M is a local variable and is not used later. Why is it defined then?
if (nn_dists[0] < dist_threshold) { Eigen::Matrix3d& C1 = (*input_covariances_)[i]; Eigen::Matrix3d& C2 = (*target_covariances_)[nn_indices[0]]; Eigen::Matrix3d& M = mahalanobis_[i]; M = R * C1; Eigen::Matrix3d temp = M * R.transpose(); temp += C2; M = temp.inverse(); source_indices[cnt] = static_cast<int>(i); target_indices[cnt] = nn_indices[0]; cnt++; }
2.Is the transformation_ obtained from the function the current transformation matrix?If so, it will lead to subsequent issues.
rigid_transformation_estimation_( output, source_indices, *target_, target_indices, transformation_);
3.When the while loop starts for the second time, the variable transformation_ only represents the current transformation matrix, not the accumulated transformation matrix after multiple iterations. The following two lines of code cannot achieve their intended functionality
transform_R(i, j) += static_cast<double>(transformation_(i, k)) * static_cast<double>(guess(k, j));
query.getVector4fMap() = transformation_.template cast<float>() * query.getVector4fMap();
4.The purpose of this line of code is obviously to obtain the final transformation matrix. However, the variable previous_transformation_ does not seem to accumulate after multiple iterations, and it cannot achieve the intended purpose.
final_transformation_ = previous_transformation_ * guess;
from pcl.
While reading the source code of the computeTransformation function in the gicp.hpp file, I encountered some issues that I couldn't understand
@mawenwuda But have you tried running GICP? I have successfully used GICP several times, and as far as I can tell, the transformation it returned was always correct.
M
is a reference, so by assigning to it, we actually assign tomahalanobis_[i]
transformation_
is the total transformation matrix from all iterations (excluding theguess
I think).rigid_transformation_estimation_
updates the matrixtransformation_
is the accumulated transformation, why do you think it isn't?- I would suggest that you try running GICP yourself, and at the end, use
gicp.getFinalTransformation()
to getfinal_transformation_
and inspect its value
As I said in my last comment, if you have a test case where you run GICP and the behaviour is different from what you expected (so you observe a bug in practice), I am happy to investigate, but so far it seems to me that you simply misunderstand the code and assume it is a logic error.
from pcl.
@mvieth I think I misunderstood this piece of code, thank you very much for your explanation!
from pcl.
You are welcome
from pcl.
Related Issues (20)
- Access violation when calling RandomSampleConsensus::computeModel HOT 4
- [pcl/registration/ia_ransac>] I cannot find the specific implementation code for the feature search function. HOT 2
- IO PolygonMesh to PLY output cannot support large polygons HOT 2
- install PCL 1.14.1 in nvidia orin(aarch64) HOT 3
- [Features] IntegralImageNormalEstimation example crashes, ubuntu 22.04 HOT 1
- [common] Warning messages when converting empty PCLPointCloud2 HOT 5
- [CMAKE] FLANN_ROOT is used with cmake versions >=3.27 but CMP0144 is set to old HOT 1
- Octree boundary problem HOT 2
- ‘kdtree’ is predetermined ‘shared’ for ‘shared’ HOT 2
- PCLVisualizer cannot display TextureMesh HOT 5
- [CMakeLists] Build will fail due to multiple definition of target "flann" HOT 3
- pcl::RangeImage create or visualize HOT 3
- pcl::on_nurbs::FittingSurface::~FittingSurface() crash HOT 3
- BUG: Signed to Unsigned casting. I cannot build PCL in Windows HOT 5
- Update our clang-tidy github action HOT 2
- [compile error] "Could not find a package configuration file provided by "Boost" HOT 4
- [visualization] AreaPickingEvent.getPointsIndices() returns wrong indices HOT 8
- I got an error when I installed PCL and tried to run the program HOT 30
- Crashes on Ubuntu 24 when using minimum C++17 and expecting Eigen to not require explicit alignment anymore HOT 3
- CMake Error: Could not find CMAKE_ROOT !!! HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pcl.