Class MapBase
Defined in File map_base.h
Inheritance Relationships
Derived Types
public wavemap::HashedBlocks
(Class HashedBlocks)public wavemap::HashedChunkedWaveletOctree
(Class HashedChunkedWaveletOctree)public wavemap::HashedWaveletOctree
(Class HashedWaveletOctree)public wavemap::VolumetricOctree
(Class VolumetricOctree)public wavemap::WaveletOctree
(Class WaveletOctree)
Class Documentation
-
class MapBase
Base class for wavemap maps.
Subclassed by wavemap::HashedBlocks, wavemap::HashedChunkedWaveletOctree, wavemap::HashedWaveletOctree, wavemap::VolumetricOctree, wavemap::WaveletOctree
Public Types
-
using Ptr = std::shared_ptr<MapBase>
-
using ConstPtr = std::shared_ptr<const MapBase>
-
using IndexedLeafVisitorFunction = std::function<void(const OctreeIndex &index, FloatingPoint value)>
Public Functions
-
inline explicit MapBase(const MapBaseConfig &config)
-
virtual void threshold() = 0
Threshold the occupancy values of all cells in the map to stay within the range specified by its min_log_odds and max_log_odds.
-
virtual void prune() = 0
Free up memory by pruning nodes that are no longer needed.
Note
Implementations of this pruning operation should be lossless and does not alter the estimated occupancy posterior.
-
inline virtual void pruneSmart()
Similar to prune(), but avoids de-allocating nodes that will likely be used again in the near future.
-
inline FloatingPoint getMinCellWidth() const
Maximum map resolution, set as width of smallest cell it can represent.
-
inline FloatingPoint getMinLogOdds() const
Lower threshold for the occupancy values stored in the map, in log-odds.
-
inline FloatingPoint getMaxLogOdds() const
Upper threshold for the occupancy values stored in the map, in log-odds.
-
virtual IndexElement getTreeHeight() const = 0
Height of the octree used to store the map.
Note
This value is only defined for multi-resolution maps.
-
virtual Index3D getMinIndex() const = 0
Index of the minimum corner of the map’s Axis Aligned Bounding Box.
-
virtual Index3D getMaxIndex() const = 0
Index of the maximum corner of the map’s Axis Aligned Bounding Box.
-
virtual FloatingPoint getCellValue(const Index3D &index) const = 0
Query the value of the map at a given index.
-
virtual void setCellValue(const Index3D &index, FloatingPoint new_value) = 0
Set the value of the map at a given index.
-
virtual void addToCellValue(const Index3D &index, FloatingPoint update) = 0
Increment the value of the map at a given index.
-
virtual void forEachLeaf(IndexedLeafVisitorFunction visitor_fn) const = 0
Protected Functions
-
inline FloatingPoint clamp(FloatingPoint value) const
-
inline FloatingPoint clampedAdd(FloatingPoint value, FloatingPoint update) const
Protected Attributes
-
const MapBaseConfig config_
-
using Ptr = std::shared_ptr<MapBase>