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

[PLYReader] Fix bad orientation & origin propreties #879

Merged
merged 1 commit into from
Sep 2, 2014
Merged

[PLYReader] Fix bad orientation & origin propreties #879

merged 1 commit into from
Sep 2, 2014

Conversation

VictorLamoine
Copy link
Contributor

Fixes #626

See pcl::PLYReader::read

When pcl::PLYReader::read is called, the orientation & origin of the cloud are specified.
But without the fix, the value passed is modified and the orientation_ proprety remains unmodified.

The same is happening with origin and origin_

Is that right @nizar-sallem ?

@VictorLamoine VictorLamoine changed the title Fix #626 Fix bad orientation & origin propreties Sep 1, 2014
@VictorLamoine VictorLamoine changed the title Fix bad orientation & origin propreties [PLYReader] Fix bad orientation & origin propreties Sep 1, 2014
@taketwo
Copy link
Member

taketwo commented Sep 2, 2014

That simple!

By the way, this bug would never happen if the input parameters origin and orientation were const-qualified. Actually, what about adding consts in this pull request?

@VictorLamoine
Copy link
Contributor Author

I agree they should be const but these parameters not defined as const in file_io.hpp (and ply_io derives from file_io)

Changing the parameters to const means changing this for every derived class; which should be done in an other pull request IMO.

@taketwo
Copy link
Member

taketwo commented Sep 2, 2014

Makes sense. Then perhaps you could send such a pr some time later for 1.8.0.

taketwo added a commit that referenced this pull request Sep 2, 2014
[PLYReader] Fix bad orientation & origin propreties
@taketwo taketwo merged commit ad3a363 into PointCloudLibrary:master Sep 2, 2014
@VictorLamoine VictorLamoine deleted the ply_fix branch September 2, 2014 13:23
@VictorLamoine
Copy link
Contributor Author

@taketwo My pull request was considering that origin and orientation were inputs, but it's not the case everywhere, for example in a PCD file the origin/orientation can be defined so in that case the parameters should be overwritten (in that case they are output).

So I don't think it's possible to make origin and orientation const in the parameters of the read function.

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.

PLY files appear deformed in PCL
2 participants