10 #ifndef PF_implementations_H
11 #define PF_implementations_H
44 template <
class PARTICLE_TYPE,
class MY
SELF>
45 template <
class BINTYPE>
50 MYSELF *me =
static_cast<MYSELF*
>(
this);
56 if (robotMovement2D.present())
58 if (m_accumRobotMovement3DIsValid)
THROW_EXCEPTION(
"Mixing 2D and 3D actions is not allowed.")
60 if (!m_accumRobotMovement2DIsValid)
62 robotMovement2D->poseChange->getMean( m_accumRobotMovement2D.rawOdometryIncrementReading );
63 m_accumRobotMovement2D.motionModelConfiguration = robotMovement2D->motionModelConfiguration;
65 else m_accumRobotMovement2D.rawOdometryIncrementReading += robotMovement2D->poseChange->getMeanVal();
67 m_accumRobotMovement2DIsValid =
true;
74 if (m_accumRobotMovement2DIsValid)
THROW_EXCEPTION(
"Mixing 2D and 3D actions is not allowed.")
76 if (!m_accumRobotMovement3DIsValid)
77 m_accumRobotMovement3D = robotMovement3D->poseChange;
78 else m_accumRobotMovement3D += robotMovement3D->poseChange;
81 m_accumRobotMovement3DIsValid =
true;
89 const bool SFhasValidObservations = (sf==NULL) ?
false : PF_SLAM_implementation_doWeHaveValidObservations(me->m_particles,sf);
92 if (! ((m_accumRobotMovement2DIsValid || m_accumRobotMovement3DIsValid) && SFhasValidObservations))
97 if (m_accumRobotMovement3DIsValid)
99 m_movementDrawer.setPosePDF( m_accumRobotMovement3D );
100 m_accumRobotMovement3DIsValid =
false;
106 m_accumRobotMovement2D.rawOdometryIncrementReading,
107 m_accumRobotMovement2D.motionModelConfiguration );
109 m_movementDrawer.setPosePDF( theResultingRobotMov.
poseChange );
110 m_accumRobotMovement2DIsValid =
false;
128 template <
class PARTICLE_TYPE,
class MY
SELF>
129 template <
class BINTYPE>
137 PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal<BINTYPE>(actions,sf,PF_options,KLD_options,
true );
146 template <
class PARTICLE_TYPE,
class MY
SELF>
147 template <
class BINTYPE>
155 typedef std::set<BINTYPE,typename BINTYPE::lt_operator> TSetStateSpaceBins;
157 MYSELF *me =
static_cast<MYSELF*
>(
this);
168 CPose3D motionModelMeanIncr;
172 if (robotMovement2D.present())
174 m_movementDrawer.setPosePDF( robotMovement2D->poseChange );
175 motionModelMeanIncr = robotMovement2D->poseChange->getMeanVal();
182 m_movementDrawer.setPosePDF( robotMovement3D->poseChange );
185 else {
THROW_EXCEPTION(
"Action list does not contain any CActionRobotMovement2D or CActionRobotMovement3D object!"); }
192 const size_t M = me->m_particles.size();
197 for (
size_t i=0;i<M;i++)
200 m_movementDrawer.drawSample( incrPose );
201 CPose3D finalPose = CPose3D(*getLastPose(i)) + incrPose;
204 PF_SLAM_implementation_custom_update_particle_with_new_pose( me->m_particles[i].d, TPose3D(finalPose) );
215 TSetStateSpaceBins stateSpaceBins;
218 const double delta_1 = 1.0 - KLD_options.
KLD_delta;
219 const double epsilon_1 = 0.5 / KLD_options.
KLD_epsilon;
222 me->prepareFastDrawSample(PF_options);
225 std::vector<TPose3D> newParticles;
226 std::vector<double> newParticlesWeight;
227 std::vector<size_t> newParticlesDerivedFromIdx;
235 m_movementDrawer.drawSample( increment_i );
238 const size_t drawn_idx = me->fastDrawSample(PF_options);
240 const TPose3D newPose_s = newPose;
243 newParticles.push_back( newPose_s );
244 newParticlesWeight.push_back(0);
245 newParticlesDerivedFromIdx.push_back(drawn_idx);
250 KLF_loadBinFromParticle<PARTICLE_TYPE,BINTYPE>(p,KLD_options, me->m_particles[drawn_idx].d, &newPose_s);
252 if (stateSpaceBins.find( p )==stateSpaceBins.end())
256 stateSpaceBins.insert( p );
259 size_t K = stateSpaceBins.size();
267 N = newParticles.size();
276 this->PF_SLAM_implementation_replaceByNewParticleSet(
278 newParticles,newParticlesWeight,newParticlesDerivedFromIdx );
285 const size_t M = me->m_particles.size();
289 for (
size_t i=0;i<M;i++)
291 const TPose3D *partPose= getLastPose(i);
292 CPose3D partPose2 = CPose3D(*partPose);
293 const double obs_log_likelihood = PF_SLAM_computeObservationLikelihoodForParticle(PF_options,i,*sf,partPose2);
294 me->m_particles[i].log_w += obs_log_likelihood * PF_options.
powFactor;
313 template <
class PARTICLE_TYPE,
class MY
SELF>
314 template <
class BINTYPE>
322 PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal<BINTYPE>(actions,sf,PF_options,KLD_options,
false );
328 template <
class PARTICLE_TYPE,
class MY
SELF>
329 template <
class BINTYPE>
335 const void *observation )
341 const MYSELF *me =
static_cast<const MYSELF*
>(obj);
347 double indivLik, maxLik= -1e300;
355 for (
size_t q=0;q<N;q++)
357 me->m_movementDrawer.drawSample(drawnSample);
358 CPose3D x_predict = oldPose + drawnSample;
361 indivLik = me->PF_SLAM_computeObservationLikelihoodForParticle(
364 *static_cast<const mrpt::obs::CSensoryFrame*>(observation),
368 vectLiks[q] = indivLik;
369 if ( indivLik > maxLik )
371 maxLikDraw = drawnSample;
382 me->m_pfAuxiliaryPFOptimal_estimatedProb[index] = avrgLogLik;
383 me->m_pfAuxiliaryPFOptimal_maxLikelihood[index] = maxLik;
386 me->m_pfAuxiliaryPFOptimal_maxLikDrawnMovement[index] = maxLikDraw;
390 return me->m_particles[index].log_w + me->m_pfAuxiliaryPFOptimal_estimatedProb[index];
402 template <
class PARTICLE_TYPE,
class MY
SELF>
403 template <
class BINTYPE>
409 const void *observation )
414 const MYSELF *myObj =
static_cast<const MYSELF*
>(obj);
417 const double cur_logweight = myObj->m_particles[index].log_w;
425 x_predict.
composeFrom( oldPose, *static_cast<const CPose3D*>(action) );
429 myObj->m_pfAuxiliaryPFStandard_estimatedProb[index] = myObj->PF_SLAM_computeObservationLikelihoodForParticle(
431 *static_cast<const mrpt::obs::CSensoryFrame*>(observation), x_predict );
434 return cur_logweight + myObj->m_pfAuxiliaryPFStandard_estimatedProb[index];
443 double indivLik, maxLik= -1e300;
450 for (
size_t q=0;q<N;q++)
452 myObj->m_movementDrawer.drawSample(drawnSample);
453 CPose3D x_predict = oldPose + drawnSample;
456 indivLik = myObj->PF_SLAM_computeObservationLikelihoodForParticle(
459 *static_cast<const mrpt::obs::CSensoryFrame*>(observation),
463 vectLiks[q] = indivLik;
464 if ( indivLik > maxLik )
466 maxLikDraw = drawnSample;
477 myObj->m_pfAuxiliaryPFStandard_estimatedProb[index] = avrgLogLik;
479 myObj->m_pfAuxiliaryPFOptimal_maxLikelihood[index] = maxLik;
481 myObj->m_pfAuxiliaryPFOptimal_maxLikDrawnMovement[index] = maxLikDraw;
485 return cur_logweight + myObj->m_pfAuxiliaryPFOptimal_estimatedProb[index];
493 template <
class PARTICLE_TYPE,
class MY
SELF>
494 template <
class BINTYPE>
500 const bool USE_OPTIMAL_SAMPLING )
503 typedef std::set<BINTYPE,typename BINTYPE::lt_operator> TSetStateSpaceBins;
505 MYSELF *me =
static_cast<MYSELF*
>(
this);
507 const size_t M = me->m_particles.size();
515 if (!PF_SLAM_implementation_gatherActionsCheckBothActObs<BINTYPE>(actions,sf))
529 m_pfAuxiliaryPFOptimal_maxLikDrawnMovement.resize(M);
531 m_pfAuxiliaryPFOptimal_estimatedProb.resize(M);
533 m_pfAuxiliaryPFStandard_estimatedProb.resize(M);
536 CPose3D meanRobotMovement;
537 m_movementDrawer.getSamplingMean3D(meanRobotMovement);
541 CParticleFilterCapable::TParticleProbabilityEvaluator funcOpt = &TMyClass::template PF_SLAM_particlesEvaluator_AuxPFOptimal<BINTYPE>;
542 CParticleFilterCapable::TParticleProbabilityEvaluator funcStd = &TMyClass::template PF_SLAM_particlesEvaluator_AuxPFStandard<BINTYPE>;
544 me->prepareFastDrawSample(
546 USE_OPTIMAL_SAMPLING ? funcOpt : funcStd,
552 if (USE_OPTIMAL_SAMPLING && PF_options.
verbose)
554 printf(
"[prepareFastDrawSample] max (log) = %10.06f\n",
math::maximum(m_pfAuxiliaryPFOptimal_estimatedProb) );
555 printf(
"[prepareFastDrawSample] max-mean (log) = %10.06f\n", -
math::mean(m_pfAuxiliaryPFOptimal_estimatedProb) +
math::maximum(m_pfAuxiliaryPFOptimal_estimatedProb) );
556 printf(
"[prepareFastDrawSample] max-min (log) = %10.06f\n", -
math::minimum(m_pfAuxiliaryPFOptimal_estimatedProb) +
math::maximum(m_pfAuxiliaryPFOptimal_estimatedProb) );
572 vector<TPose3D> newParticles;
573 vector<double> newParticlesWeight;
574 vector<size_t> newParticlesDerivedFromIdx;
582 m_pfAuxiliaryPFOptimal_maxLikMovementDrawHasBeenUsed.assign(M,
false);
585 USE_OPTIMAL_SAMPLING ?
586 m_pfAuxiliaryPFOptimal_estimatedProb :
587 m_pfAuxiliaryPFStandard_estimatedProb );
594 newParticles.resize(M);
595 newParticlesWeight.resize(M);
596 newParticlesDerivedFromIdx.resize(M);
598 const bool doResample = me->ESS() < PF_options.
BETA;
600 for (
size_t i=0;i<M;i++)
608 k = me->fastDrawSample(PF_options);
614 double newParticleLogWeight;
615 PF_SLAM_aux_perform_one_rejection_sampling_step<BINTYPE>(
616 USE_OPTIMAL_SAMPLING,doResample,maxMeanLik,
619 newPose, newParticleLogWeight);
622 newParticles[i] = newPose;
623 newParticlesDerivedFromIdx[i] = k;
624 newParticlesWeight[i] = newParticleLogWeight;
637 newParticles.clear();
638 newParticlesWeight.resize(0);
639 newParticlesDerivedFromIdx.clear();
648 TSetStateSpaceBins stateSpaceBinsLastTimestep;
649 std::vector<vector_uint> stateSpaceBinsLastTimestepParticles;
651 unsigned int partIndex;
653 printf(
"[FIXED_SAMPLING] Computing...");
654 for (partIt = me->m_particles.begin(),partIndex=0; partIt!=me->m_particles.end(); ++partIt,++partIndex)
658 KLF_loadBinFromParticle<PARTICLE_TYPE,BINTYPE>(p, KLD_options,partIt->d );
662 if ( posFound == stateSpaceBinsLastTimestep.end() )
664 stateSpaceBinsLastTimestep.insert( p );
665 stateSpaceBinsLastTimestepParticles.push_back(
vector_uint(1,partIndex) );
669 const size_t idx =
std::distance(stateSpaceBinsLastTimestep.begin(),posFound);
670 stateSpaceBinsLastTimestepParticles[idx].push_back( partIndex );
673 printf(
"done (%u bins in t-1)\n",(
unsigned int)stateSpaceBinsLastTimestep.size());
678 double delta_1 = 1.0 - KLD_options.
KLD_delta;
680 bool doResample = me->ESS() < 0.5;
685 size_t Nx = minNumSamples_KLD ;
687 const size_t Np1 = me->m_particles.size();
689 for (
size_t k=0;k<Np1;k++) oldPartIdxsStillNotPropragated[k]=k;
691 const size_t Np = stateSpaceBinsLastTimestepParticles.size();
693 for (
size_t k=0;k<Np;k++) permutationPathsAuxVector[k]=k;
698 permutationPathsAuxVector.begin(),
699 permutationPathsAuxVector.end(),
705 TSetStateSpaceBins stateSpaceBins;
718 k = me->fastDrawSample(PF_options);
724 if (permutationPathsAuxVector.size())
726 const size_t idxBinSpacePath = *permutationPathsAuxVector.rbegin();
727 permutationPathsAuxVector.resize(permutationPathsAuxVector.size()-1);
730 k = stateSpaceBinsLastTimestepParticles[idxBinSpacePath][idx];
731 ASSERT_(k<me->m_particles.size());
734 oldPartIdxsStillNotPropragated.erase(std::find(oldPartIdxsStillNotPropragated.begin(),oldPartIdxsStillNotPropragated.end(),k));
745 if (oldPartIdxsStillNotPropragated.size())
750 oldPartIdxsStillNotPropragated.erase(it);
763 double newParticleLogWeight;
764 PF_SLAM_aux_perform_one_rejection_sampling_step<BINTYPE>(
765 USE_OPTIMAL_SAMPLING,doResample,maxMeanLik,
768 newPose, newParticleLogWeight);
771 newParticles.push_back( newPose );
772 newParticlesDerivedFromIdx.push_back( k );
773 newParticlesWeight.push_back(newParticleLogWeight);
780 const TPose3D newPose_s = newPose;
781 KLF_loadBinFromParticle<PARTICLE_TYPE,BINTYPE>( p,KLD_options, me->m_particles[k].d, &newPose_s );
789 if ( stateSpaceBins.find(p)==stateSpaceBins.end() )
792 stateSpaceBins.insert( p );
795 int K = stateSpaceBins.size();
804 N = newParticles.size();
807 N < max(Nx,minNumSamples_KLD)) ||
808 (permutationPathsAuxVector.size() && !doResample) );
810 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);
819 this->PF_SLAM_implementation_replaceByNewParticleSet(
821 newParticles,newParticlesWeight,newParticlesDerivedFromIdx );
825 me->normalizeWeights();
834 template <
class PARTICLE_TYPE,
class MY
SELF>
835 template <
class BINTYPE>
837 const bool USE_OPTIMAL_SAMPLING,
838 const bool doResample,
839 const double maxMeanLik,
844 double & out_newParticleLogWeight)
846 MYSELF *me =
static_cast<MYSELF*
>(
this);
850 while ( ( (USE_OPTIMAL_SAMPLING ? m_pfAuxiliaryPFOptimal_estimatedProb[k] : m_pfAuxiliaryPFStandard_estimatedProb[k] )
855 if (PF_options.
verbose) cout <<
"[PF_implementation] Warning: Discarding very unlikely particle" << endl;
864 if ( PF_SLAM_implementation_skipRobotMovement() )
868 out_newPose = oldPose;
873 CPose3D movementDraw;
874 if (!USE_OPTIMAL_SAMPLING)
876 m_movementDrawer.drawSample( movementDraw );
879 poseLogLik = PF_SLAM_computeObservationLikelihoodForParticle(PF_options, k,*sf,out_newPose);
884 double acceptanceProb;
886 const int maxTries=10000;
887 double bestTryByNow_loglik= -std::numeric_limits<double>::max();
888 TPose3D bestTryByNow_pose;
894 m_pfAuxiliaryPFOptimal_maxLikMovementDrawHasBeenUsed[k] =
true;
895 movementDraw = CPose3D( m_pfAuxiliaryPFOptimal_maxLikDrawnMovement[k] );
900 m_movementDrawer.drawSample( movementDraw );
906 poseLogLik = PF_SLAM_computeObservationLikelihoodForParticle(PF_options, k,*sf,out_newPose);
908 if (poseLogLik>bestTryByNow_loglik)
910 bestTryByNow_loglik = poseLogLik;
911 bestTryByNow_pose = out_newPose;
914 double ratioLikLik = std::exp( poseLogLik - m_pfAuxiliaryPFOptimal_maxLikelihood[k] );
915 acceptanceProb = std::min( 1.0, ratioLikLik );
917 if ( ratioLikLik > 1)
919 m_pfAuxiliaryPFOptimal_maxLikelihood[k] = poseLogLik;
924 if (timeout>=maxTries)
926 out_newPose = bestTryByNow_pose;
927 poseLogLik = bestTryByNow_loglik;
928 if (PF_options.
verbose) cout <<
"[PF_implementation] Warning: timeout in rejection sampling." << endl;
934 if (USE_OPTIMAL_SAMPLING)
937 out_newParticleLogWeight = 0;
940 const double weightFact = m_pfAuxiliaryPFOptimal_estimatedProb[k] * PF_options.
powFactor;
941 out_newParticleLogWeight = me->m_particles[k].log_w + weightFact;
946 const double weightFact = (poseLogLik-m_pfAuxiliaryPFStandard_estimatedProb[k]) * PF_options.
powFactor;
948 out_newParticleLogWeight = weightFact;
949 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).
void PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal(const mrpt::obs::CActionCollection *actions, const mrpt::obs::CSensoryFrame *sf, const mrpt::bayes::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...
CActionRobotMovement2DPtr getBestMovementEstimation() const
Returns the best pose increment estimator in the collection, based on the determinant of its pose cha...
BASE_IMPEXP CRandomGenerator randomGenerator
A static instance of a CRandomGenerator class, for use in single-thread applications.
static double PF_SLAM_particlesEvaluator_AuxPFOptimal(const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, const mrpt::bayes::CParticleFilterCapable *obj, size_t index, const void *action, const void *observation)
#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)
void PF_SLAM_implementation_pfAuxiliaryPFStandard(const mrpt::obs::CActionCollection *actions, const mrpt::obs::CSensoryFrame *sf, const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, const TKLDParams &KLD_options)
A generic implementation of the PF method "prediction_and_update_pfAuxiliaryPFStandard" (Auxiliary pa...
#define THROW_EXCEPTION(msg)
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...
Option set for KLD algorithm.
bool PF_SLAM_implementation_gatherActionsCheckBothActObs(const mrpt::obs::CActionCollection *actions, const mrpt::obs::CSensoryFrame *sf)
Auxiliary method called by PF implementations: return true if we have both action & observation...
Declares a class for storing a collection of robot actions.
std::vector< size_t > vector_size_t
A set of common data shared by PF implementations for both SLAM and localization. ...
CONTAINER::Scalar minimum(const CONTAINER &v)
Represents a probabilistic 3D (6D) movement.
Represents a probabilistic 2D movement of the robot mobile base.
void PF_SLAM_aux_perform_one_rejection_sampling_step(const bool USE_OPTIMAL_SAMPLING, const bool doResample, const double maxMeanLik, size_t k, const mrpt::obs::CSensoryFrame *sf, const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, mrpt::poses::CPose3D &out_newPose, double &out_newParticleLogWeight)
unsigned int KLD_minSampleSize
Parameters for the KLD adaptive sample size algorithm (see Dieter Fox's papers), which is used only i...
void PF_SLAM_implementation_pfAuxiliaryPFOptimal(const mrpt::obs::CActionCollection *actions, const mrpt::obs::CSensoryFrame *sf, const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, const TKLDParams &KLD_options)
A generic implementation of the PF method "prediction_and_update_pfAuxiliaryPFOptimal" (optimal sampl...
uint32_t drawUniform32bit()
Generate a uniformly distributed pseudo-random number using the MT19937 algorithm, in the whole range of 32-bit integers.
#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...
static double PF_SLAM_particlesEvaluator_AuxPFStandard(const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, const mrpt::bayes::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.
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
This virtual class defines the interface that any particles based PDF class must implement in order t...
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...
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
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void computeFromOdometry(const mrpt::poses::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...
mrpt::poses::CPosePDFPtr poseChange
The 2D pose change probabilistic estimation.
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...
std::vector< uint32_t > vector_uint
poses::CPose3DPDFGaussian poseChange
The 3D pose change probabilistic estimation.
void PF_SLAM_implementation_pfStandardProposal(const mrpt::obs::CActionCollection *actions, const mrpt::obs::CSensoryFrame *sf, const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, const TKLDParams &KLD_options)
A generic implementation of the PF method "pfStandardProposal" (standard proposal distribution...
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.