|
RTAB-Map 0.23.10
|
Abstract base for assembling per-node LocalGrid data into a global map. More...
#include <GlobalMap.h>

Public Member Functions | |
| bool | fullUpdateNeeded (const std::map< int, Transform > &poses) const |
| True if the map should be rebuilt from cache (loop closure or disjoint graph). | |
| bool | update (const std::map< int, Transform > &poses) |
Incrementally assemble new nodes from poses. | |
| virtual void | clear () |
| Clears assembled nodes and grid bounds; does not clear LocalGridCache. | |
| float | getCellSize () const |
| float | getUpdateError () const |
| const std::map< int, Transform > & | addedNodes () const |
| void | getGridMin (double &x, double &y) const |
| 2D grid minimum (x, y) in meters. | |
| void | getGridMax (double &x, double &y) const |
| 2D grid maximum (x, y) in meters. | |
| void | getGridMin (double &x, double &y, double &z) const |
| 3D grid minimum (x, y, z) in meters. | |
| void | getGridMax (double &x, double &y, double &z) const |
| 3D grid maximum (x, y, z) in meters. | |
| virtual unsigned long | getMemoryUsed () const |
| Approximate memory used by assembled-node bookkeeping (bytes). | |
Static Public Member Functions | |
| static float | logodds (double probability) |
| Converts probability in (0, 1) to log-odds. | |
| static double | probability (double logodds) |
| Converts log-odds back to probability in (0, 1). | |
Protected Member Functions | |
| GlobalMap (const LocalGridCache *cache, const ParametersMap ¶meters=ParametersMap()) | |
| Constructs the base map; subclasses call from their constructor. | |
| virtual void | assemble (const std::list< std::pair< int, Transform > > &newPoses)=0 |
Subclass hook: merge newPoses into the global map; call addAssembledNode(). | |
| const std::map< int, LocalGrid > & | cache () const |
| const std::map< int, Transform > & | assembledNodes () const |
| bool | isNodeAssembled (int id) |
| void | addAssembledNode (int id, const Transform &pose) |
| Records a successfully assembled node (ids <= 0 are ignored). | |
Protected Attributes | |
| float | cellSize_ |
| float | updateError_ |
| float | occupancyThr_ |
| float | logOddsHit_ |
| float | logOddsMiss_ |
| float | logOddsClampingMin_ |
| float | logOddsClampingMax_ |
| double | minValues_ [3] |
| double | maxValues_ [3] |
Abstract base for assembling per-node LocalGrid data into a global map.
Subclasses (OccupancyGrid, OctoMap, GridMap, CloudMap) implement assemble() to merge new node poses from LocalGridCache into their representation.
update() decides which poses need assembly (not yet in addedNodes(), present in cache, id > 0) and may call clear() when fullUpdateNeeded() detects graph optimization or a disjoint pose set (see kGridGlobalUpdateError).
Log-odds helpers logodds() and probability() convert between occupancy probability and the internal log-odds representation used for global hit/miss/clamping parameters (GridGlobal/Prob*).
Definition at line 55 of file GlobalMap.h.
|
protected |
Constructs the base map; subclasses call from their constructor.
| cache | Non-null cache of per-node local grids. |
| parameters | Optional Grid/ and GridGlobal/ parameter overrides. |
|
inlinestatic |
Converts probability in (0, 1) to log-odds.
Definition at line 59 of file GlobalMap.h.
|
inlinestatic |
Converts log-odds back to probability in (0, 1).
Definition at line 65 of file GlobalMap.h.
| bool rtabmap::GlobalMap::fullUpdateNeeded | ( | const std::map< int, Transform > & | poses | ) | const |
True if the map should be rebuilt from cache (loop closure or disjoint graph).
Compares poses to addedNodes() using getUpdateError(), which is set from Grid/GlobalUpdateError (Parameters::kGridGlobalUpdateError()): if any assembled node's pose moved farther than that threshold (meters), or if none of the assembled nodes appear in poses, returns true and update() will call clear() first.
| poses | Current graph poses (node id → transform). |
| bool rtabmap::GlobalMap::update | ( | const std::map< int, Transform > & | poses | ) |
Incrementally assemble new nodes from poses.
| poses | Graph poses; ids > 0 with a cached LocalGrid are candidates. |
|
virtual |
Clears assembled nodes and grid bounds; does not clear LocalGridCache.
Reimplemented in rtabmap::CloudMap, rtabmap::GridMap, rtabmap::OccupancyGrid, and rtabmap::OctoMap.
|
inline |
Definition at line 96 of file GlobalMap.h.
|
inline |
Definition at line 98 of file GlobalMap.h.
|
inline |
Definition at line 100 of file GlobalMap.h.
|
inline |
2D grid minimum (x, y) in meters.
Definition at line 103 of file GlobalMap.h.
|
inline |
2D grid maximum (x, y) in meters.
Definition at line 105 of file GlobalMap.h.
|
inline |
3D grid minimum (x, y, z) in meters.
Definition at line 107 of file GlobalMap.h.
|
inline |
3D grid maximum (x, y, z) in meters.
Definition at line 109 of file GlobalMap.h.
|
virtual |
Approximate memory used by assembled-node bookkeeping (bytes).
Reimplemented in rtabmap::CloudMap, rtabmap::OccupancyGrid, and rtabmap::OctoMap.
|
protectedpure virtual |
Subclass hook: merge newPoses into the global map; call addAssembledNode().
Implemented in rtabmap::CloudMap, rtabmap::GridMap, rtabmap::OccupancyGrid, and rtabmap::OctoMap.
|
inlineprotected |
Definition at line 126 of file GlobalMap.h.
|
inlineprotected |
Definition at line 129 of file GlobalMap.h.
|
inlineprotected |
id is already in the assembled set. Definition at line 131 of file GlobalMap.h.
|
protected |
Definition at line 136 of file GlobalMap.h.
|
protected |
Definition at line 137 of file GlobalMap.h.
|
protected |
Definition at line 139 of file GlobalMap.h.
|
protected |
Definition at line 140 of file GlobalMap.h.
|
protected |
Definition at line 141 of file GlobalMap.h.
|
protected |
Definition at line 142 of file GlobalMap.h.
|
protected |
Definition at line 143 of file GlobalMap.h.
|
protected |
Definition at line 145 of file GlobalMap.h.
|
protected |
Definition at line 146 of file GlobalMap.h.