|
TinyRobotics
|
Abstract interface for 2D grid maps and occupancy maps in TinyRobotics. More...
#include <IMap.h>


Public Member Functions | |
| virtual int | getXCount () const =0 |
| Get the number of cells in the X direction. | |
| virtual int | getYCount () const =0 |
| Get the number of cells in the Y direction. | |
| virtual float | getResolution () const =0 |
| Get the map resolution (cell size in meters). | |
| virtual bool | getCell (int x, int y, CellState &state) const =0 |
| Get the state of a cell by integer indices. | |
| virtual Coordinate< T > | toWorld (int x, int y) const =0 |
| Convert cell indices to world coordinates. | |
Public Member Functions inherited from IMapNeighbors< T > | |
| virtual std::vector< Coordinate< T > > | getNeighbors (Coordinate< T > from) const =0 |
| Get world coordinates of neighboring cells (for pathfinding or navigation). | |
| virtual bool | isValid (const Coordinate< T > &coord) const =0 |
| Check if a coordinate is inside the map bounds. | |
Abstract interface for 2D grid maps and occupancy maps in TinyRobotics.
IMap extends IMapNeighbors and provides a comprehensive interface for grid-based or cell-based maps for frontier exploring. It supports cell access, coordinate transforms, and neighbor queries, making it suitable for pathfinding, navigation, and mapping algorithms. All grid or occupancy map implementations (e.g., GridMap, GridBitMap) should inherit from this interface and implement all pure virtual methods.
Features:
| T | Scalar type for coordinates and math (default: DistanceM) |
|
pure virtual |
Get the state of a cell by integer indices.
| x | Cell X index |
| y | Cell Y index |
| state | Output: Cell state (FREE, OCCUPIED, UNKNOWN) |
Implemented in GridBitMap< T >, GridMap< StateT, T >, and CallbackMap< T >.
|
pure virtual |
Get the map resolution (cell size in meters).
Implemented in GridBitMap< T >, GridMap< StateT, T >, and CallbackMap< T >.
|
pure virtual |
Get the number of cells in the X direction.
Implemented in GridBitMap< T >, GridMap< StateT, T >, and CallbackMap< T >.
|
pure virtual |
Get the number of cells in the Y direction.
Implemented in GridBitMap< T >, GridMap< StateT, T >, and CallbackMap< T >.
|
pure virtual |
Convert cell indices to world coordinates.
| x | Cell X index |
| y | Cell Y index |
Implemented in GridMap< StateT, T >, GridBitMap< T >, and CallbackMap< T >.