Robowflex
v0.1
Making MoveIt Easy
|
Collection of methods relating to random sampling. More...
Functions | |
void | setSeed (unsigned int seed) |
Set the random seed of the underlying generator. More... | |
double | uniform01 () |
Generate a random real in [0,1). More... | |
double | uniformReal (double lower_bound, double upper_bound) |
Generate a random real within given bounds: [lower_bound, upper_bound) More... | |
int | uniformInt (int lower_bound, int upper_bound) |
Generate a random integer within given bounds: [lower_bound, upper_bound) More... | |
bool | uniformBool () |
Generate a random boolean. More... | |
double | gaussian01 () |
double | gaussian (double mean, double stddev) |
Generate a random real using a normal distribution with given mean and standard deviation. More... | |
double | gaussian (double stddev) |
Generate a random real using a normal distribution with zero mean and given standard deviation. More... | |
Eigen::Vector3d | uniformRPY (const Eigen::Vector3d &lbound, const Eigen::Vector3d &ubound) |
Uniform random sampling of Euler roll-pitch-yaw angles within lower bound lbound and upper bound ubound computed value has the order (roll, pitch, yaw). More... | |
Eigen::Vector3d | uniformRPY (const Eigen::Vector3d &bounds) |
Uniform random sampling of Euler roll-pitch-yaw angles within lower bound lbound and upper bound ubound computed value has the order (roll, pitch, yaw). More... | |
Eigen::Vector3d | unifromRPY () |
Uniform random sampling of Euler roll-pitch-yaw angles, roll, yaw in range [-pi, pi) and pitch in range[-pi/2, pi/2) computed value has the order (roll, pitch, yaw). More... | |
Eigen::Vector3d | uniformVec (const Eigen::Vector3d &lbound, const Eigen::Vector3d &ubound) |
Generate a uniform real vector within given bounds: [lower_bound, upper_bound) More... | |
Eigen::Vector3d | uniformVec (const Eigen::Vector3d &bounds) |
Generate a uniform real vector within given bounds: [-bounds, bounds) More... | |
Eigen::Vector3d | gaussianVec (const Eigen::Vector3d &mean, const Eigen::Vector3d &stddev) |
Generate a random real vector using a normal distribution with given mean and standard deviation. More... | |
Eigen::Vector3d | gaussianVec (const Eigen::Vector3d &stddev) |
Generate a random real vector using a normal distribution with mean zero and standard deviation. More... | |
template<typename Iter > | |
Iter | uniformSample (Iter start, Iter end) |
Choose a random element between start and end. More... | |
template<typename Type > | |
Type & | uniformSample (std::vector< Type > &vector) |
Choose a random element from a vector. More... | |
Collection of methods relating to random sampling.
double robowflex::RNG::gaussian | ( | double | mean, |
double | stddev | ||
) |
Generate a random real using a normal distribution with given mean and standard deviation.
[in] | mean | Mean of the normal distribution. |
[in] | stddev | Standard deviation of the normal distribution. |
Definition at line 47 of file random.cpp.
double robowflex::RNG::gaussian | ( | double | stddev | ) |
Generate a random real using a normal distribution with zero mean and given standard deviation.
[in] | stddev | Standard deviation of the normal distribution. |
Definition at line 52 of file random.cpp.
double robowflex::RNG::gaussian01 | ( | ) |
Generate a random real using a normal distribution with mean 0 and variance 1
Definition at line 42 of file random.cpp.
Eigen::Vector3d robowflex::RNG::gaussianVec | ( | const Eigen::Vector3d & | mean, |
const Eigen::Vector3d & | stddev | ||
) |
Generate a random real vector using a normal distribution with given mean and standard deviation.
[in] | mean | Mean vector of the normal distribution. |
[in] | stddev | Standard deviation vector (diagonal covariance) of the normal distribution. |
Definition at line 103 of file random.cpp.
Eigen::Vector3d robowflex::RNG::gaussianVec | ( | const Eigen::Vector3d & | stddev | ) |
Generate a random real vector using a normal distribution with mean zero and standard deviation.
[in] | stddev | Standard deviation vector (diagonal covariance) of the normal distribution. |
Definition at line 112 of file random.cpp.
void robowflex::RNG::setSeed | ( | unsigned int | seed | ) |
Set the random seed of the underlying generator.
[in] | seed | Seed to set in generator. |
Definition at line 15 of file random.cpp.
double robowflex::RNG::uniform01 | ( | ) |
bool robowflex::RNG::uniformBool | ( | ) |
Generate a random boolean.
Definition at line 37 of file random.cpp.
int robowflex::RNG::uniformInt | ( | int | lower_bound, |
int | upper_bound | ||
) |
Generate a random integer within given bounds: [lower_bound, upper_bound)
[in] | lower_bound | Lower bound of uniform distribution. |
[in] | upper_bound | Upper bound of uniform distribution. |
Definition at line 31 of file random.cpp.
double robowflex::RNG::uniformReal | ( | double | lower_bound, |
double | upper_bound | ||
) |
Generate a random real within given bounds: [lower_bound, upper_bound)
[in] | lower_bound | Lower bound of uniform distribution. |
[in] | upper_bound | Upper bound of uniform distribution. |
Definition at line 25 of file random.cpp.
Eigen::Vector3d robowflex::RNG::uniformRPY | ( | const Eigen::Vector3d & | bounds | ) |
Uniform random sampling of Euler roll-pitch-yaw angles within lower bound lbound and upper bound ubound computed value has the order (roll, pitch, yaw).
[in] | bounds | [-bounds, bounds] is lower and upper bound is respectively. |
Definition at line 77 of file random.cpp.
Eigen::Vector3d robowflex::RNG::uniformRPY | ( | const Eigen::Vector3d & | lbound, |
const Eigen::Vector3d & | ubound | ||
) |
Uniform random sampling of Euler roll-pitch-yaw angles within lower bound lbound and upper bound ubound computed value has the order (roll, pitch, yaw).
[in] | lbound | Lower bound for roll pitch yaw. |
[in] | ubound | Upper bound for roll pitch yaw. |
Definition at line 57 of file random.cpp.
Iter robowflex::RNG::uniformSample | ( | Iter | start, |
Iter | end | ||
) |
Choose a random element between start and end.
[in] | start | Start iterator. |
[in] | end | End iterator. |
Definition at line 121 of file random.h.
Type& robowflex::RNG::uniformSample | ( | std::vector< Type > & | vector | ) |
Choose a random element from a vector.
[in] | vector | Vector to sample from. |
Definition at line 132 of file random.h.
Eigen::Vector3d robowflex::RNG::uniformVec | ( | const Eigen::Vector3d & | bounds | ) |
Generate a uniform real vector within given bounds: [-bounds, bounds)
[in] | bounds | Upper and (negative) lower bound vector of uniform distribution. |
Definition at line 98 of file random.cpp.
Eigen::Vector3d robowflex::RNG::uniformVec | ( | const Eigen::Vector3d & | lbound, |
const Eigen::Vector3d & | ubound | ||
) |
Generate a uniform real vector within given bounds: [lower_bound, upper_bound)
[in] | lbound | Lower bound vector of uniform distribution. |
[in] | ubound | Upper bound vector of uniform distribution. |
Definition at line 88 of file random.cpp.
Eigen::Vector3d robowflex::RNG::unifromRPY | ( | ) |
Uniform random sampling of Euler roll-pitch-yaw angles, roll, yaw in range [-pi, pi) and pitch in range[-pi/2, pi/2) computed value has the order (roll, pitch, yaw).
Definition at line 82 of file random.cpp.