PointCloudLibrary / PointCloudLibrary/pcl

Inconsistent handling of default seed in NormalGenerator & UniformGenerator

Open
#2,985 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

effort: low good first issue kind: todo needs: feedback
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

As already discussed here default seed in random.h is not handled consistently.

https://github.com/PointCloudLibrary/pcl/blob/b4c785bf32b392b4570201e8fe9f97395bd98ba1/common/include/pcl/common/random.h#L163-L186

One constructor of NormalGenerator has as default seed -1 during the other one (via Parameters) has 1 as default seed.

Furthermore you get currently following warning:

common/include/pcl/common/impl/random.hpp:49:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(parameters_.seed != -1)

So we should discuss how to adjust code there.

Contributor guide

Open the contributing guide

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.

Research direction

Inspect the NormalGenerator constructors and Parameters in common/include/pcl/common/random.h, then trace the seed check in common/include/pcl/common/impl/random.hpp. Compare the two default-seed paths and reproduce the signed/unsigned warning. Done means the default seed behavior is consistent and the warning is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.