Coverage Control Library
Loading...
Searching...
No Matches
CoverageControl Namespace Reference

Namespace for the CoverageControl library. More...

Namespaces

namespace  MapUtils
 Namespace for map utilities functions.
 

Classes

class  AbstractController
 
class  BivariateNormalDistribution
 Class for Bivariate Normal Distribution. More...
 
struct  BND_Cuda
 Structure to store the parameters of the Bivariate Normal Distribution. More...
 
struct  Bounds
 Structure to store the rectangular bounds of the polygons. More...
 
class  CentralizedCVT
 
struct  CGAL_DelaunayHelper
 
class  ClairvoyantCVT
 
class  CoverageSystem
 The CoverageSystem class is the main class for the coverage control library. More...
 
class  CudaUtils
 Static class for CUDA utilities This class provides utility functions for CUDA It is a static class and cannot be instantiated. More...
 
class  DecentralizedCVT
 
struct  Frontier
 A struct to store a frontier points and a value. More...
 
struct  FrontierCompare
 A struct to compare frontiers based on their value. More...
 
class  GeoLocalTransform
 
class  NearOptimalCVT
 
class  OracleBangExploreExploit
 
class  OracleExploreExploit
 
class  OracleSimulExploreExploit
 
class  Parameters
 Class to store parameters. More...
 
class  Plotter
 Class to plot the map. More...
 
struct  PlotterData
 Data structure to store plotter data. More...
 
struct  PolygonFeature
 A struct to store a polygon feature and a uniform importance value. More...
 
struct  Polygons_Cuda
 Structure to store the parameters of the polygons on the device. More...
 
struct  Polygons_Cuda_Host
 Structure to store the parameters of the polygons on the host. More...
 
class  RobotModel
 Class for handling the robot model. More...
 
class  Vec2d
 A class for 2D vector. More...
 
class  Voronoi
 Class for computing Voronoi cells. More...
 
class  VoronoiCell
 Struct for Voronoi cell. More...
 
class  WorldIDF
 Class for Importance Density Function (IDF) for the world. More...
 

Typedefs

typedef Eigen::Vector2d Point2
 
typedef Eigen::Vector2f Point2f
 
typedef Eigen::Vector3d Point3
 
typedef Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MapType
 
typedef std::vector< Point2PointVector
 
typedef std::priority_queue< Frontier, std::vector< Frontier >, FrontierComparequeue_t
 

Functions

auto NearOptimalCVTAlgorithm (int const num_tries, int const max_iterations, int const num_sites, MapType const &map, int const map_size, double const res)
 
auto NearOptimalCVTAlgorithm (int const num_tries, int const max_iterations, int const num_sites, MapType const &map, int const map_size, double const res, PointVector const &positions, Voronoi &voronoi)
 
auto NearOptimalCVTAlgorithm (int const num_tries, int const max_iterations, int const num_sites, MapType const &map, int const map_size, double const res, PointVector const &positions)
 
void PolygonYMonotonePartition (PointVector const &polygon, std::vector< PointVector > &y_monotone_polygons)
 Partition a polygon into y-monotone polygons.
 
void GenerateRandomPolygons (int const num_polygons, int const max_vertices, double const half_width, double const world_size, std::vector< PointVector > &polygons)
 Generate random polygons.
 
Point2 CGALtoCC (CGAL_Point2 const pt)
 
template<class Arrangement >
void CGAL_CCBTraversal (typename Arrangement::Ccb_halfedge_const_circulator circ, Polygon_2 &polygon)
 
template<class Arrangement >
void CGAL_GeneratePolygons (const Arrangement &arr, std::list< Polygon_2 > &polygon_list)
 
bool IsPointInPoly (CGAL_Point2 const &pt, Polygon_2 const &poly)
 
void PrunePolygons (std::list< Polygon_2 > &polygon_list, int const &map_size)
 
__host__ __device__ int Orientation (float2 const &p, float2 const &q, float2 const &r)
 
__host__ __device__ bool IsPointInMonotonePolygon (float *x, float *y, int sz, float2 const &r)
 
void generate_world_map_cuda (BND_Cuda *, Polygons_Cuda_Host const &, int const, int const, float const, float const, float const, float *importance_vec, float &)
 Function to generate the world map on the device.
 
bool CheckCudaErrors (cudaError_t result)
 
__device__ float2 TransformPoint (BND_Cuda const *device_dists, int i, float2 const &in_point)
 
__device__ float IntegrateQuarterPlane (BND_Cuda const &bnd, float2 const &in_point)
 
__device__ float ComputeImportanceBND (BND_Cuda const *device_dists, float2 const &bottom_left, float2 const &top_right, float2 const &mid_pt_cell)
 
__device__ float ComputeImportancePoly (Polygons_Cuda const &device_polygons, float2 const &mid_pt_cell)
 
__global__ void kernel (BND_Cuda const *device_dists, Polygons_Cuda const device_polygons, float *importance_vec)
 
__global__ void normalize (float *importance_vec)
 

Variables

double const kEps = 1e-10
 
float const kEpsf = 1e-6f
 
double const kLargeEps = 1e-4
 
double const kSqrt2 = std::sqrt(2)
 
double const kOneBySqrt2 = 1. / std::sqrt(2)
 
float const kOneBySqrt2f = 1.f / sqrtf(2.f)
 
double const kInfD
 
constexpr auto kMaxPrecision
 
float const kFloatMax
 Maximum value of float.
 
float const kFloatMin
 Minimum value of float.
 
__device__ __constant__ int cu_num_dists
 
__device__ __constant__ int cu_map_size
 
__device__ __constant__ float cu_resolution
 
__device__ __constant__ float cu_truncation
 
__device__ __constant__ float cu_trun_sq
 
__device__ __constant__ float cu_OneBySqrt2
 
__device__ __constant__ float cu_normalization_factor
 
__device__ __constant__ int cu_polygons_num_pts
 
__device__ __constant__ int cu_num_polygons
 

Detailed Description

Namespace for the CoverageControl library.

Function Documentation

◆ CGAL_CCBTraversal()

template<class Arrangement >
void CGAL_CCBTraversal ( typename Arrangement::Ccb_halfedge_const_circulator circ,
Polygon_2 & polygon )
inline

Definition at line 58 of file utilities.h.

◆ CGAL_GeneratePolygons()

template<class Arrangement >
void CGAL_GeneratePolygons ( const Arrangement & arr,
std::list< Polygon_2 > & polygon_list )
inline

Definition at line 74 of file utilities.h.

◆ CGALtoCC()

Point2 CGALtoCC ( CGAL_Point2 const pt)
inline

Definition at line 44 of file utilities.h.

◆ CheckCudaErrors()

bool CheckCudaErrors ( cudaError_t result)

Definition at line 40 of file cuda_utils.cu.

◆ ComputeImportanceBND()

__device__ float ComputeImportanceBND ( BND_Cuda const * device_dists,
float2 const & bottom_left,
float2 const & top_right,
float2 const & mid_pt_cell )

Definition at line 93 of file generate_world_map.cu.

◆ ComputeImportancePoly()

__device__ float ComputeImportancePoly ( Polygons_Cuda const & device_polygons,
float2 const & mid_pt_cell )

Definition at line 124 of file generate_world_map.cu.

◆ generate_world_map_cuda()

void generate_world_map_cuda ( BND_Cuda * host_dists,
Polygons_Cuda_Host const & host_polygons,
int const num_dists,
int const map_size,
float const resolution,
float const truncation,
float const pNorm,
float * importance_vec,
float & normalization_factor )

Function to generate the world map on the device.

Definition at line 175 of file generate_world_map.cu.

◆ GenerateRandomPolygons()

void GenerateRandomPolygons ( int const num_polygons,
int const max_vertices,
double const half_width,
double const world_size,
std::vector< PointVector > & polygons )

Generate random polygons.

Parameters
[in]num_polygonsThe number of polygons to generate
[in]max_verticesThe maximum number of vertices in each polygon
[in]half_widthThe half-width of the polygon
[in]world_sizeThe size of the world
[out]polygonsThe output polygons

Definition at line 69 of file polygon_utils.cpp.

◆ IntegrateQuarterPlane()

__device__ float IntegrateQuarterPlane ( BND_Cuda const & bnd,
float2 const & in_point )

Definition at line 76 of file generate_world_map.cu.

◆ IsPointInMonotonePolygon()

__host__ __device__ bool IsPointInMonotonePolygon ( float * x,
float * y,
int sz,
float2 const & r )

Check if the point r is inside the monotone polygon defined by the vertices x and y

Returns
true if the point is inside the polygon
false otherwise

Definition at line 59 of file geometry_utils.cuh.

◆ IsPointInPoly()

bool IsPointInPoly ( CGAL_Point2 const & pt,
Polygon_2 const & poly )
inline

Definition at line 92 of file utilities.h.

◆ kernel()

__global__ void kernel ( BND_Cuda const * device_dists,
Polygons_Cuda const device_polygons,
float * importance_vec )

Definition at line 146 of file generate_world_map.cu.

◆ normalize()

__global__ void normalize ( float * importance_vec)

Definition at line 166 of file generate_world_map.cu.

◆ Orientation()

__host__ __device__ int Orientation ( float2 const & p,
float2 const & q,
float2 const & r )

Get the orientation of the point r with respect to the directional vector from p to q

Returns
1 if point r is in counter clockwise direction, i.e., left of the vector
-1 if point r is in clockwise direction, i.e., right of the vector
0 otherwise

Definition at line 44 of file geometry_utils.cuh.

◆ PolygonYMonotonePartition()

void PolygonYMonotonePartition ( PointVector const & polygon,
std::vector< PointVector > & y_monotone_polygons )

Partition a polygon into y-monotone polygons.

Parameters
[in]polygonThe input polygon
[out]y_monotone_polygonsThe output y-monotone polygons

Definition at line 38 of file polygon_utils.cpp.

◆ PrunePolygons()

void PrunePolygons ( std::list< Polygon_2 > & polygon_list,
int const & map_size )
inline

Definition at line 100 of file utilities.h.

◆ TransformPoint()

__device__ float2 TransformPoint ( BND_Cuda const * device_dists,
int i,
float2 const & in_point )

Definition at line 61 of file generate_world_map.cu.

Variable Documentation

◆ cu_map_size

__device__ __constant__ int cu_map_size

Definition at line 52 of file generate_world_map.cu.

◆ cu_normalization_factor

__device__ __constant__ float cu_normalization_factor

Definition at line 57 of file generate_world_map.cu.

◆ cu_num_dists

__device__ __constant__ int cu_num_dists

Definition at line 51 of file generate_world_map.cu.

◆ cu_num_polygons

__device__ __constant__ int cu_num_polygons

Definition at line 59 of file generate_world_map.cu.

◆ cu_OneBySqrt2

__device__ __constant__ float cu_OneBySqrt2

Definition at line 56 of file generate_world_map.cu.

◆ cu_polygons_num_pts

__device__ __constant__ int cu_polygons_num_pts

Definition at line 58 of file generate_world_map.cu.

◆ cu_resolution

__device__ __constant__ float cu_resolution

Definition at line 53 of file generate_world_map.cu.

◆ cu_trun_sq

__device__ __constant__ float cu_trun_sq

Definition at line 55 of file generate_world_map.cu.

◆ cu_truncation

__device__ __constant__ float cu_truncation

Definition at line 54 of file generate_world_map.cu.

◆ kFloatMax

float const kFloatMax
Initial value:
=
std::numeric_limits<float>::max()

Maximum value of float.

Definition at line 36 of file generate_world_map.h.

◆ kFloatMin

float const kFloatMin
Initial value:
=
std::numeric_limits<float>::min()

Minimum value of float.

Definition at line 38 of file generate_world_map.h.