PointCloudLibrary / PointCloudLibrary/pcl

[io] `OctreePointCloudCompression` only supports types pre-baked in `io/src/compression.cpp`

Open
#4,516 15 comments 1 reaction 0 assignees View on GitHub

@kunaltyagi is already working on this.

Since Nov 19, 2020.

  • #4522 by @kunaltyagi — open
kind: bug kind: compile error module: common needs: feedback
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

System: Ubuntu18.04LTS PCL1.9.1
I am compiling the source file in the tutorial pcl-pcl-1.9.1/doc/tutorials/content/sources/point_cloud_compression. By default it works well. The readthedocs said the compression supports any point types, but when I want to compress the point type pcl::PointXYZI, then it goes wrong when I am executing 'make'. The error message is as follows, How to compress pcl::PointXYZI?

CMakeFiles/point_cloud_compression.dir/point_cloud_compression.cpp.o: In function `SimpleOpenNIViewer::cloud_cb_(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZI> const> const&)':
point_cloud_compression.cpp:(.text._ZN18SimpleOpenNIViewer9cloud_cb_ERKN5boost10shared_ptrIKN3pcl10PointCloudINS2_9PointXYZIEEEEE[_ZN18SimpleOpenNIViewer9cloud_cb_ERKN5boost10shared_ptrIKN3pcl10PointCloudINS2_9PointXYZIEEEEE]+0xb7): undefined reference to `pcl::io::OctreePointCloudCompression<pcl::PointXYZI, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::Octree2BufBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::encodePointCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZI> const> const&, std::ostream&)'
point_cloud_compression.cpp:(.text._ZN18SimpleOpenNIViewer9cloud_cb_ERKN5boost10shared_ptrIKN3pcl10PointCloudINS2_9PointXYZIEEEEE[_ZN18SimpleOpenNIViewer9cloud_cb_ERKN5boost10shared_ptrIKN3pcl10PointCloudINS2_9PointXYZIEEEEE]+0xdb): undefined reference to `pcl::io::OctreePointCloudCompression<pcl::PointXYZI, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::Octree2BufBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::decodePointCloud(std::istream&, boost::shared_ptr<pcl::PointCloud<pcl::PointXYZI> >&)'
CMakeFiles/point_cloud_compression.dir/point_cloud_compression.cpp.o:(.data.rel.ro._ZTVN3pcl2io27OctreePointCloudCompressionINS_9PointXYZIENS_6octree27OctreeContainerPointIndicesENS3_20OctreeContainerEmptyENS3_14Octree2BufBaseIS4_S5_EEEE[_ZTVN3pcl2io27OctreePointCloudCompressionINS_9PointXYZIENS_6octree27OctreeContainerPointIndicesENS3_20OctreeContainerEmptyENS3_14Octree2BufBaseIS4_S5_EEEE]+0x20): undefined reference to `pcl::io::OctreePointCloudCompression<pcl::PointXYZI, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::Octree2BufBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::serializeTreeCallback(pcl::octree::OctreeContainerPointIndices&, pcl::octree::OctreeKey const&)'
CMakeFiles/point_cloud_compression.dir/point_cloud_compression.cpp.o:(.data.rel.ro._ZTVN3pcl2io27OctreePointCloudCompressionINS_9PointXYZIENS_6octree27OctreeContainerPointIndicesENS3_20OctreeContainerEmptyENS3_14Octree2BufBaseIS4_S5_EEEE[_ZTVN3pcl2io27OctreePointCloudCompressionINS_9PointXYZIENS_6octree27OctreeContainerPointIndicesENS3_20OctreeContainerEmptyENS3_14Octree2BufBaseIS4_S5_EEEE]+0x28): undefined reference to `pcl::io::OctreePointCloudCompression<pcl::PointXYZI, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::Octree2BufBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::deserializeTreeCallback(pcl::octree::OctreeContainerPointIndices&, pcl::octree::OctreeKey const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/point_cloud_compression.dir/build.make:323: recipe for target 'point_cloud_compression' failed
make[2]: *** [point_cloud_compression] Error 1
CMakeFiles/Makefile2:94: recipe for target 'CMakeFiles/point_cloud_compression.dir/all' failed
make[1]: *** [CMakeFiles/point_cloud_compression.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with io/src/compression.cpp and the tutorial source at doc/tutorials/content/sources/point_cloud_compression. Check how OctreePointCloudCompression types are handled there, then build the tutorial using pcl::PointXYZI. Done means the example links and builds successfully with that point type, with coverage for the supported compression path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.