template class mrpt::maps::COctoMapBase

A three-dimensional probabilistic occupancy grid, implemented as an octo-tree with the “octomap” C++ library.

This base class represents a 3D map where each voxel may contain an “occupancy” property, RGBD data, etc. depending on the derived class.

As with any other mrpt::maps::CMetricMap, you can obtain a 3D representation of the map calling getAs3DObject() or getAsOctoMapVoxels()

To use octomap’s iterators to go through the voxels, use COctoMap::getOctomap()

The octomap library was presented in:

  • K. M. Wurm, A. Hornung, M. Bennewitz, C. Stachniss, and W. Burgard, “OctoMap: A Probabilistic, Flexible, and Compact 3D Map Representation for Robotic Systems” in Proc. of the ICRA 2010 Workshop on Best Practice in 3D Perception and Modeling for Mobile Manipulation, 2010. Software available at http://octomap.sf.net/.

See also:

CMetricMap, the example in “MRPT/samples/octomap_simple”

#include <mrpt/maps/COctoMapBase.h>

template <class octree_t, class octree_node_t>
class COctoMapBase: public mrpt::maps::CMetricMap
{
public:
    // typedefs

    typedef COctoMapBase<octree_t, octree_node_t> myself_t;

    // structs

    struct TInsertionOptions;
    struct TLikelihoodOptions;
    struct TRenderingOptions;

    //
fields

    TLikelihoodOptions likelihoodOptions;
    TRenderingOptions renderingOptions;

    // construction

    COctoMapBase(double resolution);

    //
methods

    virtual void getAsOctoMapVoxels(mrpt::opengl::COctoMapVoxels& gl_obj) const = 0;
    virtual void setOccupancyThres(double prob) = 0;
    virtual void setProbHit(double prob) = 0;
    virtual void setProbMiss(double prob) = 0;
    virtual void setClampingThresMin(double thresProb) = 0;
    virtual void setClampingThresMax(double thresProb) = 0;
    virtual double getOccupancyThres() const = 0;
    virtual float getOccupancyThresLog() const = 0;
    virtual double getProbHit() const = 0;
    virtual float getProbHitLog() const = 0;
    virtual double getProbMiss() const = 0;
    virtual float getProbMissLog() const = 0;
    virtual double getClampingThresMin() const = 0;
    virtual float getClampingThresMinLog() const = 0;
    virtual double getClampingThresMax() const = 0;
    virtual float getClampingThresMaxLog() const = 0;
};

// direct descendants

class CColouredOctoMap;
class COctoMap;

Inherited Members

public:
    //
methods

    virtual bool isEmpty() const = 0;
    virtual void saveMetricMapRepresentationToFile(const std::string& filNamePrefix) const = 0;
    virtual void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr& outObj) const = 0;

Construction

COctoMapBase(double resolution)

Constructor, defines the resolution of the octomap (length of each voxel side)

Methods

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

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

See also:

renderingOptions