As already discussed here default seed in random.h is not handled consistently.
|
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.
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
One constructor of
NormalGeneratorhas as default seed-1during the other one (viaParameters) has1as default seed.Furthermore you get currently following warning:
So we should discuss how to adjust code there.