#include <grid_map.h>
Public Member Functions | |
GridMap (std::shared_ptr< GridCell > prototype, const GridMapParams ¶ms=MapValues::gmp) | |
virtual void | load_state (const std::vector< char > &) |
std::unique_ptr< GridCell > | new_cell () const |
double | occupancy (const Coord &area_id) const override |
Returns known information about the occupancy of a given area. More... | |
virtual const GridCell & | operator[] (const Coord &coord) const =0 |
virtual void | reset (const Coord &area_id, const GridCell &new_area) |
virtual std::vector< char > | save_state () const |
void | update (const Coord &area_id, const AreaOccupancyObservation &aoo) override |
Updates area with a given observation. More... | |
Public Member Functions inherited from RegularSquaresGrid | |
Point2D | cell_to_world (const Coord &cell) const |
virtual bool | has_cell (const Coord &c) const |
virtual int | height () const |
Coord | internal2external (const Coord &coord) const |
RegularSquaresGrid & | operator= (const RegularSquaresGrid &grid)=default |
RegularSquaresGrid & | operator= (RegularSquaresGrid &&grid)=default |
virtual DiscretePoint2D | origin () const |
RegularSquaresGrid (int w, int h, double scale) | |
RegularSquaresGrid (const RegularSquaresGrid &grid)=default | |
RegularSquaresGrid (RegularSquaresGrid &&grid)=default | |
virtual void | rescale (double) |
virtual double | scale () const |
virtual int | width () const |
Rectangle | world_cell_bounds (const Coord &coord) const |
Coord | world_to_cell (const Point2D &pt) const |
Coord | world_to_cell (double x, double y) const |
Coord | world_to_cell (double x, double y, double scale) const |
std::vector< Coord > | world_to_cells (const Segment2D &s) const |
virtual | ~RegularSquaresGrid ()=default |
Protected Member Functions | |
std::shared_ptr< GridCell > | cell_prototype () const |
Protected Member Functions inherited from RegularSquaresGrid | |
Coord | external2internal (const Coord &coord) const |
bool | has_internal_cell (const Coord &c) const |
void | set_height (unsigned h) |
void | set_scale (double s) |
void | set_width (unsigned w) |
Private Attributes | |
std::shared_ptr< GridCell > | _cell_prototype |
Additional Inherited Members | |
Public Types inherited from RegularSquaresGrid | |
using | Coord = DiscretePoint2D |
Static Public Attributes inherited from RegularSquaresGrid | |
static constexpr double | Dbl_Inf = std::numeric_limits<double>::infinity() |
Definition at line 22 of file grid_map.h.
|
inline |
Definition at line 25 of file grid_map.h.
|
inlineprotected |
Definition at line 69 of file grid_map.h.
|
inlinevirtual |
Reimplemented in UnboundedPlainGridMap.
Definition at line 62 of file grid_map.h.
|
inline |
Definition at line 31 of file grid_map.h.
|
inlineoverridevirtual |
Returns known information about the occupancy of a given area.
Implements OccupancyMap< RegularSquaresGrid::Coord, double >.
Definition at line 48 of file grid_map.h.
Reimplemented in UnboundedLazyTiledGridMap, RescalableCachingGridMap< BackGridMap >, UnboundedPlainGridMap, and LazyTiledGridMap.
Definition at line 54 of file grid_map.h.
|
inlinevirtual |
Reimplemented in UnboundedPlainGridMap.
Definition at line 63 of file grid_map.h.
|
inlineoverridevirtual |
Updates area with a given observation.
Implements OccupancyMap< RegularSquaresGrid::Coord, double >.
Reimplemented in UnboundedLazyTiledGridMap, RescalableCachingGridMap< BackGridMap >, UnboundedPlainGridMap, and LazyTiledGridMap.
Definition at line 41 of file grid_map.h.
|
private |
Definition at line 71 of file grid_map.h.