struct mrpt::maps::COctoMapBase::TInsertionOptions

Overview

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

See also:

CObservation::insertObservationInto()

#include <mrpt/maps/COctoMapBase.h>

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

    double maxrange {           -1.};
    bool pruning {true};

    // construction

    TInsertionOptions(myself_t& parent);
    TInsertionOptions();
    TInsertionOptions(const TInsertionOptions& o);

    // methods

    TInsertionOptions& operator = (const TInsertionOptions& o);
    virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase& source, const std::string& section);
    virtual void dumpToTextStream(std::ostream& out) const;
    void setOccupancyThres(double prob);
    void setProbHit(double prob);
    void setProbMiss(double prob);
    void setClampingThresMin(double thresProb);
    void setClampingThresMax(double thresProb);
    double getOccupancyThres() const;
    float getOccupancyThresLog() const;
    double getProbHit() const;
    float getProbHitLog() const;
    double getProbMiss() const;
    float getProbMissLog() const;
    double getClampingThresMin() const;
    float getClampingThresMinLog() const;
    double getClampingThresMax() const;
    float getClampingThresMaxLog() 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

double maxrange {           -1.}

maximum range for how long individual beams are

bool pruning {true}

inserted (default -1: complete beam)

whether the tree is (losslessly) pruned after

Construction

TInsertionOptions(myself_t& parent)

Initilization of default parameters.

TInsertionOptions()

Special constructor, not attached to a real COctoMap object: used only in limited situations, since get*() methods don’t work, etc.

Methods

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

This method load the options from a “.ini”-like file or memory-stored string list.

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

See also:

loadFromConfigFileName, saveToConfigFile

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.

void setOccupancyThres(double prob)

insertion (default: true)

(key name in .ini files: “occupancyThres”) sets the threshold for occupancy (sensor model) (Default=0.5)

void setProbHit(double prob)

(key name in .ini files: “probHit”)sets the probablility for a “hit” (will be converted to logodds) - sensor model (Default=0.7)

void setProbMiss(double prob)

(key name in .ini files: “probMiss”)sets the probablility for a “miss” (will be converted to logodds) - sensor model (Default=0.4)

void setClampingThresMin(double thresProb)

(key name in .ini files: “clampingThresMin”)sets the minimum threshold for occupancy clamping (sensor model) (Default=0.1192, -2 in log odds)

void setClampingThresMax(double thresProb)

(key name in .ini files: “clampingThresMax”)sets the maximum threshold for occupancy clamping (sensor model) (Default=0.971, 3.5 in log odds)

double getOccupancyThres() const

Returns:

threshold (probability) for occupancy - sensor model

float getOccupancyThresLog() const

Returns:

threshold (logodds) for occupancy - sensor model

double getProbHit() const

Returns:

probablility for a “hit” in the sensor model (probability)

float getProbHitLog() const

Returns:

probablility for a “hit” in the sensor model (logodds)

double getProbMiss() const

Returns:

probablility for a “miss” in the sensor model (probability)

float getProbMissLog() const

Returns:

probablility for a “miss” in the sensor model (logodds)

double getClampingThresMin() const

Returns:

minimum threshold for occupancy clamping in the sensor model (probability)

float getClampingThresMinLog() const

Returns:

minimum threshold for occupancy clamping in the sensor model (logodds)

double getClampingThresMax() const

Returns:

maximum threshold for occupancy clamping in the sensor model (probability)

float getClampingThresMaxLog() const

Returns:

maximum threshold for occupancy clamping in the sensor model (logodds)