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. |
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.
[in] | mx | The x grid coordinate |
[in] | my | The y grid coordinate |
[out] | wx | Set to the associated x world coordinate |
[out] | wy | Set 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.
[in] | wx | The x world coordinate |
[in] | wy | The y world coordinate |
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.
std::ostream& nav_grid::operator<< | ( | std::ostream & | stream, |
const GenericIndex< NumericType > & | index | ||
) | [inline] |
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
[in] | wx | The x world coordinate |
[in] | wy | The y world coordinate |
[out] | mx | Set to the associated x grid coordinate |
[out] | my | Set 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.
[in] | wx | The x world coordinate |
[in] | wy | The y world coordinate |
[out] | mx | Set to the associated x grid coordinate |
[out] | my | Set to the associated y grid coordinate |
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.
[in] | wx | The x world coordinate |
[in] | wy | The y world coordinate |
[out] | mx | Set to the associated (bounds-enforced) x grid coordinate |
[out] | my | Set to the associated (bounds-enforced) y grid coordinate |
Definition at line 104 of file coordinate_conversion.h.