1 year ago

#38158

test-img

notARobot

Getting PCL Header when decoding with OctreePointCloudCompression

I'm using a simple encode and decode application for sending point cloud data as a stream using TCP. My issue can actually be reproduced just using the code from the following link:

https://pcl.readthedocs.io/en/latest/compression.html

Before encoding, I check the input with:

std::cout << "Input time (us) = " << cloud->header.stamp << std::endl;

After the decode portion, I add:

std::cout << "Output time (us) = " << output->header.stamp << std::endl;

Instead of using openNI for the incoming point cloud, I am using an Ouster tof635 lidar sensor and placing the points into a point cloud pointer to be used in the callback. I have no issues with this part.

I get a valid integer value for the cloud in the callback, but the output time after decoding is always zero. My suspicion is that the decode only copies the actual point cloud data from the stream and does not copy the header data at all.

My question is:
"Is there a function already existing in PCL that provides a way to get the header from the encoded stream (if the header is encoded at all), or will I likely need to write my own deserializing algorithm to pull the time stamp from the header of the encoded point cloud?"

I don't actually have an issue with the code I have written, but I am more looking for an answer about some insight into how to use the PCL OctreePointCloudCompression class. I see in the OctreePointCloudCompression file, there is a read and write frame header class members that are protected. This would lead me to believe these should be capturing the headers. Is it because "cloudOut" is a new point cloud and only the point data is copied to it?

c++

decoder

octree

pcl

0 Answers

Your Answer

Accepted video resources