struct mrpt::maps::CPointsMap::TInsertionOptions

Overview

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

See also:

CObservation::insertIntoPointsMap

#include <mrpt/maps/CPointsMap.h>

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

    float minDistBetweenLaserPoints {0.02f};
    bool addToExistingPointsMap {true};
    bool also_interpolate {false};
    bool disableDeletion {true};
    bool fuseWithExisting {false};
    bool isPlanarMap {false};
    float horizontalTolerance;
    float maxDistForInterpolatePoints {2.0f};
    bool insertInvalidPoints {false};

    // construction

    TInsertionOptions();

    // methods

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

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 minDistBetweenLaserPoints {0.02f}

The minimum distance between points (in 3D): If two points are too close, one of them is not inserted into the map.

Default is 0.02 meters.

bool addToExistingPointsMap {true}

Applicable to “loadFromRangeScan” only! If set to false, the points from the scan are loaded, clearing all previous content.

Default is false.

bool also_interpolate {false}

If set to true, far points (<1m) are interpolated with samples at “minDistSqrBetweenLaserPoints” intervals (Default is false).

bool disableDeletion {true}

If set to false (default=true) points in the same plane as the inserted scan and inside the free space, are erased: i.e.

they don’t exist yet.

bool fuseWithExisting {false}

If set to true (default=false), inserted points are “fused” with previously existent ones.

This shrink the size of the points map, but its slower.

bool isPlanarMap {false}

If set to true, only HORIZONTAL (in the XY plane) measurements will be inserted in the map (Default value is false, thus 3D maps are generated).

See also:

horizontalTolerance

float horizontalTolerance

The tolerance in rads in pitch & roll for a laser scan to be considered horizontal, considered only when isPlanarMap=true (default=0).

float maxDistForInterpolatePoints {2.0f}

The maximum distance between two points to interpolate between them (ONLY when also_interpolate=true)

bool insertInvalidPoints {false}

Points with x,y,z coordinates set to zero will also be inserted.

Construction

TInsertionOptions()

Initilization of default parameters.

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 writeToStream(mrpt::serialization::CArchive& out) const

Binary dump to stream - for usage in derived classes’ serialization.

void readFromStream(mrpt::serialization::CArchive& in)

Binary dump to stream - for usage in derived classes’ serialization.