class mrpt::maps::COccupancyGridMap2D::TLikelihoodOptions
Overview
With this struct options are provided to the observation likelihood computation process.
#include <mrpt/maps/COccupancyGridMap2D.h> class TLikelihoodOptions: public mrpt::config::CLoadableOptions { public: // fields TLikelihoodMethod likelihoodMethod {lmLikelihoodField_Thrun}; float LF_stdHit {0.35f}; float LF_zHit {0.95f}; float LF_zRandom {0.05f}; float LF_maxRange {81.0f}; uint32_t LF_decimation {5}; float LF_maxCorrsDistance {0.3f}; bool LF_useSquareDist {false}; bool LF_alternateAverageMethod {false}; float MI_exponent {2.5f}; uint32_t MI_skip_rays {10}; float MI_ratio_max_distance {1.5f}; bool rayTracing_useDistanceFilter {true}; int32_t rayTracing_decimation {10}; float rayTracing_stdHit {1.0f}; int32_t consensus_takeEachRange {1}; float consensus_pow {5}; std::vector<float> OWA_weights; bool enableLikelihoodCache {true}; // construction TLikelihoodOptions(); // 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
TLikelihoodMethod likelihoodMethod {lmLikelihoodField_Thrun}
The selected method to compute an observation likelihood.
float LF_stdHit {0.35f}
[LikelihoodField] The laser range “sigma” used in computations; Default value = 0.35
float LF_zHit {0.95f}
[LikelihoodField]
float LF_maxRange {81.0f}
[LikelihoodField] The max.
range of the sensor (Default= 81 m)
uint32_t LF_decimation {5}
[LikelihoodField] The decimation of the points in a scan, default=1 == no decimation
float LF_maxCorrsDistance {0.3f}
[LikelihoodField] The max.
distance for searching correspondences around each sensed point
bool LF_useSquareDist {false}
[LikelihoodField] (Default:false) Use exp(dist^2/std^2)
instead of exp(dist^2/std^2)
bool LF_alternateAverageMethod {false}
[LikelihoodField] Set this to “true” ot use an alternative method, where the likelihood of the whole range scan is computed by “averaging” of individual ranges, instead of by the “product”.
float MI_exponent {2.5f}
[MI] The exponent in the MI likelihood computation.
Default value = 5
uint32_t MI_skip_rays {10}
[MI] The scan rays decimation: at every N rays, one will be used to compute the MI
float MI_ratio_max_distance {1.5f}
[MI] The ratio for the max.
distance used in the MI computation and in the insertion of scans, e.g. if set to 2.0 the MI will use twice the distance that the update distance.
bool rayTracing_useDistanceFilter {true}
[rayTracing] If true (default), the rayTracing method will ignore measured ranges shorter than the simulated ones.
int32_t rayTracing_decimation {10}
[rayTracing] One out of “rayTracing_decimation” rays will be simulated and compared only: set to 1 to use all the sensed ranges.
float rayTracing_stdHit {1.0f}
[rayTracing] The laser range sigma.
int32_t consensus_takeEachRange {1}
[Consensus] The down-sample ratio of ranges (default=1, consider all the ranges)
float consensus_pow {5}
[Consensus] The power factor for the likelihood (default=5)
std::vector<float> OWA_weights
[OWA] The sequence of weights to be multiplied to of the ordered list of likelihood values (first one is the largest); the size of this vector determines the number of highest likelihood values to fuse.
bool enableLikelihoodCache {true}
Enables the usage of a cache of likelihood values (for LF methods), if set to true (default=false).
Construction
TLikelihoodOptions()
Initialization of default parameters.
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.