Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy data directly into PCL point cloud buffers using void copyData(DataFormat *destination) const #175

Open
runenordmo opened this issue Oct 12, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@runenordmo
Copy link
Contributor

runenordmo commented Oct 12, 2021

Then the for-loop iterating over every point in

for(size_t i = 0; i < pointCloudPCL.points.size(); ++i)
{
pointCloudPCL.points[i].x = data(i).point.x; // NOLINT(cppcoreguidelines-pro-type-union-access)
pointCloudPCL.points[i].y = data(i).point.y; // NOLINT(cppcoreguidelines-pro-type-union-access)
pointCloudPCL.points[i].z = data(i).point.z; // NOLINT(cppcoreguidelines-pro-type-union-access)
pointCloudPCL.points[i].r = data(i).color.r; // NOLINT(cppcoreguidelines-pro-type-union-access)
pointCloudPCL.points[i].g = data(i).color.g; // NOLINT(cppcoreguidelines-pro-type-union-access)
pointCloudPCL.points[i].b = data(i).color.b; // NOLINT(cppcoreguidelines-pro-type-union-access)
}

will become a one-liner running void copyData(DataFormat *destination) const.

This is already possible copying Zivid::PointXYZW into pcl::PointXYZ, but not for more complex pcl types.


This would require the Zivid SDK to support more composed data formats, matching some of the PCL data types.

@runenordmo runenordmo added the enhancement New feature or request label Oct 13, 2021
@runenordmo
Copy link
Contributor Author

Discussed with @SatjaSivcev, will move this to our internal backlog, since this needs to be implemented in the SDK before it can be utilized in the sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant