33 mrpt::math::TPose2D, mrpt::bayes::particle_storage_mode::VALUE>,
36 mrpt::bayes::CParticleFilterData<
38 mrpt::bayes::particle_storage_mode::VALUE>::CParticleList>
81 const double x_min,
const double x_max,
const double y_min,
82 const double y_max,
const double phi_min = -
M_PI,
102 const std::vector<mrpt::math::TPose2D>& list_poses,
103 const size_t num_particles_per_pose,
const double spread_x,
104 const double spread_y,
const double spread_phi_rad);
155 const double minMahalanobisDistToDrop = 0)
override;
162 const double x,
const double y,
const double phi,
const double stdXY,
163 const double stdPhi)
const;
170 const char* fileName,
const double x_min,
const double x_max,
171 const double y_min,
const double y_max,
const double phi,
172 const double stepSizeXY,
const double stdXY,
const double stdPhi)
const;
bool saveToTextFile(const std::string &file) const override
Save PDF's m_particles to a text file.
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 2D area [x_min,x_max]x[y_min,y_max] (in meters) and for orientations [phi_min, phi_max] (in radians).
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...
CParticleList m_particles
The array of particles.
CPosePDFParticles(size_t M=1)
Constructor.
void inverse(CPosePDF &o) const override
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
void operator+=(const mrpt::math::TPose2D &Ap)
Appends (pose-composition) a given pose "p" to each particle.
void clear()
Free all the memory associated to m_particles, and set the number of parts = 0.
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...
size_t particlesCount() const override
void drawSingleSample(CPose2D &outPart) const override
Draws a single sample from the distribution (WARNING: weights are assumed to be normalized!) ...
void getMean(CPose2D &mean_pose) const override
void copyFrom(const CPosePDF &o) override
Copy operator, translating if necesary (for example, between m_particles and gaussian representations...
mrpt::math::TPose2D getMostLikelyParticle() const
Returns the particle with the highest weight.
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 ...
Declares a class that represents a Probability Density Function (PDF) over a 2D pose (x...
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. ...
This template class declares the array of particles and its internal data, managing some memory-relat...
Declares a class that represents a probability density function (pdf) of a 2D pose (x...
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
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 size() const
Get the m_particles count (equivalent to "particlesCount")
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).
mrpt::math::TPose2D getParticlePose(size_t i) const
Returns the pose of the i'th particle.
void append(CPosePDFParticles &o)
Appends (add to the list) a set of m_particles to the existing ones, and then normalize weights...
void bayesianFusion(const CPosePDF &p1, const CPosePDF &p2, const double minMahalanobisDistToDrop=0) override
Bayesian fusion.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
A curiously recurring template pattern (CRTP) approach to providing the basic functionality of any CP...