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

Namespace for map utilities functions. More...

Classes

struct  MapBounds
 

Functions

void GetClosestGridCoordinate (double const resolution, Point2 const &pt, int &idx, int &idy)
 Gets the closest point on the grid.
 
void ComputeOffsets (double const resolution, Point2 const &pos, int const submap_size, int const map_size, MapBounds &index, MapBounds &offset)
 
template<typename T = MapType>
void GetSubMap (double const resolution, Point2 const &pos, int const map_size, T const &map, int const submap_size, T &submap)
 
template<typename T = MapType>
auto GetSubMap (double const resolution, Point2 const &pos, int const map_size, T const &map, int const submap_size)
 
int WriteMap (MapType const &map, std::string const &file_name)
 Write the world map to a file.
 
int WriteMapSparse (MapType const &map, std::string const &file_name)
 Write the world map to a file.
 
int IsPointOutsideBoundary (double const resolution, Point2 const &pos, int const sensor_size, int const boundary)
 

Detailed Description

Namespace for map utilities functions.

Function Documentation

◆ ComputeOffsets()

void ComputeOffsets ( double const resolution,
Point2 const & pos,
int const submap_size,
int const map_size,
MapBounds & index,
MapBounds & offset )
inline

Compute necessary map transformations when the point is close to the boundary

Definition at line 59 of file map_utils.h.

◆ GetClosestGridCoordinate()

void GetClosestGridCoordinate ( double const resolution,
Point2 const & pt,
int & idx,
int & idy )
inline

Gets the closest point on the grid.

Definition at line 51 of file map_utils.h.

◆ GetSubMap() [1/2]

template<typename T = MapType>
auto GetSubMap ( double const resolution,
Point2 const & pos,
int const map_size,
T const & map,
int const submap_size )
inline

Definition at line 100 of file map_utils.h.

◆ GetSubMap() [2/2]

template<typename T = MapType>
void GetSubMap ( double const resolution,
Point2 const & pos,
int const map_size,
T const & map,
int const submap_size,
T & submap )
inline

Definition at line 89 of file map_utils.h.

◆ IsPointOutsideBoundary()

int IsPointOutsideBoundary ( double const resolution,
Point2 const & pos,
int const sensor_size,
int const boundary )
inline

Definition at line 140 of file map_utils.h.

◆ WriteMap()

int WriteMap ( MapType const & map,
std::string const & file_name )
inline

Write the world map to a file.

Definition at line 109 of file map_utils.h.

◆ WriteMapSparse()

int WriteMapSparse ( MapType const & map,
std::string const & file_name )
inline

Write the world map to a file.

Definition at line 122 of file map_utils.h.