23 static std::minstd_rand
rng;
31 static void seedGenerator(
unsigned long seed);
47 static SimPolygon2D randomTriangle(
double side_len,
double mean_side_len,
double sigma_side_len,
48 double min_vertex_dist,
double min_side_len,
const std::vector<SimPolygon2D>& existing_polys);
55 static SimPolygon2D randomRectangle(
double side_len,
double mean_side_len,
double sigma_side_len,
56 double min_vertex_dist,
double min_side_len,
const std::vector<SimPolygon2D>& existing_polys);
60 size_t size()
const {
return landmarks_.size(); }
65 void print(
const std::string&
s=
"")
const;
70 std::vector<SimWall2D> walls()
const;
77 bool contains(
const Point2&
p)
const;
86 static bool anyContains(
const Point2&
p,
const std::vector<SimPolygon2D>& obstacles);
89 static bool anyOverlaps(
const SimPolygon2D&
p,
const std::vector<SimPolygon2D>& obstacles);
92 static bool insideBox(
double s,
const Point2&
p);
96 const Point2&
p,
double threshold);
99 static Point2 randomPoint2(
double s);
102 static Rot2 randomAngle();
105 static double randomDistance(
double mu,
double sigma,
double min_dist = -1.0);
108 static Point2 randomBoundedPoint2(
double boundary_size,
109 const Point2Vector& landmarks,
double min_landmark_dist);
112 static Point2 randomBoundedPoint2(
double boundary_size,
114 const std::vector<SimPolygon2D>& obstacles,
double min_landmark_dist);
117 static Point2 randomBoundedPoint2(
double boundary_size,
118 const std::vector<SimPolygon2D>& obstacles);
121 static Point2 randomBoundedPoint2(
124 const std::vector<SimPolygon2D>& obstacles,
double min_landmark_dist);
127 static Pose2 randomFreePose(
double boundary_size,
const std::vector<SimPolygon2D>& obstacles);