-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
effort: lowRough estimate of time needed to fix/implement/solveRough estimate of time needed to fix/implement/solvegood first issueSkills/areas of expertise needed to tackle the issueSkills/areas of expertise needed to tackle the issuekind: todoType of issueType of issueneeds: feedbackSpecify why not closed/merged yetSpecify why not closed/merged yet
Description
As already discussed here default seed in random.h is not handled consistently.
pcl/common/include/pcl/common/random.h
Lines 163 to 186 in b4c785b
| struct Parameters | |
| { | |
| Parameters (T _mean = 0, T _sigma = 1, pcl::uint32_t _seed = 1) | |
| : mean (_mean) | |
| , sigma (_sigma) | |
| , seed (_seed) | |
| {} | |
| T mean; | |
| T sigma; | |
| pcl::uint32_t seed; | |
| }; | |
| /** Constructor | |
| * \param[in] mean normal mean | |
| * \param[in] sigma normal variation | |
| * \param[in] seed seeding value | |
| */ | |
| NormalGenerator(T mean = 0, T sigma = 1, pcl::uint32_t seed = -1); | |
| /** Constructor | |
| * \param parameters normal distribution parameters and seed | |
| */ | |
| NormalGenerator(const Parameters& parameters); |
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.
jasjuang
Metadata
Metadata
Assignees
Labels
effort: lowRough estimate of time needed to fix/implement/solveRough estimate of time needed to fix/implement/solvegood first issueSkills/areas of expertise needed to tackle the issueSkills/areas of expertise needed to tackle the issuekind: todoType of issueType of issueneeds: feedbackSpecify why not closed/merged yetSpecify why not closed/merged yet