[pcl_visualizer] "Allow custom definition of non-dense point cloud"

Open
#5,748 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start by tracing updatePointCloud() and addPointCloud() to convertPointCloudToVTKPolyData(), where point validity is currently checked with three std::isfinite calls. Determine how a custom invalid-point definition could be exposed while preserving the existing behavior by default; done means both conversion paths support the requested customization without breaking non-dense point-cloud handling.

Written by the indexing model from the issue text.

Description

kind: request status: triage

When profiling, it seems that quite some time is being used to test if each point in a point cloud is valid. Of course, this is necessary for non-dense point clouds. However, it could be done faster.

This happens when calling updatePointCloud() and addPointCloud() which both calls convertPointCloudToVTKPolyData().

Then function tests non-density with

     // Check if the point is invalid
      if (!std::isfinite ((*cloud)[i].x) ||
          !std::isfinite ((*cloud)[i].y) ||
          !std::isfinite ((*cloud)[i].z))
        continue;

Here it would be useful to be able to inject a custom definition:

    // Check if the point is invalid
      if ( isInvalidPoint((*cloud)[i]) )
        continue;

For example, it may be enough for certain applications to test if the x-component is NaN to determine this. Today we get 3 tests per point and each may results in a non-inlined function call.

The downside is that each of the above three functions needs an additional template parameter.

I hope it is something that you will consider in the future.

kind regards

Thorsten

Dominant language
C++
Stars
11.2k
Forks
4.7k
Avg merge
6d 13h
Merged PRs (30d)
10

Getting set up

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.

More from PointCloudLibrary/pcl

All issues in PointCloudLibrary/pcl

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.