Loading of `*.pcd` point clouds ignores decimals after initializing PyQt's QApplication
Opened this issue · 0 comments
Checklist
- I have searched for similar issues.
- For Python issues, I have tested with the latest development wheel.
- I have checked the release documentation and the latest documentation (for
master
branch).
Describe the issue
I am trying to load a *.pcd
point cloud that contains float positions within a PyQt application. When loading the point cloud using o3d.io.read_point_cloud()
the points are rounded integers and Open3D ignored the decimal places, which do exist inside the file.
I tracked the bug to only happen after initializing the PyQt application with QApplication(sys.argv)
. Trying to load the point cloud outside the PyQt application (e.g. in ipython) works fine.
So I assume there must be an interdependence between Open3D and PyQt.
I reproduced this bug with a point cloud provided by sb. issuing this problem for my point cloud labeling tool here: ch-sa/labelCloud#68.
The point cloud was provided here: https://github.com/ch-sa/labelCloud/files/8345198/pointcloud_116.zip.
PyQt-Versions:
$ conda list | grep qt
pyqt5 5.15.4 pypi_0 pypi
pyqt5-qt5 5.15.2 pypi_0 pypi
pyqt5-sip 12.9.0 pypi_0 pypi
pytest-qt 4.0.2 pypi_0 pypi
Steps to reproduce the bug
import sys
from PyQt5.QtWidgets import QApplication
import open3d as o3d
QApplication(sys.argv)
pcd = o3d.io.read_point_cloud("pointcloud_116.pcd")
print(f"First point: {pcd.points[0]}")
Error message
First point: [-0. 11. 0.]
Expected behavior
A loaded point cloud with floats:
First point: [-0.20108423 11.055668 0.56653374]
This is the case when I comment QApplication(sys.argv)
out.
Open3D, Python and System information
- Operating system: Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal
- Python version: 3.8.11 (default, Aug 3 2021, 15:09:35) [GCC 7.5.0]
- Open3D version: 0.15.2
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip (inside conda)
More details can be found here: https://termbin.com/n0go
Additional information
The issue did not appear so far when loading other point cloud formats.