Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Fix log error message for "probability" argument validation in `PointCloud::SegmentPlane`

Open misha-kis opened this issue 1 year ago • 1 comments

Corrected the error message in cpp/open3d/geometry/PointCloudSegmentation.cpp:PointCloud::SegmentPlane. The probability argument is expected to be between 0 and 1, however log error message does not clearly reflect that.

Type

  • [x] Bug fix (non-breaking change which fixes an issue): Fixes #
  • [ ] New feature (non-breaking change which adds functionality). Resolves #
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

Incorrect error message can cause confusion during debugging. This PR fixes the incorrect error message.

Checklist:

  • [x] I have run python util/check_style.py --apply to apply Open3D code style to my code.
  • [ ] This PR changes Open3D behavior or adds new functionality.
    • [ ] Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is updated accordingly.
    • [ ] I have added or updated C++ and / or Python unit tests OR included test results (e.g. screenshots or numbers) here.
  • [x] I will follow up and update the code if CI fails.
  • [x] For fork PRs, I have selected Allow edits from maintainers.

Description

Argument probability of this function is expected to be between 0 and 1, however if the argument did not satisfy this, the log error message previously read "Probability must be > 0 or <= 1.0" whereas it should be "Probability must be > 0 and <= 1.0". The message now accurately reflects the expected value for probability argument.

misha-kis avatar Jan 24 '24 20:01 misha-kis

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

update-docs[bot] avatar Jan 24 '24 20:01 update-docs[bot]