Skip to content

fix: propagate setIndices to correspondence estimation in registration#6425

Open
AlrIsmail wants to merge 1 commit intoPointCloudLibrary:masterfrom
AlrIsmail:fix/3109-registration-indices
Open

fix: propagate setIndices to correspondence estimation in registration#6425
AlrIsmail wants to merge 1 commit intoPointCloudLibrary:masterfrom
AlrIsmail:fix/3109-registration-indices

Conversation

@AlrIsmail
Copy link
Copy Markdown

Description

This PR resolves issue #3109 where pcl::IterativeClosestPoint (and other registration algorithms inheriting from pcl::Registration) were ignoring indices set via setIndices().

The root cause was that while PCLBase stored the indices, the Registration class was not propagating them to the CorrespondenceEstimation object 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:
    • Updated initCompute() to propagate indices_ to the correspondence_estimation_ object.
    • Refactored initComputeReciprocal() to utilize PCLBase::initCompute() for consistent initialization and ensured the reciprocal search tree respects the input indices.
  • test_registration.cpp:
    • Added a new deterministic regression test IterativeClosestPoint_setIndices that verifies the transformation result with setIndices is identical to physically cropping the point cloud.

Verification

  • New Test: PCL.IterativeClosestPoint_setIndices passes successfully along with other existing tests.

@AlrIsmail AlrIsmail force-pushed the fix/3109-registration-indices branch from a59bb98 to 35ead9c Compare April 12, 2026 19:28
@AlrIsmail AlrIsmail force-pushed the fix/3109-registration-indices branch from 35ead9c to 46d0a68 Compare April 12, 2026 21:59
@AlrIsmail AlrIsmail changed the title fix: propagate setIndices to correspondence estimation in registration (#3109) fix: propagate setIndices to correspondence estimation in registration Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant