PointCloudLibrary / PointCloudLibrary/pcl
Can we have makeShared() for pcl::PolygonMesh?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
Your Environment
- Operating System and version: Ubuntu 18.04
- Compiler: GCC 7
- PCL Version: Latest
Context
I was experimenting with pcl::MeshSmoothingLaplacianVTK and then I realize there isn't a makeShared() function of pcl::PolygonMesh. For example, for the usual pcl::PointCloud<pcl::PointXYZ> we can do something like below
pcl::PointCloud<pcl::PointXYZ> cld;
pcl::VoxelGrid<pcl::PointXYZ> vox;
vox.setInputCloud(cld.makeShared());
vox.filter(cld);
but I can't do the below
pcl::PolygonMesh mesh;
pcl::MeshSmoothingLaplacianVTK vtk;
vtk.setInputMesh(mesh.makeShared());
vtk.process(mesh);
eventually I figured out if I want to keep my variables as object based and avoid mixing and matching with pointers, the below seems to work
pcl::PolygonMesh mesh;
pcl::MeshSmoothingLaplacianVTK vtk;
vtk.setInputMesh(boost::make_shared<pcl::PolygonMesh>(mesh));
vtk.process(mesh);
I am wondering is there a reason there isn't a makeShared() function for pcl::PolygonMesh? Or is it simply someone need to submit a PR to add that functionality?
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
Start by comparing pcl::PolygonMesh with pcl::PointCloud, especially how PointCloud provides makeShared(), and inspect the MeshSmoothingLaplacianVTK setInputMesh usage. Done means PolygonMesh supports the requested shared-pointer workflow and the example can use mesh.makeShared() instead of boost::make_shared.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100