PointCloudLibrary / PointCloudLibrary/pcl
PolygonMesh not loading 3d object on Linux platform
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
Hello,
I'm trying to load 3D object on pcl visualizer, where on windows it works like charm but in Linux its crashing and giving an error as,
double free or corruption (out)
15:43:04: The program has unexpectedly finished.
Please check the code below I have tried, were for both having the same error.
First way:
boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer;
pcl::PolygonMesh polymesh;
pcl::io::loadPolygonFile("/home/linux/Modules/Viewer/Vehicle.obj", polymesh);
viewer->addPolygonMesh(polymesh, "meshes", 0);
viewer->spin();
Second Way: That I found from here,
boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer;
pcl::PolygonMesh polymesh;
vtkSmartPointer<vtkPolyData> poly_data;
pcl::io::loadPolygonFileOBJ("/home/linux/Modules/Viewer/Vehicle.obj", polymesh);
pcl::io::mesh2vtk(polymesh, poly_data);
viewer->addModelFromPolyData(poly_data, "poly_data", 0);
viewer->setShapeRenderingProperties(pcl::visualization::PCL_VISUALIZER_SHADING,pcl::visualization::PCL_VISUALIZER_SHADING_PHONG,"poly_data");
viewer->spin();
Before I was trying with PCL 1.8.1 library, everything works fine except PolygonMesh. So I thought updating library to 1.9.1 will works but its not working. Now for updated library actually I'm facing two issues
- PolygonMesh is not working as already discussed.
- While adding a simple line using addline() and then using setShapeRenderingProperties() it is actually drawing the line on visualizer but, showing error on debugging console as below. So I'm not sure does I have properly updated the library or have missed something while updating.
[setShapeRenderingProperties] Could not find any shape with id
Regarding libraries:
I have tried PCL 1.8.1 and 1.9.1 both and causing the same issue for both libraries;
Supported libraries:
VTK-8.1.0, FLANN-1.8.4, BOOST-1.66.0, EIGEN-3.3.4, QHULL-2015.2. Please ask if I missed any library.
Compiler details:
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
Qt Editor Details:
Qt Creator 4.8.2, based on Qt 5.9.8 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)
System details:
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
Please update me where and what I have missed?
Thanks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Linux failure using the provided PCLVisualizer calls, especially loadPolygonFileOBJ, addPolygonMesh, addModelFromPolyData, and setShapeRenderingProperties. Inspect those entry points and compare the behavior with Windows; done means the mesh loads without the double-free crash and the reported shape-property warning is resolved or clearly explained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100