template class mrpt::maps::CVoxelMapBase

Overview

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/samples/maps_voxelmap_simple”,

#include <mrpt/maps/CVoxelMapBase.h>

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

    struct Impl;

    // construction

    CVoxelMapBase(double resolution, uint8_t inner_bits = 2, uint8_t leaf_bits = 3);
    CVoxelMapBase(const CVoxelMapBase& o);
    CVoxelMapBase(CVoxelMapBase&& o);

    // methods

    CVoxelMapBase& operator = (const CVoxelMapBase& o);
    CVoxelMapBase& operator = (CVoxelMapBase&& o);
    virtual void getAsOctoMapVoxels(mrpt::opengl::COctoMapVoxels& gl_obj) const = 0;
};

// direct descendants

template <typename voxel_node_t, typename occupancy_t = int8_t>
class CVoxelMapOccupancyBase;

Inherited Members

public:
    // methods

    virtual bool isEmpty() const = 0;
    virtual void saveMetricMapRepresentationToFile(const std::string& filNamePrefix) const = 0;
    virtual std::string asString() const = 0;
    virtual void getVisualizationInto(mrpt::opengl::CSetOfObjects& o) const = 0;

Construction

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).

Methods

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

Builds a renderizable representation of the octomap as a mrpt::opengl::COctoMapVoxels object.

Implementation defined for each children class.

See also:

renderingOptions