Skip to content

Added unit test for points almost on a line, that previously resulted in NAN values.#6426

Merged
larshg merged 2 commits intoPointCloudLibrary:masterfrom
larshg:addunittestmls
Apr 27, 2026
Merged

Added unit test for points almost on a line, that previously resulted in NAN values.#6426
larshg merged 2 commits intoPointCloudLibrary:masterfrom
larshg:addunittestmls

Conversation

@larshg
Copy link
Copy Markdown
Contributor

@larshg larshg commented Apr 15, 2026

Adapted unit test from #788
Closes #787 as it verifies that it is already fixed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a regression unit test to ensure MovingLeastSquares with SAMPLE_LOCAL_PLANE upsampling does not emit NaN coordinates for an (almost) collinear input set, addressing the scenario described in #787 (adapted from #788).

Changes:

  • Introduces a new TEST(PCL, MovingLeastSquares_almost_on_line) case with a small, nearly collinear PointXYZ input.
  • Runs MLS with SAMPLE_LOCAL_PLANE upsampling and asserts output points are finite.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/surface/test_moving_least_squares.cpp Outdated
Comment thread test/surface/test_moving_least_squares.cpp
Comment thread test/surface/test_moving_least_squares.cpp Outdated
Comment thread test/surface/test_moving_least_squares.cpp Outdated
@larshg larshg added this to the pcl-1.16.0 milestone Apr 27, 2026
@larshg larshg merged commit 29feb18 into PointCloudLibrary:master Apr 27, 2026
13 checks passed
@larshg larshg deleted the addunittestmls branch April 27, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Moving Least Squares produces NaN outputs

3 participants