template class mrpt::slam::PF_implementation

A set of common data shared by PF implementations for both SLAM and localization.

#include <mrpt/slam/PF_implementations_data.h>

template <
    class PARTICLE_TYPE,
    class MYSELF,
    mrpt::bayes::particle_storage_mode STORAGE
    >
class PF_implementation: public mrpt::system::COutputLogger
{
public:
    //
methods

    virtual mrpt::math::TPose3D getLastPose(const size_t i, bool& is_valid_pose) const = 0;

    virtual void PF_SLAM_implementation_custom_update_particle_with_new_pose(
        PARTICLE_TYPE* particleData,
        const mrpt::math::TPose3D& newPose
        ) const = 0;

    virtual bool PF_SLAM_implementation_doWeHaveValidObservations(
        ] const typename mrpt::bayes::CParticleFilterData<PARTICLE_TYPE, STORAGE>::CParticleList& particles,
        ] const mrpt::obs::CSensoryFrame* sf
        ) const;

    virtual double PF_SLAM_computeObservationLikelihoodForParticle(
        const mrpt::bayes::CParticleFilter::TParticleFilterOptions& PF_options,
        const size_t particleIndexForMap,
        const mrpt::obs::CSensoryFrame& observation,
        const mrpt::poses::CPose3D& x
        ) const = 0;

    template <class BINTYPE>
    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
        );
};

// direct descendants

class CMonteCarloLocalization2D;
class CMonteCarloLocalization3D;
class CMultiMetricMapPDF;

Inherited Members

public:
    // structs

    struct TMsg;

Methods

virtual mrpt::math::TPose3D getLastPose(const size_t i, bool& is_valid_pose) const = 0

Return the last robot pose in the i’th particle; is_valid_pose will be false if there is no such last pose.

Parameters:

std::exception

on out-of-range particle index

virtual double PF_SLAM_computeObservationLikelihoodForParticle(
    const mrpt::bayes::CParticleFilter::TParticleFilterOptions& PF_options,
    const size_t particleIndexForMap,
    const mrpt::obs::CSensoryFrame& observation,
    const mrpt::poses::CPose3D& x
    ) const = 0

Evaluate the observation likelihood for one particle at a given location.