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

PLY files appear deformed in PCL #626

Closed
VictorLamoine opened this issue Apr 9, 2014 · 2 comments · Fixed by #879
Closed

PLY files appear deformed in PCL #626

VictorLamoine opened this issue Apr 9, 2014 · 2 comments · Fixed by #879
Labels
kind: bug Type of issue

Comments

@VictorLamoine
Copy link
Contributor

Some imported PLY files appear deformed when visualized in CloudViewer or PCLVisualizer. PCD files does not appear deformed :

The PCD file
pcd
The PLY file
ply_bin_or_ascii

Latest Trunk version (pulled april 9 2014)
Ubuntu 12.04 x64

PLY file header :

ply
format ascii 1.0
comment VCGLIB generated
element vertex 7334
property float x
property float y
property float z
element face 0
property list uchar int vertex_indices
end_header

Shared library dependencies :

dell@M6700:~/Copy/PLY_deformed/build$ ldd visualizer | grep pcl
    libpcl_common.so.1.7 => /usr/local/lib/libpcl_common.so.1.7 (0x00007f16fe689000)
    libpcl_io.so.1.7 => /usr/local/lib/libpcl_io.so.1.7 (0x00007f16fd6d4000)
    libpcl_visualization.so.1.7 => /usr/local/lib/libpcl_visualization.so.1.7 (0x00007f16fd3ac000)
    libpcl_io_ply.so.1.7 => /usr/local/lib/libpcl_io_ply.so.1.7 (0x00007f16f7d71000)
    libpcl_kdtree.so.1.7 => /usr/local/lib/libpcl_kdtree.so.1.7 (0x00007f16f73ad000)

See :
#510
#373

@taketwo
Copy link
Member

taketwo commented Apr 11, 2014

Hi Victor, thanks for the showcase project. I can confirm the issue. So it has something to do specifically with visualization, because converting the file to pcd using pcl_ply2pcd yields a non-deformed cube.

@nizar-sallem Any ideas about what might be the issue?

@VictorLamoine
Copy link
Contributor Author

www.pcl-users.org/Problem-with-displaying-PLY-point-cloud-tp4035248p4035364.html

Rodo - thanks for suggesting that. I finally found out what is going on. When
reading the PLY file a sensor_orientation_ field is somehow filled by
reading function (I don't know how it is happening since I have precompiled
version of PCL and I didn't have time to check it yet). If I call a
setIdentity() on sensor_orientation_ after reading the PLY file everything
is fine with displying.

Initializing sensor_orientation_ to the identity matrix might be a solution

I updated the test project, know we know exactly why the file is deformed:

Loaded ../clouds/cloud.ply successfuly
points[]: 7334
width: 7334
height: 1
is_dense: 0
sensor origin (xyz): [0, 0, 0] / orientation (xyzw): [0.5, 0, 0, 0]

The last line should be:
sensor origin (xyz): [0, 0, 0] / orientation (xyzw): [0, 0, 0, 1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Type of issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants