28 CPointPDFParticles, mrpt::bayes::CParticleFilterData<
29 mrpt::math::TPoint3Df>::CParticleList>
43 size_t numberParticles,
86 const double minMahalanobisDistToDrop = 0)
override;
void drawSingleSample(CPoint3D &outSample) const override
Draw a sample from the pdf.
size_t size() const
Returns the number of particles.
CParticleList m_particles
The array of particles.
bool saveToTextFile(const std::string &file) const override
Save PDF's particles to a text file, where each line is: X Y Z LOG_W.
void bayesianFusion(const CPointPDF &p1, const CPointPDF &p2, const double minMahalanobisDistToDrop=0) override
Bayesian fusion of two point distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!)
void getMean(CPoint3D &mean_point) const override
A class used to store a 3D point.
This template class declares the array of particles and its internal data, managing some memory-relat...
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
std::tuple< cov_mat_t, type_value > getCovarianceAndMean() const override
Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void copyFrom(const CPointPDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations) ...
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
void setSize(size_t numberParticles, const mrpt::math::TPoint3Df &defaultValue=mrpt::math::TPoint3Df{0, 0, 0})
Erase all the previous particles and change the number of particles, with a given initial value...
CPointPDFParticles(size_t numParticles=1)
Default constructor.
void clear()
Clear all the particles (free memory)
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Declares a class that represents a Probability Distribution function (PDF) of a 3D point (x...
double computeKurtosis()
Compute the kurtosis of the distribution.
A probability distribution of a 2D/3D point, represented as a set of random samples (particles)...
A curiously recurring template pattern (CRTP) approach to providing the basic functionality of any CP...