Classes | Functions
nav_grid Namespace Reference

Classes

class  GenericIndex
 A simple pair of x/y coordinates. More...
class  NavGrid
struct  NavGridInfo
class  VectorNavGrid

Functions

void gridToWorld (const NavGridInfo &info, int mx, int my, double &wx, double &wy)
 Convert from grid coordinates to world coordinates of the center of the cell.
bool isWithinGrid (const NavGridInfo &info, double wx, double wy)
 Check to see if the world coordinates are within the grid.
std::ostream & operator<< (std::ostream &stream, const NavGridInfo &info)
template<typename NumericType >
std::ostream & operator<< (std::ostream &stream, const GenericIndex< NumericType > &index)
void worldToGrid (const NavGridInfo &info, double wx, double wy, double &mx, double &my)
 Convert from world coordinates to the precise (double) grid coordinates.
void worldToGrid (const NavGridInfo &info, double wx, double wy, int &mx, int &my)
 Convert from world coordinates to grid coordinates without checking for legal bounds.
bool worldToGridBounded (const NavGridInfo &info, double wx, double wy, unsigned int &mx, unsigned int &my)
 Convert from world coordinates to grid coordinates.

Function Documentation

void nav_grid::gridToWorld ( const NavGridInfo &  info,
int  mx,
int  my,
double &  wx,
double &  wy 
) [inline]

Convert from grid coordinates to world coordinates of the center of the cell.

The resulting coordinates are for the center of the grid cell.

Parameters:
[in]mxThe x grid coordinate
[in]myThe y grid coordinate
[out]wxSet to the associated x world coordinate
[out]wySet to the associated y world coordinate

Definition at line 53 of file coordinate_conversion.h.

bool nav_grid::isWithinGrid ( const NavGridInfo &  info,
double  wx,
double  wy 
) [inline]

Check to see if the world coordinates are within the grid.

This should only be used if the caller does not need the associated grid coordinates. Otherwise it would be more efficient to call worldToGridBounded.

Parameters:
[in]wxThe x world coordinate
[in]wyThe y world coordinate
Returns:
True if the input coordinates were within the grid

Definition at line 154 of file coordinate_conversion.h.

std::ostream& nav_grid::operator<< ( std::ostream &  stream,
const NavGridInfo &  info 
) [inline]

Definition at line 84 of file nav_grid_info.h.

template<typename NumericType >
std::ostream& nav_grid::operator<< ( std::ostream &  stream,
const GenericIndex< NumericType > &  index 
) [inline]

Definition at line 88 of file index.h.

void nav_grid::worldToGrid ( const NavGridInfo &  info,
double  wx,
double  wy,
double &  mx,
double &  my 
) [inline]

Convert from world coordinates to the precise (double) grid coordinates.

The results are not rounded, so that the values can be used for locating a position within a cell

Parameters:
[in]wxThe x world coordinate
[in]wyThe y world coordinate
[out]mxSet to the associated x grid coordinate
[out]mySet to the associated y grid coordinate

Definition at line 69 of file coordinate_conversion.h.

void nav_grid::worldToGrid ( const NavGridInfo &  info,
double  wx,
double  wy,
int &  mx,
int &  my 
) [inline]

Convert from world coordinates to grid coordinates without checking for legal bounds.

Parameters:
[in]wxThe x world coordinate
[in]wyThe y world coordinate
[out]mxSet to the associated x grid coordinate
[out]mySet to the associated y grid coordinate
Note:
The returned grid coordinates are not guaranteed to lie within the grid.

Definition at line 83 of file coordinate_conversion.h.

bool nav_grid::worldToGridBounded ( const NavGridInfo &  info,
double  wx,
double  wy,
unsigned int &  mx,
unsigned int &  my 
) [inline]

Convert from world coordinates to grid coordinates.

Combined functionality from costmap_2d::worldToMap and costmap_2d::worldToMapEnforceBounds. The output parameters are set to grid indexes within the grid, even if the function returns false, meaning the coordinates are outside the grid.

Parameters:
[in]wxThe x world coordinate
[in]wyThe y world coordinate
[out]mxSet to the associated (bounds-enforced) x grid coordinate
[out]mySet to the associated (bounds-enforced) y grid coordinate
Returns:
True if the input coordinates were within the grid

Definition at line 104 of file coordinate_conversion.h.



nav_grid
Author(s):
autogenerated on Wed Jun 26 2019 20:09:30