Template Class CVoxelMapBase

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

  • public mrpt::maps::CMetricMap

Derived Types

Class Documentation

template<typename node_t>
class CVoxelMapBase : public mrpt::maps::CMetricMap

An mrpt CMetricMap wrapper for Bonxai’s VoxelMap container.

Refer to Davide Faconti’s Bonxai repository for publication and algorithm details, but in short, this is a sparse generic container for voxels, not needing redimensioning when the map grows, and with efficient insertion and update operations.

Users normally use the derived classes, not this generic base template. This base class implements all common aspects to CMetricMap that do not depend on the specific contents to be stored at each voxel.

No multi-threading protection is applied at all in the API.

See also

CMetricMap, the example in “MRPT/mrpt_examples_cpp/maps_voxelmap_simple”,

Subclassed by mrpt::maps::CVoxelMapOccupancyBase< VoxelNodeOccupancy >, mrpt::maps::CVoxelMapOccupancyBase< VoxelNodeOccRGB >

Public Types

using myself_t = CVoxelMapBase<node_t>
using voxel_node_t = node_t

Public Functions

inline CVoxelMapBase(double resolution, uint8_t inner_bits = 2, uint8_t leaf_bits = 3)

Constructor, defines the resolution of the voxelmap (length of each voxel side, in meters).

virtual ~CVoxelMapBase() override = default
inline CVoxelMapBase(const CVoxelMapBase &o)
inline CVoxelMapBase &operator=(const CVoxelMapBase &o)
inline CVoxelMapBase(CVoxelMapBase &&o)
inline CVoxelMapBase &operator=(CVoxelMapBase &&o)
inline const Bonxai::VoxelGrid<node_t> &grid() const
inline std::string asString() const override

Returns a short description of the map.

inline void getVisualizationInto(mrpt::viz::CSetOfObjects &o) const override

Returns a 3D object representing the map.

See also

renderingOptions

virtual void getAsOctoMapVoxels(mrpt::viz::COctoMapVoxels &gl_obj) const = 0

Builds a renderizable representation of the octomap as a mrpt::viz::COctoMapVoxels object. Implementation defined for each children class.

See also

renderingOptions

inline virtual void saveMetricMapRepresentationToFile(const std::string &filNamePrefix) const override

Protected Attributes

std::unique_ptr<Impl> m_impl
struct Impl

Public Functions

inline Impl(double resolution, uint8_t inner_bits, uint8_t leaf_bits)
inline Impl(Bonxai::VoxelGrid<node_t> &&g)

Public Members

Bonxai::VoxelGrid<node_t> grid
mutable Bonxai::VoxelGrid<node_t>::Accessor accessor