MRPT  2.0.4
List of all members | Public Member Functions | Public Attributes | Static Protected Member Functions
mrpt::bayes::CParticleFilter::TParticleFilterOptions Struct Reference

Detailed Description

The configuration of a particle filter.

Definition at line 102 of file CParticleFilter.h.

#include <mrpt/bayes/CParticleFilter.h>

Inheritance diagram for mrpt::bayes::CParticleFilter::TParticleFilterOptions:

Public Member Functions

void loadFromConfigFile (const mrpt::config::CConfigFileBase &source, const std::string &section) override
 This method load the options from a ".ini"-like file or memory-stored string list. More...
 
void saveToConfigFile (mrpt::config::CConfigFileBase &target, const std::string &section) const override
 This method saves the options to a ".ini"-like file or memory-stored string list. More...
 
void loadFromConfigFileName (const std::string &config_file, const std::string &section)
 Behaves like loadFromConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to load the file. More...
 
void saveToConfigFileName (const std::string &config_file, const std::string &section) const
 Behaves like saveToConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to save the file. More...
 
void dumpToConsole () const
 Just like dumpToTextStream() but sending the text to the console (std::cout) More...
 
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. More...
 

Public Attributes

bool adaptiveSampleSize {false}
 A flag that indicates whether the CParticleFilterCapable object should perform adative sample size (default=false). More...
 
double BETA {0.5}
 The resampling of particles will be performed when ESS (in range [0,1]) < BETA (default is 0.5) More...
 
unsigned int sampleSize {1}
 The initial number of particles in the filter (it can change only if adaptiveSampleSize=true) (default=1) More...
 
unsigned int pfAuxFilterOptimal_MaximumSearchSamples {100}
 In the algorithm "CParticleFilter::pfAuxiliaryPFOptimal" (and in "CParticleFilter::pfAuxiliaryPFStandard" only if pfAuxFilterStandard_FirstStageWeightsMonteCarlo = true) the number of samples for searching the maximum likelihood value and also to estimate the "first stage weights" (see papers!) (default=100) More...
 
double powFactor {1}
 An optional step to "smooth" dramatic changes in the observation model to affect the variance of the particle weights, eg weight*=likelihood^powFactor (default=1 = no effects). More...
 
TParticleFilterAlgorithm PF_algorithm {pfStandardProposal}
 The PF algorithm to use (default=pfStandardProposal) See TParticleFilterAlgorithm for the possibilities. More...
 
TParticleResamplingAlgorithm resamplingMethod {prMultinomial}
 The resampling algorithm to use (default=prMultinomial). More...
 
double max_loglikelihood_dyn_range {15}
 Only for PF_algorithm=pfAuxiliaryPFOptimal: If a given particle has a max_likelihood (from the a-priori estimate) below the maximum from all the samples - max_loglikelihood_dyn_range, then the particle is directly discarded. More...
 
bool pfAuxFilterStandard_FirstStageWeightsMonteCarlo {false}
 Only for PF_algorithm==pfAuxiliaryPFStandard: If false, the APF will predict the first stage weights just at the mean of the prior of the next time step. More...
 
bool pfAuxFilterOptimal_MLE {false}
 (Default=false) In the algorithm "CParticleFilter::pfAuxiliaryPFOptimal", if set to true, do not perform rejection sampling, but just the most-likely (ML) particle found in the preliminary weight-determination stage. More...
 

Static Protected Member Functions

static void dumpVar_int (std::ostream &out, const char *varName, int v)
 Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR. More...
 
static void dumpVar_float (std::ostream &out, const char *varName, float v)
 
static void dumpVar_double (std::ostream &out, const char *varName, double v)
 
static void dumpVar_bool (std::ostream &out, const char *varName, bool v)
 
static void dumpVar_string (std::ostream &out, const char *varName, const std::string &v)
 

Member Function Documentation

◆ dumpToConsole()

void CLoadableOptions::dumpToConsole ( ) const
inherited

Just like dumpToTextStream() but sending the text to the console (std::cout)

Definition at line 43 of file CLoadableOptions.cpp.

References mrpt::config::CLoadableOptions::dumpToTextStream().

Referenced by mrpt::hmtslam::CTopLCDetector_GridMatching::computeTopologicalObservationModel(), mrpt::ros1bridge::MapHdl::loadMap(), mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::printParams(), and mrpt::apps::CGridMapAlignerApp::run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpToTextStream()

void CLoadableOptions::dumpToTextStream ( std::ostream &  out) const
virtualinherited

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.

Reimplemented in mrpt::vision::TMultiResDescOptions, mrpt::vision::TMultiResDescMatchOptions, mrpt::maps::COccupancyGridMap2D::TLikelihoodOptions, mrpt::maps::COccupancyGridMap2D::TInsertionOptions, mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLoopClosureParams, mrpt::vision::TMatchingOptions, mrpt::hmtslam::CHMTSLAM::TOptions, mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLaserParams, mrpt::maps::CLandmarksMap::TLikelihoodOptions, mrpt::maps::TSetOfMetricMapInitializers, mrpt::maps::CPointsMap::TRenderOptions, mrpt::maps::CPointsMap::TLikelihoodOptions, mrpt::maps::COctoMapBase< octree_t, octree_node_t >::TLikelihoodOptions, mrpt::vision::TStereoSystemParams, mrpt::maps::CLandmarksMap::TInsertionOptions, mrpt::maps::CPointsMap::TInsertionOptions, mrpt::maps::CColouredPointsMap::TColourOptions, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::GraphVisualizationParams, mrpt::slam::CRangeBearingKFSLAM::TOptions, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::OptimizationParams, mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::TParams, mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::TParams, mrpt::maps::CBeaconMap::TInsertionOptions, mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::TParams, mrpt::maps::CRandomFieldGridMap3D::TInsertionOptions, mrpt::graphslam::deciders::CFixedIntervalsNRD< GRAPH_T >::TParams, mrpt::maps::CMultiMetricMapPDF::TPredictionParams, mrpt::maps::CBeaconMap::TLikelihoodOptions, mrpt::slam::CRangeBearingKFSLAM2D::TOptions, mrpt::maps::CHeightGridMap2D::TInsertionOptions, mrpt::maps::COctoMapBase< octree_t, octree_node_t >::TInsertionOptions, mrpt::vision::CFeatureExtraction::TOptions, mrpt::graphslam::deciders::CIncrementalNodeRegistrationDecider< GRAPH_T >::TParams, mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions, mrpt::bayes::TKF_options, mrpt::graphslam::TSlidingWindow, mrpt::maps::CReflectivityGridMap2D::TInsertionOptions, mrpt::hmtslam::CTopLCDetector_GridMatching::TOptions, mrpt::slam::CGridMapAligner::TConfigParams, mrpt::hmtslam::CTopLCDetector_FabMap::TOptions, mrpt::graphslam::TUncertaintyPath< GRAPH_T >, mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions, mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions, mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions, mrpt::maps::TMetricMapInitializer, mrpt::slam::CMetricMapBuilderICP::TConfigParams, and mrpt::slam::TKLDParams.

Definition at line 76 of file CLoadableOptions.cpp.

References mrpt::config::CConfigFileMemory::getContent(), out, and mrpt::config::CLoadableOptions::saveToConfigFile().

Referenced by mrpt::config::CLoadableOptions::dumpToConsole(), mrpt::maps::TMetricMapInitializer::dumpToTextStream(), mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::TParams::dumpToTextStream(), mrpt::maps::COccupancyGridMap3D::TMapDefinition::dumpToTextStream_map_specific(), and mrpt::apps::ICP_SLAM_App_Base::run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpVar_bool()

void CLoadableOptions::dumpVar_bool ( std::ostream &  out,
const char *  varName,
bool  v 
)
staticprotectedinherited

Definition at line 62 of file CLoadableOptions.cpp.

References mrpt::format(), LOADABLEOPTS_COLUMN_WIDTH, and out.

Here is the call graph for this function:

◆ dumpVar_double()

void CLoadableOptions::dumpVar_double ( std::ostream &  out,
const char *  varName,
double  v 
)
staticprotectedinherited

Definition at line 56 of file CLoadableOptions.cpp.

References mrpt::format(), LOADABLEOPTS_COLUMN_WIDTH, and out.

Here is the call graph for this function:

◆ dumpVar_float()

void CLoadableOptions::dumpVar_float ( std::ostream &  out,
const char *  varName,
float  v 
)
staticprotectedinherited

Definition at line 50 of file CLoadableOptions.cpp.

References mrpt::format(), LOADABLEOPTS_COLUMN_WIDTH, and out.

Here is the call graph for this function:

◆ dumpVar_int()

void CLoadableOptions::dumpVar_int ( std::ostream &  out,
const char *  varName,
int  v 
)
staticprotectedinherited

Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR.

Definition at line 44 of file CLoadableOptions.cpp.

References mrpt::format(), LOADABLEOPTS_COLUMN_WIDTH, and out.

Here is the call graph for this function:

◆ dumpVar_string()

void CLoadableOptions::dumpVar_string ( std::ostream &  out,
const char *  varName,
const std::string &  v 
)
staticprotectedinherited

Definition at line 69 of file CLoadableOptions.cpp.

References mrpt::format(), LOADABLEOPTS_COLUMN_WIDTH, and out.

Here is the call graph for this function:

◆ loadFromConfigFile()

void CParticleFilter::TParticleFilterOptions::loadFromConfigFile ( const mrpt::config::CConfigFileBase source,
const std::string &  section 
)
overridevirtual

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

Implements mrpt::config::CLoadableOptions.

Definition at line 141 of file CParticleFilter.cpp.

References ASSERT_, iniFile(), MRPT_END, MRPT_LOAD_CONFIG_VAR, MRPT_LOAD_CONFIG_VAR_NO_DEFAULT, MRPT_START, and mrpt::bayes::CParticleFilter::pfAuxiliaryPFOptimal.

Referenced by mrpt::apps::MonteCarloLocalization_Base::do_pf_localization(), and run_test_pf_localization().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromConfigFileName()

void CLoadableOptions::loadFromConfigFileName ( const std::string &  config_file,
const std::string &  section 
)
inherited

Behaves like loadFromConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to load the file.

See also
loadFromConfigFile

Definition at line 22 of file CLoadableOptions.cpp.

References mrpt::config::CLoadableOptions::loadFromConfigFile().

Referenced by mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::loadParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveToConfigFile()

void CParticleFilter::TParticleFilterOptions::saveToConfigFile ( mrpt::config::CConfigFileBase target,
const std::string &  section 
) const
overridevirtual

◆ saveToConfigFileName()

void CLoadableOptions::saveToConfigFileName ( const std::string &  config_file,
const std::string &  section 
) const
inherited

Behaves like saveToConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to save the file.

See also
saveToConfigFile, loadFromConfigFileName

Definition at line 36 of file CLoadableOptions.cpp.

References mrpt::config::CLoadableOptions::saveToConfigFile().

Here is the call graph for this function:

Member Data Documentation

◆ adaptiveSampleSize

bool mrpt::bayes::CParticleFilter::TParticleFilterOptions::adaptiveSampleSize {false}

◆ BETA

double mrpt::bayes::CParticleFilter::TParticleFilterOptions::BETA {0.5}

◆ max_loglikelihood_dyn_range

double mrpt::bayes::CParticleFilter::TParticleFilterOptions::max_loglikelihood_dyn_range {15}

Only for PF_algorithm=pfAuxiliaryPFOptimal: If a given particle has a max_likelihood (from the a-priori estimate) below the maximum from all the samples - max_loglikelihood_dyn_range, then the particle is directly discarded.

This is done to assure that the rejection sampling doesn't get stuck in an infinite loop trying to get an acceptable sample. Default = 15 (in logarithmic likelihood)

Definition at line 148 of file CParticleFilter.h.

Referenced by mrpt::slam::PF_implementation< mrpt::math::TPose3D, CMonteCarloLocalization3D, mrpt::bayes::particle_storage_mode::VALUE >::PF_SLAM_aux_perform_one_rejection_sampling_step(), and saveToConfigFile().

◆ PF_algorithm

TParticleFilterAlgorithm mrpt::bayes::CParticleFilter::TParticleFilterOptions::PF_algorithm {pfStandardProposal}

The PF algorithm to use (default=pfStandardProposal) See TParticleFilterAlgorithm for the possibilities.

Definition at line 136 of file CParticleFilter.h.

Referenced by mrpt::bayes::CParticleFilter::executeOn(), mrpt::bayes::CParticleFilterCapable::prediction_and_update(), and saveToConfigFile().

◆ pfAuxFilterOptimal_MaximumSearchSamples

unsigned int mrpt::bayes::CParticleFilter::TParticleFilterOptions::pfAuxFilterOptimal_MaximumSearchSamples {100}

In the algorithm "CParticleFilter::pfAuxiliaryPFOptimal" (and in "CParticleFilter::pfAuxiliaryPFStandard" only if pfAuxFilterStandard_FirstStageWeightsMonteCarlo = true) the number of samples for searching the maximum likelihood value and also to estimate the "first stage weights" (see papers!) (default=100)

Definition at line 129 of file CParticleFilter.h.

Referenced by mrpt::hmtslam::CLSLAM_RBPF_2DLASER::particlesEvaluator_AuxPFOptimal(), mrpt::slam::PF_implementation< mrpt::math::TPose3D, CMonteCarloLocalization3D, mrpt::bayes::particle_storage_mode::VALUE >::PF_SLAM_particlesEvaluator_AuxPFOptimal(), mrpt::slam::PF_implementation< mrpt::math::TPose3D, CMonteCarloLocalization3D, mrpt::bayes::particle_storage_mode::VALUE >::PF_SLAM_particlesEvaluator_AuxPFStandard(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::prediction_and_update_pfAuxiliaryPFOptimal(), and saveToConfigFile().

◆ pfAuxFilterOptimal_MLE

bool mrpt::bayes::CParticleFilter::TParticleFilterOptions::pfAuxFilterOptimal_MLE {false}

◆ pfAuxFilterStandard_FirstStageWeightsMonteCarlo

bool mrpt::bayes::CParticleFilter::TParticleFilterOptions::pfAuxFilterStandard_FirstStageWeightsMonteCarlo {false}

Only for PF_algorithm==pfAuxiliaryPFStandard: If false, the APF will predict the first stage weights just at the mean of the prior of the next time step.

If true, these weights will be estimated as described in the papers for the "pfAuxiliaryPFOptimal" method, i.e. through a monte carlo simulation. In that case, "pfAuxFilterOptimal_MaximumSearchSamples" is the number of MC samples used.

Definition at line 159 of file CParticleFilter.h.

Referenced by mrpt::slam::PF_implementation< mrpt::math::TPose3D, CMonteCarloLocalization3D, mrpt::bayes::particle_storage_mode::VALUE >::PF_SLAM_particlesEvaluator_AuxPFStandard(), and saveToConfigFile().

◆ powFactor

double mrpt::bayes::CParticleFilter::TParticleFilterOptions::powFactor {1}

◆ resamplingMethod

TParticleResamplingAlgorithm mrpt::bayes::CParticleFilter::TParticleFilterOptions::resamplingMethod {prMultinomial}

◆ sampleSize

unsigned int mrpt::bayes::CParticleFilter::TParticleFilterOptions::sampleSize {1}

The initial number of particles in the filter (it can change only if adaptiveSampleSize=true) (default=1)

Definition at line 121 of file CParticleFilter.h.

Referenced by saveToConfigFile().




Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020