Skip to content

Compose ICP corrections in the reference frame - #318

Open
kaushikgunasekaren wants to merge 2 commits into
rai-opensource:masterfrom
kaushikgunasekaren:fix-icp-reference-composition-nov21
Open

kaushikgunasekaren wants to merge 2 commits into
rai-opensource:masterfrom
kaushikgunasekaren:fix-icp-reference-composition-nov21

Conversation

@kaushikgunasekaren

Copy link
Copy Markdown

Bug

ICP2d estimates new_T from the source points already transformed by the current pose. The correction therefore acts in the reference frame and must pre-multiply the accumulated pose. The current T @ new_T applies it on the wrong side.

With exact nearest-neighbor correspondences, a known small correction should recover the target in one iteration. A nonidentity initial pose instead retains transform error, and the ordinary convergence threshold can stop before alignment is exact. The existing identity-initial-pose case hides the first incorrect composition.

Change

Compose the correction as new_T @ T. Keep point correspondence selection, stopping criteria and the final orthonormalization from #204 unchanged.

Validation

  • 18 focused regression/control cases: 14 fail before the fix; all 18 pass after it.
  • Asymmetric, widely spaced point clouds with independently checked exact nearest-neighbor matches; three nonidentity initial poses; positive/negative rotation and translation corrections; one-step recovery; repeated iterations; already-aligned and default-identity controls.
  • Recovered transforms and transformed points match the known target; source points, reference points and the supplied initial pose remain unchanged.
  • Full local suite: 584 passed, 3 skipped, 99 subtests passed (21 warnings), versus 566 passed on unchanged master.
  • Changed-source/test Black 23.10.0 and fatal flake8 checks pass. Whole-repository fatal lint has two pre-existing undefined-name findings in tests/test_dualquaternion.py.

AI assistance was used for investigation, implementation and tests. Validation is local Python testing only; no lidar or hardware validation is claimed.

This branch has not been deployed

No deployments
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