Abstract base for assembling per-node LocalGrid data into a global map.
More...
#include <GlobalMap.h>
|
| 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).
|
| |
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 Parameters::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.
◆ GlobalMap()
Constructs the base map; subclasses call from their constructor.
- Parameters
-
| cache | Non-null cache of per-node local grids. |
| parameters | Optional Grid/ and GridGlobal/ parameter overrides. |
◆ logodds()
| static float rtabmap::GlobalMap::logodds |
( |
double |
probability | ) |
|
|
inlinestatic |
Converts probability in (0, 1) to log-odds.
Definition at line 59 of file GlobalMap.h.
◆ probability()
| static double rtabmap::GlobalMap::probability |
( |
double |
logodds | ) |
|
|
inlinestatic |
Converts log-odds back to probability in (0, 1).
Definition at line 65 of file GlobalMap.h.
◆ fullUpdateNeeded()
| 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.
- Parameters
-
| poses | Current graph poses (node id → transform). |
◆ update()
| bool rtabmap::GlobalMap::update |
( |
const std::map< int, Transform > & |
poses | ) |
|
Incrementally assemble new nodes from poses.
- Parameters
-
| poses | Graph poses; ids > 0 with a cached LocalGrid are candidates. |
- Returns
- True if assemble() was called (at least one new pose processed).
◆ clear()
| virtual void rtabmap::GlobalMap::clear |
( |
| ) |
|
|
virtual |
◆ getCellSize()
| float rtabmap::GlobalMap::getCellSize |
( |
| ) |
const |
|
inline |
- Returns
- Grid cell size in meters (Grid/CellSize).
Definition at line 96 of file GlobalMap.h.
◆ getUpdateError()
| float rtabmap::GlobalMap::getUpdateError |
( |
| ) |
const |
|
inline |
- Returns
- Pose change threshold for full rebuild (Grid/GlobalUpdateError).
Definition at line 98 of file GlobalMap.h.
◆ addedNodes()
| const std::map< int, Transform > & rtabmap::GlobalMap::addedNodes |
( |
| ) |
const |
|
inline |
- Returns
- Poses of nodes already assembled into the global map.
Definition at line 100 of file GlobalMap.h.
◆ getGridMin() [1/2]
| void rtabmap::GlobalMap::getGridMin |
( |
double & |
x, |
|
|
double & |
y |
|
) |
| const |
|
inline |
2D grid minimum (x, y) in meters.
Definition at line 103 of file GlobalMap.h.
◆ getGridMax() [1/2]
| void rtabmap::GlobalMap::getGridMax |
( |
double & |
x, |
|
|
double & |
y |
|
) |
| const |
|
inline |
2D grid maximum (x, y) in meters.
Definition at line 105 of file GlobalMap.h.
◆ getGridMin() [2/2]
| void rtabmap::GlobalMap::getGridMin |
( |
double & |
x, |
|
|
double & |
y, |
|
|
double & |
z |
|
) |
| const |
|
inline |
3D grid minimum (x, y, z) in meters.
Definition at line 107 of file GlobalMap.h.
◆ getGridMax() [2/2]
| void rtabmap::GlobalMap::getGridMax |
( |
double & |
x, |
|
|
double & |
y, |
|
|
double & |
z |
|
) |
| const |
|
inline |
3D grid maximum (x, y, z) in meters.
Definition at line 109 of file GlobalMap.h.
◆ getMemoryUsed()
| virtual unsigned long rtabmap::GlobalMap::getMemoryUsed |
( |
| ) |
const |
|
virtual |
◆ assemble()
| virtual void rtabmap::GlobalMap::assemble |
( |
const std::list< std::pair< int, Transform > > & |
newPoses | ) |
|
|
protectedpure virtual |
◆ cache()
| const std::map< int, LocalGrid > & rtabmap::GlobalMap::cache |
( |
| ) |
const |
|
inlineprotected |
- Returns
- Cached local grids keyed by node id.
Definition at line 126 of file GlobalMap.h.
◆ assembledNodes()
| const std::map< int, Transform > & rtabmap::GlobalMap::assembledNodes |
( |
| ) |
const |
|
inlineprotected |
◆ isNodeAssembled()
| bool rtabmap::GlobalMap::isNodeAssembled |
( |
int |
id | ) |
|
|
inlineprotected |
- Returns
- True if
id is already in the assembled set.
Definition at line 131 of file GlobalMap.h.
◆ cellSize_
| float rtabmap::GlobalMap::cellSize_ |
|
protected |
◆ updateError_
| float rtabmap::GlobalMap::updateError_ |
|
protected |
◆ occupancyThr_
| float rtabmap::GlobalMap::occupancyThr_ |
|
protected |
◆ logOddsHit_
| float rtabmap::GlobalMap::logOddsHit_ |
|
protected |
◆ logOddsMiss_
| float rtabmap::GlobalMap::logOddsMiss_ |
|
protected |
◆ logOddsClampingMin_
| float rtabmap::GlobalMap::logOddsClampingMin_ |
|
protected |
◆ logOddsClampingMax_
| float rtabmap::GlobalMap::logOddsClampingMax_ |
|
protected |
◆ minValues_
| double rtabmap::GlobalMap::minValues_[3] |
|
protected |
◆ maxValues_
| double rtabmap::GlobalMap::maxValues_[3] |
|
protected |
The documentation for this class was generated from the following file: