Go to the documentation of this file.
20 #define INVALID_LIKELIHOOD_VALUE \
21 (-1e300) // An invalid log-likelihood value, used to signal non-initialized
62 const void* observation);
73 const void* observation)
124 const void* action =
nullptr,
const void* observation =
nullptr)
const;
150 virtual double getW(
size_t i)
const = 0;
154 virtual void setW(
size_t i,
double w) = 0;
188 virtual double ESS()
const = 0;
204 size_t out_particle_count = 0);
219 const std::vector<double>& in_logWeights,
220 std::vector<size_t>& out_indexes,
size_t out_particle_count = 0);
227 const std::vector<double>& in_logWeights,
228 std::vector<double>& out_linWeights);
static void log2linearWeights(const std::vector< double > &in_logWeights, std::vector< double > &out_linWeights)
A static method to compute the linear, normalized (the sum the unity) weights from log-weights.
size_t alreadyDrawnNextOne
virtual size_t particlesCount() const =0
Get the m_particles count.
std::vector< uint32_t > alreadyDrawnIndexes
double(*)(const bayes::CParticleFilter::TParticleFilterOptions &PF_options, const CParticleFilterCapable *obj, size_t index, const void *action, const void *observation) TParticleProbabilityEvaluator
A callback function type for evaluating the probability of m_particles of being selected,...
TFastDrawAuxVars m_fastDrawAuxiliary
Auxiliary vectors, see CParticleFilterCapable::prepareFastDrawSample for more information.
This class acts as a common interface to the different interfaces (see CParticleFilter::TParticleFilt...
virtual void prediction_and_update_pfOptimalProposal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
Performs the particle filter prediction/update stages for the algorithm "pfOptimalProposal" (if not i...
GLsizei GLsizei GLuint * obj
TParticleResamplingAlgorithm
Defines the different resampling algorithms.
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.
size_t fastDrawSample(const bayes::CParticleFilter::TParticleFilterOptions &PF_options) const
Draws a random sample from the particle filter, in such a way that each particle has a probability pr...
Declares a class for storing a collection of robot actions.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
GLubyte GLubyte GLubyte GLubyte w
virtual void prediction_and_update_pfAuxiliaryPFOptimal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
Performs the particle filter prediction/update stages for the algorithm "pfAuxiliaryPFOptimal" (if no...
static const unsigned PARTICLE_FILTER_CAPABLE_FAST_DRAW_BINS
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
Auxiliary vectors, see CParticleFilterCapable::prepareFastDrawSample for more information.
This virtual class defines the interface that any particles based PDF class must implement in order t...
virtual void prediction_and_update_pfAuxiliaryPFStandard(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
Performs the particle filter prediction/update stages for the algorithm "pfAuxiliaryPFStandard" (if n...
virtual ~CParticleFilterCapable()
Virtual destructor.
static void computeResampling(CParticleFilter::TParticleResamplingAlgorithm method, const std::vector< double > &in_logWeights, std::vector< size_t > &out_indexes, size_t out_particle_count=0)
A static method to perform the computation of the samples resulting from resampling a given set of pa...
void performResampling(const bayes::CParticleFilter::TParticleFilterOptions &PF_options, size_t out_particle_count=0)
Performs a resample of the m_particles, using the method selected in the constructor.
void prepareFastDrawSample(const bayes::CParticleFilter::TParticleFilterOptions &PF_options, TParticleProbabilityEvaluator partEvaluator=defaultEvaluator, const void *action=nullptr, const void *observation=nullptr) const
Prepares data structures for calling fastDrawSample method next.
static double defaultEvaluator(const bayes::CParticleFilter::TParticleFilterOptions &PF_options, const CParticleFilterCapable *obj, size_t index, const void *action, const void *observation)
The default evaluator function, which simply returns the particle weight.
std::vector< double > CDF
virtual double normalizeWeights(double *out_max_log_w=nullptr)=0
Normalize the (logarithmic) weights, such as the maximum weight is zero.
virtual void prediction_and_update_pfStandardProposal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
Performs the particle filter prediction/update stages for the algorithm "pfStandardProposal" (if not ...
virtual double ESS() const =0
Returns the normalized ESS (Estimated Sample Size), in the range [0,1].
virtual void setW(size_t i, double w)=0
Modifies i'th particle (logarithm) weight, where first one is index 0.
virtual double getW(size_t i) const =0
Access to i'th particle (logarithm) weight, where first one is index 0.
void prediction_and_update(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
Performs the prediction stage of the Particle Filter.
std::vector< uint32_t > CDF_indexes
std::vector< double > PDF
virtual void performSubstitution(const std::vector< size_t > &indx)=0
Performs the substitution for internal use of resample in particle filter algorithm,...
The configuration of a particle filter.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |