Go to the documentation of this file.
9 #ifndef CPosePDFGaussianInf_H
10 #define CPosePDFGaussianInf_H
151 std::vector<mrpt::math::CVectorDouble>& outSamples)
const override;
165 const double minMahalanobisDistToDrop = 0)
override;
199 bool operator==(
const CPosePDFGaussianInf& p1,
const CPosePDFGaussianInf& p2);
203 const CPosePDFGaussianInf&
a,
const CPosePDFGaussianInf&
b);
207 const CPosePDFGaussianInf&
a,
const CPosePDFGaussianInf&
b);
214 std::ostream&
operator<<(std::ostream& out,
const CPosePDFGaussianInf&
obj);
CPosePDFGaussianInf(const CPose3DPDF &o)
Copy constructor, including transformations between other PDFs.
double evaluateNormalizedPDF(const CPose2D &x) const
Evaluates the ratio PDF(x) / PDF(MEAN), that is, the normalized PDF in the range [0,...
double mahalanobisDistanceTo(const CPosePDFGaussianInf &theOther)
Computes the Mahalanobis distance between the centers of two Gaussians.
void drawManySamples(size_t N, std::vector< mrpt::math::CVectorDouble > &outSamples) const override
Draws a number of samples from the distribution, and saves as a list of 1x3 vectors,...
void copyFrom(const CPosePDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations)
void operator+=(const CPose2D &Ap)
Makes: thisPDF = thisPDF + Ap, where "+" is pose composition (both the mean, and the covariance matri...
void assureSymmetry()
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor ...
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually).
mrpt::math::TPoint2D operator+(const CPose2D &pose, const mrpt::math::TPoint2D &pnt)
Compose a 2D point from a new coordinate base given by a 2D pose.
GLsizei GLsizei GLuint * obj
CPose2D mean
The mean value.
void rotateCov(const double ang)
Rotate the covariance matrix by replacing it by , where .
CMatrixFixedNumeric< double, 3, 3 > CMatrixDouble33
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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.
void bayesianFusion(const CPosePDF &p1, const CPosePDF &p2, const double minMahalanobisDistToDrop=0) override
Bayesian fusion of two points gauss.
CPose2D operator-(const CPose2D &p)
Unary - operator: return the inverse pose "-p" (Note that is NOT the same than a pose with negative x...
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
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 getMean(CPose2D &mean_pose) const override
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
void inverse(CPosePDF &o) const override
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
bool saveToTextFile(const std::string &file) const override
Save PDF's particles to a text file, containing the 2D pose in the first line, then the covariance ma...
CPosePDFGaussianInf()
Default constructor (mean=all zeros, inverse covariance=all zeros -> so be careful!...
mrpt::math::CMatrixDouble33 cov_inv
The inverse of the 3x3 covariance matrix (the "information" matrix)
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).
double evaluatePDF(const CPose2D &x) const
Evaluates the PDF at a given point.
A Probability Density function (PDF) of a 2D pose as a Gaussian with a mean and the inverse of the c...
virtual void getInformationMatrix(mrpt::math::CMatrixDouble33 &inf) const override
Returns the information (inverse covariance) matrix (a STATE_LEN x STATE_LEN matrix)
Declares a class that represents a probability density function (pdf) of a 2D pose (x,...
void inverseComposition(const CPosePDFGaussianInf &x, const CPosePDFGaussianInf &ref)
Set , computing the mean using the "-" operator and the covariances through the corresponding Jacobi...
bool operator==(const CPoint< DERIVEDCLASS > &p1, const CPoint< DERIVEDCLASS > &p2)
void drawSingleSample(CPose2D &outPart) const override
Draws a single sample from the distribution.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
CPosePDFGaussianInf(const CPosePDF &o)
Copy constructor, including transformations between other PDFs.
const CPose2D & getPoseMean() const
void operator-=(const CPosePDFGaussianInf &ref)
Makes: thisPDF = thisPDF - Ap, where "-" is pose inverse composition (both the mean,...
GLsizei const GLchar ** string
std::ostream & operator<<(std::ostream &o, const CPoint< DERIVEDCLASS > &p)
Dumps a point as a string [x,y] or [x,y,z]
bool isInfType() const override
GLubyte GLubyte GLubyte a
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 | |