10 #ifndef PF_implementations_H
11 #define PF_implementations_H
51 template <
class PARTICLE_TYPE,
class MY
SELF>
52 template <
class BINTYPE>
57 MYSELF *me =
static_cast<MYSELF*
>(
this);
63 if (robotMovement2D.present())
65 if (m_accumRobotMovement3DIsValid)
THROW_EXCEPTION(
"Mixing 2D and 3D actions is not allowed.")
67 if (!m_accumRobotMovement2DIsValid)
69 robotMovement2D->poseChange->getMean( m_accumRobotMovement2D.rawOdometryIncrementReading );
70 m_accumRobotMovement2D.motionModelConfiguration = robotMovement2D->motionModelConfiguration;
72 else m_accumRobotMovement2D.rawOdometryIncrementReading += robotMovement2D->poseChange->getMeanVal();
74 m_accumRobotMovement2DIsValid =
true;
81 if (m_accumRobotMovement2DIsValid)
THROW_EXCEPTION(
"Mixing 2D and 3D actions is not allowed.")
83 if (!m_accumRobotMovement3DIsValid)
84 m_accumRobotMovement3D = robotMovement3D->poseChange;
85 else m_accumRobotMovement3D += robotMovement3D->poseChange;
88 m_accumRobotMovement3DIsValid =
true;
96 const bool SFhasValidObservations = (sf==NULL) ?
false : PF_SLAM_implementation_doWeHaveValidObservations(me->m_particles,sf);
99 if (! ((m_accumRobotMovement2DIsValid || m_accumRobotMovement3DIsValid) && SFhasValidObservations))
104 if (m_accumRobotMovement3DIsValid)
106 m_movementDrawer.setPosePDF( m_accumRobotMovement3D );
107 m_accumRobotMovement3DIsValid =
false;
113 m_accumRobotMovement2D.rawOdometryIncrementReading,
114 m_accumRobotMovement2D.motionModelConfiguration );
116 m_movementDrawer.setPosePDF( theResultingRobotMov.
poseChange );
117 m_accumRobotMovement2DIsValid =
false;
135 template <
class PARTICLE_TYPE,
class MY
SELF>
136 template <
class BINTYPE>
144 PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal<BINTYPE>(actions,sf,PF_options,KLD_options,
true );
153 template <
class PARTICLE_TYPE,
class MY
SELF>
154 template <
class BINTYPE>
162 typedef std::set<BINTYPE,typename BINTYPE::lt_operator> TSetStateSpaceBins;
164 MYSELF *me =
static_cast<MYSELF*
>(
this);
179 if (robotMovement2D.present())
181 m_movementDrawer.setPosePDF( robotMovement2D->poseChange );
182 motionModelMeanIncr = robotMovement2D->poseChange->getMeanVal();
189 m_movementDrawer.setPosePDF( robotMovement3D->poseChange );
192 else {
THROW_EXCEPTION(
"Action list does not contain any CActionRobotMovement2D or CActionRobotMovement3D object!"); }
199 const size_t M = me->m_particles.size();
204 for (
size_t i=0;i<M;i++)
207 m_movementDrawer.drawSample( incrPose );
211 PF_SLAM_implementation_custom_update_particle_with_new_pose( me->m_particles[i].d,
TPose3D(finalPose) );
222 TSetStateSpaceBins stateSpaceBins;
225 const double delta_1 = 1.0 - KLD_options.
KLD_delta;
226 const double epsilon_1 = 0.5 / KLD_options.
KLD_epsilon;
229 me->prepareFastDrawSample(PF_options);
232 std::vector<TPose3D> newParticles;
233 std::vector<double> newParticlesWeight;
234 std::vector<size_t> newParticlesDerivedFromIdx;
242 m_movementDrawer.drawSample( increment_i );
245 const size_t drawn_idx = me->fastDrawSample(PF_options);
246 const CPose3D newPose =
CPose3D(*getLastPose(drawn_idx)) + increment_i;
247 const TPose3D newPose_s = newPose;
250 newParticles.push_back( newPose_s );
251 newParticlesWeight.push_back(0);
252 newParticlesDerivedFromIdx.push_back(drawn_idx);
257 KLF_loadBinFromParticle<PARTICLE_TYPE,BINTYPE>(p,KLD_options, me->m_particles[drawn_idx].d, &newPose_s);
259 if (stateSpaceBins.find( p )==stateSpaceBins.end())
263 stateSpaceBins.insert( p );
266 size_t K = stateSpaceBins.size();
274 N = newParticles.size();
283 this->PF_SLAM_implementation_replaceByNewParticleSet(
285 newParticles,newParticlesWeight,newParticlesDerivedFromIdx );
292 const size_t M = me->m_particles.size();
296 for (
size_t i=0;i<M;i++)
298 const TPose3D *partPose= getLastPose(i);
300 const double obs_log_likelihood = PF_SLAM_computeObservationLikelihoodForParticle(PF_options,i,*sf,partPose2);
301 me->m_particles[i].log_w += obs_log_likelihood * PF_options.
powFactor;
320 template <
class PARTICLE_TYPE,
class MY
SELF>
321 template <
class BINTYPE>
329 PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal<BINTYPE>(actions,sf,PF_options,KLD_options,
false );
335 template <
class PARTICLE_TYPE,
class MY
SELF>
336 template <
class BINTYPE>
342 const void *observation )
348 const MYSELF *me =
static_cast<const MYSELF*
>(obj);
354 double indivLik, maxLik= -1e300;
359 const CPose3D oldPose = *me->getLastPose(index);
362 for (
size_t q=0;q<N;q++)
364 me->m_movementDrawer.drawSample(drawnSample);
365 CPose3D x_predict = oldPose + drawnSample;
368 indivLik = me->PF_SLAM_computeObservationLikelihoodForParticle(
371 *static_cast<const CSensoryFrame*>(observation),
375 vectLiks[q] = indivLik;
376 if ( indivLik > maxLik )
378 maxLikDraw = drawnSample;
389 me->m_pfAuxiliaryPFOptimal_estimatedProb[index] = avrgLogLik;
390 me->m_pfAuxiliaryPFOptimal_maxLikelihood[index] = maxLik;
393 me->m_pfAuxiliaryPFOptimal_maxLikDrawnMovement[index] = maxLikDraw;
397 return me->m_particles[index].log_w + me->m_pfAuxiliaryPFOptimal_estimatedProb[index];
409 template <
class PARTICLE_TYPE,
class MY
SELF>
410 template <
class BINTYPE>
416 const void *observation )
421 const MYSELF *myObj =
static_cast<const MYSELF*
>(obj);
424 const double cur_logweight = myObj->m_particles[index].log_w;
425 const CPose3D oldPose = *myObj->getLastPose(index);
432 x_predict.
composeFrom( oldPose, *static_cast<const CPose3D*>(action) );
436 myObj->m_pfAuxiliaryPFStandard_estimatedProb[index] = myObj->PF_SLAM_computeObservationLikelihoodForParticle(
438 *static_cast<const CSensoryFrame*>(observation), x_predict );
441 return cur_logweight + myObj->m_pfAuxiliaryPFStandard_estimatedProb[index];
450 double indivLik, maxLik= -1e300;
457 for (
size_t q=0;q<N;q++)
459 myObj->m_movementDrawer.drawSample(drawnSample);
460 CPose3D x_predict = oldPose + drawnSample;
463 indivLik = myObj->PF_SLAM_computeObservationLikelihoodForParticle(
466 *static_cast<const CSensoryFrame*>(observation),
470 vectLiks[q] = indivLik;
471 if ( indivLik > maxLik )
473 maxLikDraw = drawnSample;
484 myObj->m_pfAuxiliaryPFStandard_estimatedProb[index] = avrgLogLik;
486 myObj->m_pfAuxiliaryPFOptimal_maxLikelihood[index] = maxLik;
488 myObj->m_pfAuxiliaryPFOptimal_maxLikDrawnMovement[index] = maxLikDraw;
492 return cur_logweight + myObj->m_pfAuxiliaryPFOptimal_estimatedProb[index];
500 template <
class PARTICLE_TYPE,
class MY
SELF>
501 template <
class BINTYPE>
507 const bool USE_OPTIMAL_SAMPLING )
510 typedef std::set<BINTYPE,typename BINTYPE::lt_operator> TSetStateSpaceBins;
512 MYSELF *me =
static_cast<MYSELF*
>(
this);
514 const size_t M = me->m_particles.size();
522 if (!PF_SLAM_implementation_gatherActionsCheckBothActObs<BINTYPE>(actions,sf))
536 m_pfAuxiliaryPFOptimal_maxLikDrawnMovement.resize(M);
538 m_pfAuxiliaryPFOptimal_estimatedProb.resize(M);
540 m_pfAuxiliaryPFStandard_estimatedProb.resize(M);
544 m_movementDrawer.getSamplingMean3D(meanRobotMovement);
551 me->prepareFastDrawSample(
553 USE_OPTIMAL_SAMPLING ? funcOpt : funcStd,
559 if (USE_OPTIMAL_SAMPLING && PF_options.
verbose)
561 printf(
"[prepareFastDrawSample] max (log) = %10.06f\n",
math::maximum(m_pfAuxiliaryPFOptimal_estimatedProb) );
562 printf(
"[prepareFastDrawSample] max-mean (log) = %10.06f\n", -
math::mean(m_pfAuxiliaryPFOptimal_estimatedProb) +
math::maximum(m_pfAuxiliaryPFOptimal_estimatedProb) );
563 printf(
"[prepareFastDrawSample] max-min (log) = %10.06f\n", -
math::minimum(m_pfAuxiliaryPFOptimal_estimatedProb) +
math::maximum(m_pfAuxiliaryPFOptimal_estimatedProb) );
579 vector<TPose3D> newParticles;
580 vector<double> newParticlesWeight;
581 vector<size_t> newParticlesDerivedFromIdx;
589 m_pfAuxiliaryPFOptimal_maxLikMovementDrawHasBeenUsed.assign(M,
false);
592 USE_OPTIMAL_SAMPLING ?
593 m_pfAuxiliaryPFOptimal_estimatedProb :
594 m_pfAuxiliaryPFStandard_estimatedProb );
601 newParticles.resize(M);
602 newParticlesWeight.resize(M);
603 newParticlesDerivedFromIdx.resize(M);
605 const bool doResample = me->ESS() < PF_options.
BETA;
607 for (
size_t i=0;i<M;i++)
615 k = me->fastDrawSample(PF_options);
621 double newParticleLogWeight;
622 PF_SLAM_aux_perform_one_rejection_sampling_step<BINTYPE>(
623 USE_OPTIMAL_SAMPLING,doResample,maxMeanLik,
626 newPose, newParticleLogWeight);
629 newParticles[i] = newPose;
630 newParticlesDerivedFromIdx[i] = k;
631 newParticlesWeight[i] = newParticleLogWeight;
644 newParticles.clear();
645 newParticlesWeight.resize(0);
646 newParticlesDerivedFromIdx.clear();
655 TSetStateSpaceBins stateSpaceBinsLastTimestep;
656 std::vector<vector_uint> stateSpaceBinsLastTimestepParticles;
658 unsigned int partIndex;
660 printf(
"[FIXED_SAMPLING] Computing...");
661 for (partIt = me->m_particles.begin(),partIndex=0; partIt!=me->m_particles.end(); ++partIt,++partIndex)
665 KLF_loadBinFromParticle<PARTICLE_TYPE,BINTYPE>(p, KLD_options,partIt->d );
669 if ( posFound == stateSpaceBinsLastTimestep.end() )
671 stateSpaceBinsLastTimestep.insert( p );
672 stateSpaceBinsLastTimestepParticles.push_back(
vector_uint(1,partIndex) );
676 const size_t idx =
std::distance(stateSpaceBinsLastTimestep.begin(),posFound);
677 stateSpaceBinsLastTimestepParticles[idx].push_back( partIndex );
680 printf(
"done (%u bins in t-1)\n",(
unsigned int)stateSpaceBinsLastTimestep.size());
685 double delta_1 = 1.0 - KLD_options.
KLD_delta;
687 bool doResample = me->ESS() < 0.5;
692 size_t Nx = minNumSamples_KLD ;
694 const size_t Np1 = me->m_particles.size();
696 for (
size_t k=0;k<Np1;k++) oldPartIdxsStillNotPropragated[k]=k;
698 const size_t Np = stateSpaceBinsLastTimestepParticles.size();
700 for (
size_t k=0;k<Np;k++) permutationPathsAuxVector[k]=k;
705 permutationPathsAuxVector.begin(),
706 permutationPathsAuxVector.end(),
712 TSetStateSpaceBins stateSpaceBins;
725 k = me->fastDrawSample(PF_options);
731 if (permutationPathsAuxVector.size())
733 const size_t idxBinSpacePath = *permutationPathsAuxVector.rbegin();
734 permutationPathsAuxVector.resize(permutationPathsAuxVector.size()-1);
737 k = stateSpaceBinsLastTimestepParticles[idxBinSpacePath][idx];
738 ASSERT_(k<me->m_particles.size());
741 oldPartIdxsStillNotPropragated.erase(std::find(oldPartIdxsStillNotPropragated.begin(),oldPartIdxsStillNotPropragated.end(),k));
752 if (oldPartIdxsStillNotPropragated.size())
757 oldPartIdxsStillNotPropragated.erase(it);
770 double newParticleLogWeight;
771 PF_SLAM_aux_perform_one_rejection_sampling_step<BINTYPE>(
772 USE_OPTIMAL_SAMPLING,doResample,maxMeanLik,
775 newPose, newParticleLogWeight);
778 newParticles.push_back( newPose );
779 newParticlesDerivedFromIdx.push_back( k );
780 newParticlesWeight.push_back(newParticleLogWeight);
787 const TPose3D newPose_s = newPose;
788 KLF_loadBinFromParticle<PARTICLE_TYPE,BINTYPE>( p,KLD_options, me->m_particles[k].d, &newPose_s );
796 if ( stateSpaceBins.find(p)==stateSpaceBins.end() )
799 stateSpaceBins.insert( p );
802 int K = stateSpaceBins.
size();
811 N = newParticles.size();
814 N < max(Nx,minNumSamples_KLD)) ||
815 (permutationPathsAuxVector.size() && !doResample) );
817 printf(
"\n[ADAPTIVE SAMPLE SIZE] #Bins: %u \t #Particles: %u \t Nx=%u\n", static_cast<unsigned>(stateSpaceBins.size()),static_cast<unsigned>(N), (unsigned)Nx);
826 this->PF_SLAM_implementation_replaceByNewParticleSet(
828 newParticles,newParticlesWeight,newParticlesDerivedFromIdx );
832 me->normalizeWeights();
841 template <
class PARTICLE_TYPE,
class MY
SELF>
842 template <
class BINTYPE>
844 const bool USE_OPTIMAL_SAMPLING,
845 const bool doResample,
846 const double maxMeanLik,
851 double & out_newParticleLogWeight)
853 MYSELF *me =
static_cast<MYSELF*
>(
this);
857 while ( ( (USE_OPTIMAL_SAMPLING ? m_pfAuxiliaryPFOptimal_estimatedProb[k] : m_pfAuxiliaryPFStandard_estimatedProb[k] )
862 if (PF_options.
verbose) cout <<
"[PF_implementation] Warning: Discarding very unlikely particle" << endl;
865 const CPose3D oldPose = *getLastPose(k);
871 if ( PF_SLAM_implementation_skipRobotMovement() )
875 out_newPose = oldPose;
881 if (!USE_OPTIMAL_SAMPLING)
883 m_movementDrawer.drawSample( movementDraw );
886 poseLogLik = PF_SLAM_computeObservationLikelihoodForParticle(PF_options, k,*sf,out_newPose);
891 double acceptanceProb;
893 const int maxTries=10000;
894 double bestTryByNow_loglik= -std::numeric_limits<double>::max();
901 m_pfAuxiliaryPFOptimal_maxLikMovementDrawHasBeenUsed[k] =
true;
902 movementDraw =
CPose3D( m_pfAuxiliaryPFOptimal_maxLikDrawnMovement[k] );
907 m_movementDrawer.drawSample( movementDraw );
913 poseLogLik = PF_SLAM_computeObservationLikelihoodForParticle(PF_options, k,*sf,out_newPose);
915 if (poseLogLik>bestTryByNow_loglik)
917 bestTryByNow_loglik = poseLogLik;
918 bestTryByNow_pose = out_newPose;
921 double ratioLikLik = std::exp( poseLogLik - m_pfAuxiliaryPFOptimal_maxLikelihood[k] );
922 acceptanceProb = std::min( 1.0, ratioLikLik );
924 if ( ratioLikLik > 1)
926 m_pfAuxiliaryPFOptimal_maxLikelihood[k] = poseLogLik;
931 if (timeout>=maxTries)
933 out_newPose = bestTryByNow_pose;
934 poseLogLik = bestTryByNow_loglik;
935 if (PF_options.
verbose) cout <<
"[PF_implementation] Warning: timeout in rejection sampling." << endl;
941 if (USE_OPTIMAL_SAMPLING)
944 out_newParticleLogWeight = 0;
947 const double weightFact = m_pfAuxiliaryPFOptimal_estimatedProb[k] * PF_options.
powFactor;
948 out_newParticleLogWeight = me->m_particles[k].log_w + weightFact;
953 const double weightFact = (poseLogLik-m_pfAuxiliaryPFStandard_estimatedProb[k]) * PF_options.
powFactor;
955 out_newParticleLogWeight = weightFact;
956 else out_newParticleLogWeight = weightFact + me->m_particles[k].log_w;
void getMean(CPose3D &mean_pose) const
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
A namespace of pseudo-random numbers genrators of diferent distributions.
double drawUniform(const double Min, const double Max)
Generate a uniformly distributed pseudo-random number using the MT19937 algorithm, scaled to the selected range.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
BASE_IMPEXP CRandomGenerator randomGenerator
A static instance of a CRandomGenerator class, for use in single-thread applications.
#define INVALID_LIKELIHOOD_VALUE
int round(const T value)
Returns the closer integer (int) to x.
unsigned int pfAuxFilterOptimal_MaximumSearchSamples
In the algorithm "CParticleFilter::pfAuxiliaryPFOptimal" (and in "CParticleFilter::pfAuxiliaryPFStand...
#define MRPT_CHECK_NORMAL_NUMBER(val)
The namespace for Bayesian filtering algorithm: different particle filters and Kalman filter algorith...
#define THROW_EXCEPTION(msg)
double(* TParticleProbabilityEvaluator)(const bayes::CParticleFilter::TParticleFilterOptions &PF_options, const CParticleFilterCapable *obj, size_t index, const void *action, const void *observation)
A callback function type for evaluating the probability of m_particles of being selected, used in "fastDrawSample".
Option set for KLD algorithm.
static double PF_SLAM_particlesEvaluator_AuxPFOptimal(const CParticleFilter::TParticleFilterOptions &PF_options, const CParticleFilterCapable *obj, size_t index, const void *action, const void *observation)
Declares a class for storing a collection of robot actions.
CActionRobotMovement2DPtr getBestMovementEstimation() const
Returns the best pose increment estimator in the collection, based on the determinant of its pose cha...
A set of common data shared by PF implementations for both SLAM and localization. ...
CONTAINER::Scalar minimum(const CONTAINER &v)
unsigned int KLD_minSampleSize
Parameters for the KLD adaptive sample size algorithm (see Dieter Fox's papers), which is used only i...
This base provides a set of functions for maths stuff.
void PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal(const CActionCollection *actions, const CSensoryFrame *sf, const CParticleFilter::TParticleFilterOptions &PF_options, const TKLDParams &KLD_options, const bool USE_OPTIMAL_SAMPLING)
The shared implementation body of two PF methods: APF and Optimal-APF, depending on USE_OPTIMAL_SAMPL...
uint32_t drawUniform32bit()
Generate a uniformly distributed pseudo-random number using the MT19937 algorithm, in the whole range of 32-bit integers.
std::vector< size_t > vector_size_t
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
double KLD_minSamplesPerBin
(Default: KLD_minSamplesPerBin=0) The minimum number of samples will be the maximum of KLD_minSampleS...
double BASE_IMPEXP averageLogLikelihood(const CVectorDouble &logLikelihoods)
A numerically-stable method to compute average likelihood values with strongly different ranges (unwe...
void PF_SLAM_implementation_pfAuxiliaryPFOptimal(const CActionCollection *actions, const CSensoryFrame *sf, const CParticleFilter::TParticleFilterOptions &PF_options, const TKLDParams &KLD_options)
A generic implementation of the PF method "prediction_and_update_pfAuxiliaryPFOptimal" (optimal sampl...
This virtual class defines the interface that any particles based PDF class must implement in order t...
void PF_SLAM_aux_perform_one_rejection_sampling_step(const bool USE_OPTIMAL_SAMPLING, const bool doResample, const double maxMeanLik, size_t k, const CSensoryFrame *sf, const CParticleFilter::TParticleFilterOptions &PF_options, CPose3D &out_newPose, double &out_newParticleLogWeight)
void PF_SLAM_implementation_pfStandardProposal(const CActionCollection *actions, const CSensoryFrame *sf, const CParticleFilter::TParticleFilterOptions &PF_options, const TKLDParams &KLD_options)
A generic implementation of the PF method "pfStandardProposal" (standard proposal distribution...
bool pfAuxFilterStandard_FirstStageWeightsMonteCarlo
Only for PF_algorithm==pfAuxiliaryPFStandard: If false, the APF will predict the first stage weights ...
CONTAINER::Scalar maximum(const CONTAINER &v)
double BETA
The resampling of particles will be performed when ESS (in range [0,1]) < BETA (default is 0...
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
ptrdiff_t random_generator_for_STL(ptrdiff_t i)
A random number generator for usage in STL algorithms expecting a function like this (eg...
unsigned int KLD_maxSampleSize
T::SmartPtr getActionByClass(const size_t &ith=0) const
Access to the i'th action of a given class, or a NULL smart pointer if there is no action of that cla...
CPosePDFPtr poseChange
The 2D pose change probabilistic estimation.
Represents a probabilistic 3D (6D) movement.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Represents a probabilistic 2D movement of the robot mobile base.
double BASE_IMPEXP chi2inv(double P, unsigned int dim=1)
The "quantile" of the Chi-Square distribution, for dimension "dim" and probability 0
bool verbose
Enable extra messages for each PF iteration (Default=false)
double max_loglikelihood_dyn_range
Only for PF_algorithm=pfAuxiliaryPFOptimal: If a given particle has a max_likelihood (from the a-prio...
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void computeFromOdometry(const CPose2D &odometryIncrement, const TMotionModelOptions &options)
Computes the PDF of the pose increment from an odometry reading and according to the given motion mod...
double powFactor
An optional step to "smooth" dramatic changes in the observation model to affect the variance of the ...
The configuration of a particle filter.
void composeFrom(const CPose3D &A, const CPose3D &B)
Makes "this = A (+) B"; this method is slightly more efficient than "this= A + B;" since it avoids th...
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
double mean(const CONTAINER &v)
Computes the mean value of a vector.
bool pfAuxFilterOptimal_MLE
(Default=false) In the algorithm "CParticleFilter::pfAuxiliaryPFOptimal", if set to true...
dynamic_vector< double > CVectorDouble
Column vector, like Eigen::MatrixXd, but automatically initialized to zeros since construction...
static double PF_SLAM_particlesEvaluator_AuxPFStandard(const CParticleFilter::TParticleFilterOptions &PF_options, const CParticleFilterCapable *obj, size_t index, const void *action, const void *observation)
Compute w[i]·p(z_t | mu_t^i), with mu_t^i being the mean of the new robot pose.
std::vector< uint32_t > vector_uint
poses::CPose3DPDFGaussian poseChange
The 3D pose change probabilistic estimation.
bool PF_SLAM_implementation_gatherActionsCheckBothActObs(const CActionCollection *actions, const CSensoryFrame *sf)
Auxiliary method called by PF implementations: return true if we have both action & observation...
void PF_SLAM_implementation_pfAuxiliaryPFStandard(const CActionCollection *actions, const CSensoryFrame *sf, const CParticleFilter::TParticleFilterOptions &PF_options, const TKLDParams &KLD_options)
A generic implementation of the PF method "prediction_and_update_pfAuxiliaryPFStandard" (Auxiliary pa...
bool adaptiveSampleSize
A flag that indicates whether the CParticleFilterCapable object should perform adative sample size (d...
double BASE_IMPEXP distance(const TPoint2D &p1, const TPoint2D &p2)
Gets the distance between two points in a 2D space.