Cache of LocalGrid entries keyed by map node id.
More...
#include <LocalGrid.h>
|
|
void | add (int nodeId, const cv::Mat &ground, const cv::Mat &obstacles, const cv::Mat &empty, float cellSize, const cv::Point3f &viewPoint=cv::Point3f(0, 0, 0)) |
| | Inserts or replaces the grid for nodeId (from separate cell mats).
|
| |
|
void | add (int nodeId, const LocalGrid &localGrid) |
| | Inserts or replaces the grid for nodeId.
|
| |
| bool | shareTo (int nodeId, LocalGridCache &anotherCache) const |
| | Copies a grid to anotherCache if present here and absent there.
|
| |
|
unsigned long | getMemoryUsed () const |
| | Approximate memory used by cached grids (bytes).
|
| |
| void | clear (bool temporaryOnly=false) |
| | Removes cached grids.
|
| |
| size_t | size () const |
| |
| bool | empty () const |
| |
| const std::map< int, LocalGrid > & | localGrids () const |
| |
| std::map< int, LocalGrid >::const_iterator | find (int nodeId) const |
| |
| std::map< int, LocalGrid >::const_iterator | begin () const |
| |
| std::map< int, LocalGrid >::const_iterator | end () const |
| |
Cache of LocalGrid entries keyed by map node id.
Used by GlobalMap and its subclasses (e.g. OccupancyGrid) to hold per-node local grids before assembly. Node id 0 is stored as -1 (temporary grid). Negative ids passed to add() are rejected.
Definition at line 97 of file LocalGrid.h.
◆ LocalGridCache()
| rtabmap::LocalGridCache::LocalGridCache |
( |
| ) |
|
|
inline |
◆ ~LocalGridCache()
| virtual rtabmap::LocalGridCache::~LocalGridCache |
( |
| ) |
|
|
inlinevirtual |
◆ shareTo()
| bool rtabmap::LocalGridCache::shareTo |
( |
int |
nodeId, |
|
|
LocalGridCache & |
anotherCache |
|
) |
| const |
Copies a grid to anotherCache if present here and absent there.
- Returns
- True if a grid was shared.
◆ clear()
| void rtabmap::LocalGridCache::clear |
( |
bool |
temporaryOnly = false | ) |
|
Removes cached grids.
- Parameters
-
| temporaryOnly | If true, removes only entries with negative ids (e.g. -1). |
◆ size()
| size_t rtabmap::LocalGridCache::size |
( |
| ) |
const |
|
inline |
◆ empty()
| bool rtabmap::LocalGridCache::empty |
( |
| ) |
const |
|
inline |
◆ localGrids()
| const std::map< int, LocalGrid > & rtabmap::LocalGridCache::localGrids |
( |
| ) |
const |
|
inline |
◆ find()
| std::map< int, LocalGrid >::const_iterator rtabmap::LocalGridCache::find |
( |
int |
nodeId | ) |
const |
|
inline |
◆ begin()
| std::map< int, LocalGrid >::const_iterator rtabmap::LocalGridCache::begin |
( |
| ) |
const |
|
inline |
◆ end()
| std::map< int, LocalGrid >::const_iterator rtabmap::LocalGridCache::end |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: