Conversation
a59bb98 to
35ead9c
Compare
35ead9c to
46d0a68
Compare
|
Looks good to me - thanks 👍 |
|
First of all, sorry for the delay. I have to say, I am not so sure this is a good idea. The Just as an example, here: The given indices are used, but in several registration methods, e.g. in ICP: The indices are ignored again. So while your new test ensures that the found transformations are identical, the point clouds returned by the two align calls would have different numbers of points (your new test does not test this). Additionally, when a user calls for example reg_indices.setInputSource(source);
reg_indices.setInputTarget(target);
reg_indices.setIndices(indices);Is it really clear that the So overall, this pull request would likely "encourage" users to use Two things we could to with relatively low risk:
|
Description
This PR resolves issue #3109 where
pcl::IterativeClosestPoint(and other registration algorithms inheriting frompcl::Registration) were ignoring indices set viasetIndices().The root cause was that while
PCLBasestored the indices, theRegistrationclass was not propagating them to theCorrespondenceEstimationobject or the reciprocal search tree during the initialization phase (initCompute). This resulted in the algorithm always searching the full input cloud regardless of user-provided constraints.Changes
registration.hpp:initCompute()to propagateindices_to thecorrespondence_estimation_object.initComputeReciprocal()to utilizePCLBase::initCompute()for consistent initialization and ensured the reciprocal search tree respects the input indices.test_registration.cpp:IterativeClosestPoint_setIndicesthat verifies the transformation result withsetIndicesis identical to physically cropping the point cloud.Verification
PCL.IterativeClosestPoint_setIndicespasses successfully along with other existing tests.