dr_example.cc File Reference

Domain randomization example client. More...

#include "dr_example.hh"

Functions

int main (int _argc, char **_argv)
 
std::mt19937 mt_rng (rng())
 
int getRandomInt (int min, int max)
 Get a random integer in a given interval. More...
 
double getRandomDouble (double min, double max)
 Get a random double in a given interval. More...
 
void waitMs (int delay)
 Waits a given number of ms. More...
 

Variables

std::random_device rng
 
std::uniform_int_distribution< int > uniform_dist
 

Detailed Description

Domain randomization example client.

Author
João Borrego : jsbruglie

Function Documentation

double getRandomDouble ( double  min,
double  max 
)

Get a random double in a given interval.

Value is sampled from uniform distribution

Parameters
minInterval lower bound
maxInterval upper bound
Returns
Random double
int getRandomInt ( int  min,
int  max 
)

Get a random integer in a given interval.

Value is sampled from uniform distribution

Parameters
minInterval lower bound
maxInterval upper bound
Returns
Random integer
int main ( int  _argc,
char **  _argv 
)
std::mt19937 mt_rng ( rng()  )
void waitMs ( int  delay)
inline

Waits a given number of ms.

Parameters
delayAmount of ms to wait

Variable Documentation

std::random_device rng
std::uniform_int_distribution<int> uniform_dist