class mrpt::maps::COccupancyGridMap2D::TInsertionOptions

With this struct options are provided to the observation insertion process.

See also:

CObservation::insertIntoGridMap

#include <mrpt/maps/COccupancyGridMap2D.h>

class TInsertionOptions: public mrpt::config::CLoadableOptions
{
public:
    //
fields

    float mapAltitude {0};
    bool useMapAltitude {false};
    float maxDistanceInsertion {15.0f};
    float maxOccupancyUpdateCertainty {0.65f};
    float maxFreenessUpdateCertainty {.0f};
    float maxFreenessInvalidRanges {.0f};
    bool considerInvalidRangesAsFreeSpace {true};
    uint16_t decimation {1};
    float horizontalTolerance {mrpt::DEG2RAD(0.05f)};
    float CFD_features_gaussian_size {1};
    float CFD_features_median_size {3};
    bool wideningBeamsWithDistance {false};

    // construction

    TInsertionOptions();

    //
methods

    virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase& source, const std::string& section);
    virtual void dumpToTextStream(std::ostream& out) const;
};

Inherited Members

public:
    //
methods

    virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase& source, const std::string& section) = 0;
    void loadFromConfigFileName(const std::string& config_file, const std::string& section);
    virtual void saveToConfigFile(mrpt::config::CConfigFileBase& target, const std::string& section) const;
    void saveToConfigFileName(const std::string& config_file, const std::string& section) const;
    void dumpToConsole() const;
    virtual void dumpToTextStream(std::ostream& out) const;

Fields

float mapAltitude {0}

The altitude (z-axis) of 2D scans (within a 0.01m tolerance) for they to be inserted in this map!

bool useMapAltitude {false}

The parameter “mapAltitude” has effect while inserting observations in the grid only if this is true.

float maxDistanceInsertion {15.0f}

The largest distance at which cells will be updated (Default 15 meters)

float maxOccupancyUpdateCertainty {0.65f}

A value in the range [0.5,1] used for updating cell with a bayesian approach (default 0.8)

float maxFreenessUpdateCertainty {.0f}

A value in the range [0.5,1] for updating a free cell.

(default=0 means use the same than maxOccupancyUpdateCertainty)

float maxFreenessInvalidRanges {.0f}

Like maxFreenessUpdateCertainty, but for invalid ranges (no echo).

(default=0 means same than maxOccupancyUpdateCertainty)

bool considerInvalidRangesAsFreeSpace {true}

If set to true (default), invalid range values (no echo rays) as consider as free space until “maxOccupancyUpdateCertainty”, but ONLY when the previous and next rays are also an invalid ray.

uint16_t decimation {1}

Specify the decimation of the range scan (default=1 : take all the range values!)

float horizontalTolerance {mrpt::DEG2RAD(0.05f)}

The tolerance in rads in pitch & roll for a laser scan to be considered horizontal, then processed by calls to this class (default=0).

float CFD_features_gaussian_size {1}

Gaussian sigma of the filter used in getAsImageFiltered (for features detection) (Default=1) (0:Disabled)

float CFD_features_median_size {3}

Size of the Median filter used in getAsImageFiltered (for features detection) (Default=3) (0:Disabled)

bool wideningBeamsWithDistance {false}

Enabled: Rays widen with distance to approximate the real behavior of lasers, disabled: insert rays as simple lines (Default=false)

Methods

virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase& source, const std::string& section)

This method load the options from a “.ini” file.

Only those parameters found in the given “section” and having the same name that the variable are loaded. Those not found in the file will stay with their previous values (usually the default values loaded at initialization). An example of an “.ini” file:

[section]
resolution=0.10     ; blah blah...
modeSelection=1     ; 0=blah, 1=blah,...
virtual void dumpToTextStream(std::ostream& out) const

This method should clearly display all the contents of the structure in textual form, sending it to a std::ostream.

The default implementation in this base class relies on saveToConfigFile() to generate a plain text representation of all the parameters.