The configuration of a particle filter.
Definition at line 102 of file CParticleFilter.h.
#include <mrpt/bayes/CParticleFilter.h>
Public Member Functions | |
TParticleFilterOptions () | |
Initilization of default parameters. More... | |
void | loadFromConfigFile (const mrpt::utils::CConfigFileBase &source, const std::string §ion) override |
This method load the options from a ".ini"-like file or memory-stored string list. More... | |
virtual void | saveToConfigFile (mrpt::utils::CConfigFileBase &target, const std::string §ion) 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 §ion) |
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 §ion) 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 (mrpt::utils::CStream &out) const |
This method should clearly display all the contents of the structure in textual form, sending it to a CStream. More... | |
Public Attributes | |
bool | adaptiveSampleSize |
A flag that indicates whether the CParticleFilterCapable object should perform adative sample size (default=false). More... | |
double | BETA |
The resampling of particles will be performed when ESS (in range [0,1]) < BETA (default is 0.5) More... | |
unsigned int | sampleSize |
The initial number of particles in the filter (it can change only if adaptiveSampleSize=true) (default=1) More... | |
unsigned int | pfAuxFilterOptimal_MaximumSearchSamples |
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 |
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 |
The PF algorithm to use (default=pfStandardProposal) See TParticleFilterAlgorithm for the posibilities. More... | |
TParticleResamplingAlgorithm | resamplingMethod |
The resampling algorithm to use (default=prMultinomial). More... | |
double | max_loglikelihood_dyn_range |
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 |
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 |
(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 (CStream &out, const char *varName, int v) |
Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR. More... | |
static void | dumpVar_float (CStream &out, const char *varName, float v) |
static void | dumpVar_double (CStream &out, const char *varName, double v) |
static void | dumpVar_bool (CStream &out, const char *varName, bool v) |
static void | dumpVar_string (CStream &out, const char *varName, const std::string &v) |
CParticleFilter::TParticleFilterOptions::TParticleFilterOptions | ( | ) |
Initilization of default parameters.
Definition at line 48 of file CParticleFilter.cpp.
|
inherited |
Just like dumpToTextStream() but sending the text to the console (std::cout)
Definition at line 44 of file CLoadableOptions.cpp.
References mrpt::utils::CLoadableOptions::dumpToTextStream(), and loadable_opts_my_cout.
Referenced by mrpt::hmtslam::CTopLCDetector_GridMatching::computeTopologicalObservationModel(), and mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::printParams().
|
virtualinherited |
This method should clearly display all the contents of the structure in textual form, sending it to a CStream.
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::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLaserParams, mrpt::hmtslam::CHMTSLAM::TOptions, mrpt::maps::CLandmarksMap::TLikelihoodOptions, mrpt::maps::TSetOfMetricMapInitializers, mrpt::maps::CPointsMap::TLikelihoodOptions, mrpt::maps::CColouredPointsMap::TColourOptions, mrpt::vision::TStereoSystemParams, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TLikelihoodOptions, mrpt::maps::CLandmarksMap::TInsertionOptions, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::GraphVisualizationParams, mrpt::maps::CPointsMap::TInsertionOptions, mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::TParams, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::OptimizationParams, mrpt::slam::CRangeBearingKFSLAM::TOptions, mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::TParams, mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::TParams, mrpt::maps::CBeaconMap::TInsertionOptions, 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::COctoMapBase< OCTREE, OCTREE_NODE >::TInsertionOptions, mrpt::maps::CHeightGridMap2D::TInsertionOptions, mrpt::maps::TMapGenericParams, mrpt::vision::CFeatureExtraction::TOptions, mrpt::graphslam::deciders::CIncrementalNodeRegistrationDecider< GRAPH_T >::TParams, mrpt::bayes::TKF_options, mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions, mrpt::graphslam::TSlidingWindow, mrpt::slam::CGridMapAligner::TConfigParams, mrpt::slam::CICP::TConfigParams, mrpt::maps::CReflectivityGridMap2D::TInsertionOptions, mrpt::graphslam::TUncertaintyPath< GRAPH_T >, mrpt::hmtslam::CTopLCDetector_GridMatching::TOptions, mrpt::hmtslam::CTopLCDetector_FabMap::TOptions, mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions, mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions, mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions, mrpt::slam::CIncrementalMapPartitioner::TOptions, mrpt::maps::TMetricMapInitializer, mrpt::slam::CMetricMapBuilderICP::TConfigParams, mrpt::vision::CCamModel, and mrpt::slam::TKLDParams.
Definition at line 83 of file CLoadableOptions.cpp.
References mrpt::utils::CConfigFileMemory::getContent(), mrpt::utils::CStream::printf(), and mrpt::utils::CLoadableOptions::saveToConfigFile().
Referenced by mrpt::utils::CLoadableOptions::dumpToConsole().
|
staticprotectedinherited |
Definition at line 65 of file CLoadableOptions.cpp.
References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().
|
staticprotectedinherited |
Definition at line 59 of file CLoadableOptions.cpp.
References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().
|
staticprotectedinherited |
Definition at line 54 of file CLoadableOptions.cpp.
References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().
|
staticprotectedinherited |
Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR.
Definition at line 49 of file CLoadableOptions.cpp.
References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().
|
staticprotectedinherited |
Definition at line 71 of file CLoadableOptions.cpp.
References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().
|
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:
Implements mrpt::utils::CLoadableOptions.
Definition at line 101 of file CParticleFilter.cpp.
References ASSERT_, MRPT_END, MRPT_LOAD_CONFIG_VAR, MRPT_LOAD_CONFIG_VAR_NO_DEFAULT, MRPT_START, mrpt::bayes::CParticleFilter::pfAuxiliaryPFOptimal, and mrpt::utils::CConfigFileBase::read_enum().
Referenced by run_test_pf_localization().
|
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.
Definition at line 22 of file CLoadableOptions.cpp.
References mrpt::utils::CLoadableOptions::loadFromConfigFile().
Referenced by mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::loadParams().
|
overridevirtual |
This method saves the options to a ".ini"-like file or memory-stored string list.
Reimplemented from mrpt::utils::CLoadableOptions.
Definition at line 62 of file CParticleFilter.cpp.
References MRPT_SAVE_CONFIG_VAR_COMMENT.
|
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.
Definition at line 37 of file CLoadableOptions.cpp.
References mrpt::utils::CLoadableOptions::saveToConfigFile().
bool mrpt::bayes::CParticleFilter::TParticleFilterOptions::adaptiveSampleSize |
A flag that indicates whether the CParticleFilterCapable object should perform adative sample size (default=false).
Definition at line 118 of file CParticleFilter.h.
Referenced by mrpt::bayes::CParticleFilterCapable::fastDrawSample(), mrpt::slam::StandardProposal::PF_SLAM_implementation(), mrpt::slam::AuxiliaryPFStandardAndOptimal< USE_OPTIMAL_SAMPLING >::PF_SLAM_implementation(), and mrpt::bayes::CParticleFilterCapable::prepareFastDrawSample().
double mrpt::bayes::CParticleFilter::TParticleFilterOptions::BETA |
The resampling of particles will be performed when ESS (in range [0,1]) < BETA (default is 0.5)
Definition at line 121 of file CParticleFilter.h.
Referenced by mrpt::slam::AuxiliaryPFStandardAndOptimal< USE_OPTIMAL_SAMPLING >::PF_SLAM_implementation().
double mrpt::bayes::CParticleFilter::TParticleFilterOptions::max_loglikelihood_dyn_range |
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 151 of file CParticleFilter.h.
Referenced by mrpt::slam::AuxiliaryPFStandardAndOptimal< USE_OPTIMAL_SAMPLING >::PF_SLAM_aux_perform_one_rejection_sampling_step().
TParticleFilterAlgorithm mrpt::bayes::CParticleFilter::TParticleFilterOptions::PF_algorithm |
The PF algorithm to use (default=pfStandardProposal) See TParticleFilterAlgorithm for the posibilities.
Definition at line 139 of file CParticleFilter.h.
Referenced by mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::processOneLMH(), and run_test_pf_localization().
unsigned int mrpt::bayes::CParticleFilter::TParticleFilterOptions::pfAuxFilterOptimal_MaximumSearchSamples |
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 132 of file CParticleFilter.h.
Referenced by mrpt::slam::AuxPFOptimalEvaluator::evaluate(), mrpt::slam::AuxPFStandardEvaluator::evaluate(), and mrpt::hmtslam::CLocalMetricHypothesis::particlesEvaluator_AuxPFOptimal().
bool mrpt::bayes::CParticleFilter::TParticleFilterOptions::pfAuxFilterOptimal_MLE |
(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.
Definition at line 168 of file CParticleFilter.h.
Referenced by mrpt::slam::AuxPFOptimalEvaluator::evaluate(), mrpt::slam::AuxPFStandardEvaluator::evaluate(), mrpt::slam::AuxiliaryPFStandardAndOptimal< USE_OPTIMAL_SAMPLING >::PF_SLAM_aux_perform_one_rejection_sampling_step(), and mrpt::slam::AuxiliaryPFStandardAndOptimal< USE_OPTIMAL_SAMPLING >::PF_SLAM_implementation().
bool mrpt::bayes::CParticleFilter::TParticleFilterOptions::pfAuxFilterStandard_FirstStageWeightsMonteCarlo |
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 162 of file CParticleFilter.h.
Referenced by mrpt::slam::AuxPFStandardEvaluator::evaluate().
double mrpt::bayes::CParticleFilter::TParticleFilterOptions::powFactor |
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).
Definition at line 136 of file CParticleFilter.h.
Referenced by mrpt::slam::AuxiliaryPFStandardAndOptimal< USE_OPTIMAL_SAMPLING >::PF_SLAM_aux_perform_one_rejection_sampling_step(), and mrpt::slam::StandardProposal::PF_SLAM_implementation().
TParticleResamplingAlgorithm mrpt::bayes::CParticleFilter::TParticleFilterOptions::resamplingMethod |
The resampling algorithm to use (default=prMultinomial).
Definition at line 141 of file CParticleFilter.h.
Referenced by mrpt::bayes::CParticleFilterCapable::fastDrawSample(), mrpt::bayes::CParticleFilterCapable::performResampling(), and mrpt::bayes::CParticleFilterCapable::prepareFastDrawSample().
unsigned int mrpt::bayes::CParticleFilter::TParticleFilterOptions::sampleSize |
The initial number of particles in the filter (it can change only if adaptiveSampleSize=true) (default=1)
Definition at line 124 of file CParticleFilter.h.
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |