class mrpt::poses::CPosePDFParticles

Declares a class that represents a Probability Density Function (PDF) over a 2D pose (x,y,phi), using a set of weighted samples.

This class is also the base for the implementation of Monte-Carlo Localization (MCL), in mrpt::slam::CMonteCarloLocalization2D.

See the application “app/pf-localization” for an example of usage.

See also:

CPose2D, CPosePDF, CPoseGaussianPDF, CParticleFilterCapable

#include <mrpt/poses/CPosePDFParticles.h>

class CPosePDFParticles:
    public mrpt::poses::CPosePDF,
    public mrpt::bayes::CParticleFilterData,
    public mrpt::bayes::CParticleFilterDataImpl
{
public:
    //
fields

    static const particle_storage_mode PARTICLE_STORAGE;

    // construction

    CPosePDFParticles(size_t M = 1);

    //
methods

    void getMean(CPose2D& mean_pose) const;
};

// direct descendants

class CMonteCarloLocalization2D;

Inherited Members

public:
    // typedefs

    typedef CProbabilityDensityFunction<TDATA, STATE_LEN> self_t;

    // structs

    struct TFastDrawAuxVars;

    //
methods

    virtual void copyFrom(const CPosePDF& o) = 0;
    virtual void bayesianFusion(const CPosePDF& p1, const CPosePDF& p2, const double minMahalanobisDistToDrop = 0) = 0;
    virtual void inverse(CPosePDF& o) const = 0;
    virtual void changeCoordinatesReference(const CPose3D& newReferenceBase) = 0;
    virtual double getW(size_t i) const = 0;
    virtual void setW(size_t i, double w) = 0;
    virtual size_t particlesCount() const = 0;
    virtual void performSubstitution(const std::vector<size_t>& indx) = 0;
    virtual double normalizeWeights(double* out_max_log_w = nullptr) = 0;
    virtual double ESS() const = 0;

Construction

CPosePDFParticles(size_t M = 1)

Constructor.

Parameters:

M

The number of m_particles.