9 #ifndef CPosePDFParticles_H 10 #define CPosePDFParticles_H 49 CPosePDFParticles(
size_t M = 1 );
53 inline CPosePDFParticles( const CPosePDFParticles& obj )
60 virtual ~CPosePDFParticles();
64 void copyFrom(
const CPosePDF &o);
71 void resetDeterministic(
72 const CPose2D &location,
73 size_t particlesCount = 0);
84 const double & phi_min = -
M_PI,
85 const double & phi_max =
M_PI,
86 const int &particlesCount = -1);
91 void getMean(CPose2D &mean_pose)
const;
100 CPose2D getParticlePose(
size_t i)
const;
108 inline size_t size()
const {
return m_particles.size(); }
113 void changeCoordinatesReference(
const CPose3D &newReferenceBase );
117 void drawSingleSample(CPose2D &outPart )
const;
125 void append( CPosePDFParticles &o );
129 void inverse(CPosePDF &o)
const;
133 CPose2D getMostLikelyParticle()
const;
137 void bayesianFusion(
const CPosePDF &p1,
const CPosePDF &p2,
const double & minMahalanobisDistToDrop = 0 );
142 double evaluatePDF_parzen(
146 const double & stdXY,
147 const double & stdPhi )
const;
152 void saveParzenPDFToTextFile(
153 const char *fileName,
154 const double & x_min,
155 const double & x_max,
156 const double & y_min,
157 const double & y_max,
159 const double & stepSizeXY,
160 const double & stdXY,
161 const double & stdPhi )
const;
void saveToTextFile(const std::string &file, mrpt::math::TMatrixTextFileFormat fileFormat=mrpt::math::MATRIX_FORMAT_ENG, bool appendMRPTHeader=false, const std::string &userHeader=std::string()) const
Save matrix to a text file, compatible with MATLAB text format (see also the methods of matrix classe...
A numeric matrix of compile-time fixed size.
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...
std::vector< T1 > & operator+=(std::vector< T1 > &a, const std::vector< T2 > &b)
a+=b (element-wise sum)
Eigen::Matrix< dataType, 4, 4 > inverse(Eigen::Matrix< dataType, 4, 4 > &pose)
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE(class_name, base_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
Declares a class that represents a Probability Density Function (PDF) over a 2D pose (x...
Declares a class that represents a probability density function (pdf) of a 2D pose (x...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
std::deque< CParticleData > CParticleList
Use this type to refer to the list of particles m_particles.
A class used to store a 2D pose.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)
size_t size() const
Get the m_particles count (equivalent to "particlesCount")