Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PLY parser more tolerant towards files not adhering to standard #3542

Merged
merged 7 commits into from
Jan 16, 2020

Conversation

kunaltyagi
Copy link
Member

@kunaltyagi kunaltyagi commented Jan 10, 2020

Better error messages, better loops, less indentation.

Supersedes and closes #3527 . Fixes #3487. Closes #3353

@kunaltyagi
Copy link
Member Author

Test 110: test_non_linear is flaky on my system

@kunaltyagi kunaltyagi force-pushed the ply_parser_update branch 2 times, most recently from 6842d21 to 7e572a0 Compare January 10, 2020 22:26
@kunaltyagi
Copy link
Member Author

so i think pcl can improve the fault tolerance. corlor or position loss may replace by default

#3353 (comment) #3527 (comment)

With better error messages, it'll be easier to understand what's wrong. Making PCL more fault tolerant will require:

  • Zero as default: depends on UI. 0, ie: black (for color) or origin (for points) as missing doesn't make universal sense. Needs change in the API to accommodate "missing value"
  • Skip (and warn) items with missing properties: if it reads next element properties for current element that's cause for trouble. Needs setting in API to make it a conscious choice by the user

PCL is not a UI tool and is also used in cases where there's near zero user feedback. As such, it needs to ensure that the input is perfect (or bail out with an error) and none of the above options can achieve that (without more extensive changes). Missing fields are a sign of a larger error and dealing with them will only cause more issues for the rest of the input file. A best effort reader will require configs and options and that'll take more effort.

TLDR: Not against the proposal for a best-effort reader, just against that in the current provided API.

io/src/ply/ply_parser.cpp Outdated Show resolved Hide resolved
Copy link
Member

@taketwo taketwo left a comment

Choose a reason for hiding this comment

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

OK, that's convincing, thanks. Please squash.

io/include/pcl/io/ply/ply_parser.h Show resolved Hide resolved
@taketwo taketwo changed the title Better PLY parser Make PLY parser more tolerant towards files not adhering to standard Jan 16, 2020
@taketwo taketwo changed the title Make PLY parser more tolerant towards files not adhering to standard Make PLY parser more tolerant towards files not adhering to sta… Jan 16, 2020
@taketwo taketwo merged commit 24a625f into PointCloudLibrary:master Jan 16, 2020
@kunaltyagi kunaltyagi deleted the ply_parser_update branch January 17, 2020 02:00
@taketwo taketwo changed the title Make PLY parser more tolerant towards files not adhering to sta… Make PLY parser more tolerant towards files not adhering to standard Jan 18, 2020
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.

PLYReader fails to read without extra line at the end nor comment
2 participants