PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
10.04k stars 4.62k forks source link

[Recognition] lineRGBD::loadTemplates cannot load cannot read PCD files in LTM archive #3887

Open truhoang opened 4 years ago

truhoang commented 4 years ago

Describe the bug

Just want to create the issue for the record. I can PR my attempt at a solution ASAP.

lineRGBD::loadTemplates attempt to load PCD files directly from file name in the archive L106. The PCD reader give cannot find PCD file because the file (LTM) is not unpacked and data from the PCD file in the archive is not loaded (LTM file is simply a .tar archive).

Context

Loading Linemod templates and point cloud masks from LTM archive.

Expected behavior

No errors when loading templates.

Current Behavior

Cannot find PCD file when parsing LTM archive.

To Reproduce

Tar any PCD file into .ltm filetype and load using lineRGBD::loadTemplates.

Your Environment (please complete the following information):

Possible Solution

There are 2 solutions:

  1. Untar the file into a temporary folder using boost::filesystem and load PCD and SQMMT files in that folder then delete it. Avoid low-level(?) reading and managing tar headers.

  2. Use readBodyBinary method in PCDReader (trunk) to read the block of data. Minimal code change.

kunaltyagi commented 4 years ago

PR my attempt at a solution ASAP

Please do 😄