All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RandomNumbers.cpp
37 // Enable the use of shallow_array_adaptor to create a uBLAS-vector-view of C-style array without copying data
84 OMPL_ERROR("Random number generation already started. Changing seed now will not lead to deterministic sampling.");
88 // In this case, since no seeds have been generated yet, so we remember this seed as the first one.
220 dimVector_.at(dim).second = std::make_shared<variate_generator_t> (generatorPtr_, *dimVector_.at(dim).first);
294 double t1 = 2.0 * boost::math::constants::pi<double>() * uniDist_(generator_), t2 = 2.0 * boost::math::constants::pi<double>() * uniDist_(generator_);
303 // From Effective Sampling and Distance Metrics for 3D Rigid Body Path Planning, by James Kuffner, ICRA 2004
317 // Generate a random value, the variate_generator is returning a shallow_array_adaptor, which will modify the value array:
338 void ompl::RNG::uniformProlateHyperspheroidSurface(const std::shared_ptr<const ProlateHyperspheroid> &phsPtr, double value[])
351 void ompl::RNG::uniformProlateHyperspheroid(const std::shared_ptr<const ProlateHyperspheroid> &phsPtr, double value[])
void quaternion(double value[4])
Uniform random unit quaternion sampling. The computed value has the order (x,y,z,w). The return variable value is expected to already exist.
Definition: RandomNumbers.cpp:290
void eulerRPY(double value[3])
Uniform random sampling of Euler roll-pitch-yaw angles, each in the range (-pi, pi]. The computed value has the order (roll, pitch, yaw). The return variable value is expected to already exist.
Definition: RandomNumbers.cpp:304
int halfNormalInt(int r_min, int r_max, double focus=3.0)
Generate a random integer using a half-normal distribution. The value is within specified bounds ([r_...
Definition: RandomNumbers.cpp:282
void uniformNormalVector(unsigned int n, double value[])
Uniform random sampling of a unit-length vector. I.e., the surface of an n-ball. The return variable ...
Definition: RandomNumbers.cpp:312
static std::uint_fast32_t getSeed()
Get the seed used to generate the seeds of each RNG instance. Passing the returned value to setSeed()...
Definition: RandomNumbers.cpp:227
double halfNormalReal(double r_min, double r_max, double focus=3.0)
Generate a random real using a half-normal distribution. The value is within specified bounds [r_min...
Definition: RandomNumbers.cpp:270
void setLocalSeed(std::uint_fast32_t localSeed)
Set the seed used for the instance of a RNG. Use this function to ensure that an instance of an RNG g...
Definition: RandomNumbers.cpp:255
static void setSeed(std::uint_fast32_t seed)
Set the seed used to generate the seeds of each RNG instance. Use this function to ensure the same se...
Definition: RandomNumbers.cpp:232
void uniformInBall(double r, unsigned int n, double value[])
Uniform random sampling of the content of an n-ball, with a radius appropriately distributed between ...
Definition: RandomNumbers.cpp:322