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

[GPU] Export and template extract clusters #4196

Merged
merged 3 commits into from
Apr 29, 2021

Conversation

larshg
Copy link
Contributor

@larshg larshg commented Jun 16, 2020

Make gpu_extract_clusters templated.

Make gpu_extract_clusters exported.

Are there a better way than:

    // Buffer in a new PointXYZ type
    PointT t = host_cloud_->points[i];
    PointXYZ p;
    p.x = t.x; p.y = t.y; p.z = t.z;

When using various point types, to get the XYZ part?

@SergioRAgostinho
Copy link
Member

When using various point types, to get the XYZ part?

  1. You can use copyPoint
  2. You can use the vector maps
    inline pcl::Vector3fMap getVector3fMap () { return (pcl::Vector3fMap (data)); } \
    inline pcl::Vector3fMapConst getVector3fMap () const { return (pcl::Vector3fMapConst (data)); } \
    inline pcl::Vector4fMap getVector4fMap () { return (pcl::Vector4fMap (data)); } \
    inline pcl::Vector4fMapConst getVector4fMap () const { return (pcl::Vector4fMapConst (data)); } \
    inline pcl::Array3fMap getArray3fMap () { return (pcl::Array3fMap (data)); } \
    inline pcl::Array3fMapConst getArray3fMap () const { return (pcl::Array3fMapConst (data)); } \
    inline pcl::Array4fMap getArray4fMap () { return (pcl::Array4fMap (data)); } \
    inline pcl::Array4fMapConst getArray4fMap () const { return (pcl::Array4fMapConst (data)); }

@kunaltyagi
Copy link
Member

kunaltyagi commented Jun 16, 2020

I'd recommend copyPoint. If needed, it can have specializations to increase performance, but using other methods would necessitate code-rewrite

EDIT:

Oh, and vector/array map gives the data, which might not have x, y, and z in order for custom types. Since PCL supports custom types (in a convoluted manner), it'd be better to use copyPoint

@kunaltyagi kunaltyagi added kind: question Type of issue module: gpu changelog: API break Meta-information for changelog generation and removed kind: question Type of issue labels Jun 16, 2020
@kunaltyagi kunaltyagi added needs: author reply Specify why not closed/merged yet needs: code review Specify why not closed/merged yet and removed needs: author reply Specify why not closed/merged yet labels Jun 16, 2020
@larshg larshg force-pushed the FixGPUExtractClusters branch from d500717 to 1cad2ba Compare June 16, 2020 08:19
@larshg
Copy link
Contributor Author

larshg commented Jun 16, 2020

Hmm, getting other result now than yesterday, so I have to dig a little to why this changed.

@larshg
Copy link
Contributor Author

larshg commented Jun 16, 2020

Found the mistake when changing to copypoint 😄

@SergioRAgostinho SergioRAgostinho removed the needs: code review Specify why not closed/merged yet label Jul 1, 2020
@larshg larshg force-pushed the FixGPUExtractClusters branch from 9f0c50f to 2083ac9 Compare July 4, 2020 18:05
@stale
Copy link

stale bot commented Aug 8, 2020

Marking this as stale due to 30 days of inactivity. Commenting or adding a new commit to the pull request will revert this.

@stale stale bot added the status: stale label Aug 8, 2020
@larshg larshg force-pushed the FixGPUExtractClusters branch from 2083ac9 to 578d5fc Compare August 8, 2020 11:53
@stale stale bot removed the status: stale label Aug 8, 2020
@larshg larshg force-pushed the FixGPUExtractClusters branch from 578d5fc to e55f740 Compare August 24, 2020 13:27
@stale
Copy link

stale bot commented Oct 4, 2020

Marking this as stale due to 30 days of inactivity. Commenting or adding a new commit to the pull request will revert this.

@stale stale bot added the status: stale label Oct 4, 2020
@larshg larshg force-pushed the FixGPUExtractClusters branch from e55f740 to 8119908 Compare February 19, 2021 20:04
Copy link
Member

@kunaltyagi kunaltyagi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise

@stale stale bot removed the status: stale label Mar 15, 2021
@larshg larshg force-pushed the FixGPUExtractClusters branch from 8119908 to c9f5083 Compare April 9, 2021 19:45
@larshg larshg merged commit 51b8652 into PointCloudLibrary:master Apr 29, 2021
@larshg larshg deleted the FixGPUExtractClusters branch April 29, 2021 20:40
mvieth pushed a commit to mvieth/pcl that referenced this pull request Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: API break Meta-information for changelog generation module: gpu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants