Go to the documentation of this file.
9 #ifndef CPosePDFParticles_H
10 #define CPosePDFParticles_H
36 mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>,
39 mrpt::bayes::CParticleFilterData<
41 mrpt::bayes::particle_storage_mode::VALUE>::CParticleList>
77 const double x_min,
const double x_max,
const double y_min,
78 const double y_max,
const double phi_min = -
M_PI,
98 const std::vector<mrpt::math::TPose2D>& list_poses,
99 const size_t num_particles_per_pose,
const double spread_x,
100 const double spread_y,
const double spread_phi_rad);
160 const double minMahalanobisDistToDrop = 0)
override;
167 const double x,
const double y,
const double phi,
168 const double stdXY,
const double stdPhi)
const;
175 const char* fileName,
const double x_min,
const double x_max,
176 const double y_min,
const double y_max,
const double phi,
177 const double stepSizeXY,
const double stdXY,
const double stdPhi)
const;
void resetUniform(const double x_min, const double x_max, const double y_min, const double y_max, const double phi_min=-M_PI, const double phi_max=M_PI, const int particlesCount=-1)
Reset the PDF to an uniformly distributed one, inside of the defined cube.
void bayesianFusion(const CPosePDF &p1, const CPosePDF &p2, const double minMahalanobisDistToDrop=0) override
Bayesian fusion.
mrpt::math::TPose2D getParticlePose(size_t i) const
Returns the pose of the i'th particle.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Eigen::Matrix< typename MATRIX::Scalar, MATRIX::ColsAtCompileTime, MATRIX::ColsAtCompileTime > cov(const MATRIX &v)
Computes the covariance matrix from a list of samples in an NxM matrix, where each row is a sample,...
void saveParzenPDFToTextFile(const char *fileName, const double x_min, const double x_max, const double y_min, const double y_max, const double phi, const double stepSizeXY, const double stdXY, const double stdPhi) const
Save a text file (compatible with matlab) representing the 2D evaluation of the PDF as reconstructed ...
void drawSingleSample(CPose2D &outPart) const override
Draws a single sample from the distribution (WARNING: weights are assumed to be normalized!...
void resetAroundSetOfPoses(const std::vector< mrpt::math::TPose2D > &list_poses, const size_t num_particles_per_pose, const double spread_x, const double spread_y, const double spread_phi_rad)
Reset the PDF to a multimodal distribution over a set of "spots" (x,y,phi) The total number of partic...
size_t particlesCount() const override
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void resetDeterministic(const mrpt::math::TPose2D &location, size_t particlesCount=0)
Reset the PDF to a single point: All m_particles will be set exactly to the supplied pose.
This template class declares the array of particles and its internal data, managing some memory-relat...
mrpt::math::TPose2D getMostLikelyParticle() const
Returns the particle with the highest weight.
void operator+=(const mrpt::math::TPose2D &Ap)
Appends (pose-composition) a given pose "p" to each particle.
void copyFrom(const CPosePDF &o) override
Copy operator, translating if necesary (for example, between m_particles and gaussian representations...
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
Declares a class that represents a Probability Density Function (PDF) over a 2D pose (x,...
void clear()
Free all the memory associated to m_particles, and set the number of parts = 0.
double evaluatePDF_parzen(const double x, const double y, const double phi, const double stdXY, const double stdPhi) const
Evaluates the PDF at a given arbitrary point as reconstructed by a Parzen window.
Declares a class that represents a probability density function (pdf) of a 2D pose (x,...
size_t size() const
Get the m_particles count (equivalent to "particlesCount")
CParticleList m_particles
The array of particles.
CPosePDFParticles(size_t M=1)
Constructor.
void getMean(CPose2D &mean_pose) const override
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
bool saveToTextFile(const std::string &file) const override
Save PDF's m_particles to a text file.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void append(CPosePDFParticles &o)
Appends (add to the list) a set of m_particles to the existing ones, and then normalize weights.
void getCovarianceAndMean(mrpt::math::CMatrixDouble33 &cov, CPose2D &mean_point) const override
Returns an estimate of the pose covariance matrix (3x3 cov matrix) and the mean, both at once.
GLsizei const GLchar ** string
A curiously recurring template pattern (CRTP) approach to providing the basic functionality of any CP...
void inverse(CPosePDF &o) const override
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
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 | |