9 #ifndef CPosePDFGaussian_H 10 #define CPosePDFGaussian_H 18 class CPoint2DPDFGaussian;
80 CPose2D& mean_point)
const override 141 std::vector<mrpt::math::CVectorDouble>& outSamples)
const override;
155 const double minMahalanobisDistToDrop = 0)
override;
203 const CPosePDFGaussian&
a,
const CPosePDFGaussian&
b);
208 const CPosePDFGaussian&
a,
const CPosePDFGaussian&
b);
211 std::ostream&
operator<<(std::ostream& out,
const CPosePDFGaussian&
obj);
218 bool operator==(
const CPosePDFGaussian& p1,
const CPosePDFGaussian& p2);
void copyFrom(const CPosePDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations) ...
CPosePDFGaussian(const CPosePDF &o)
Copy constructor, including transformations between other PDFs.
CPose2D mean
The mean value.
A gaussian distribution for 2D points.
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.
void bayesianFusion(const CPosePDF &p1, const CPosePDF &p2, const double minMahalanobisDistToDrop=0) override
Bayesian fusion of two points gauss.
double mahalanobisDistanceTo(const CPosePDFGaussian &theOther)
Computes the Mahalanobis distance between the centers of two Gaussians.
void composePoint(const mrpt::math::TPoint2D &l, CPoint2DPDFGaussian &g) const
Returns the PDF of the 2D point with "q"=this pose and "l" a point without uncertainty.
GLsizei GLsizei GLuint * obj
const CPose2D & getPoseMean() const
mrpt::math::CMatrixDouble33 cov
The 3x3 covariance matrix.
void getCovarianceAndMean(mrpt::math::CMatrixDouble33 &out_cov, CPose2D &mean_point) const override
Returns an estimate of the pose covariance matrix (3x3 cov matrix) and the mean, both at once...
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
Declares a class that represents a Probability Density function (PDF) of a 2D pose ...
CPosePDFGaussian()
Default constructor.
CPosePDFGaussian(const CPose3DPDF &o)
Copy constructor, including transformations between other PDFs.
CPose2D operator-(const CPose2D &p)
Unary - operator: return the inverse pose "-p" (Note that is NOT the same than a pose with negative x...
double evaluatePDF(const CPose2D &x) const
Evaluates the PDF at a given point.
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, where each row contains a (x,y,phi) datum.
double evaluateNormalizedPDF(const CPose2D &x) const
Evaluates the ratio PDF(x) / PDF(MEAN), that is, the normalized PDF in the range [0,1].
GLsizei const GLchar ** string
void inverseComposition(const CPosePDFGaussian &x, const CPosePDFGaussian &ref)
Set , computing the mean using the "-" operator and the covariances through the corresponding Jacobi...
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 operator-=(const CPosePDFGaussian &ref)
Makes: thisPDF = thisPDF - Ap, where "-" is pose inverse composition (both the mean, and the covariance matrix are updated)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void assureMinCovariance(const double &minStdXY, const double &minStdPhi)
Substitutes the diagonal elements if (square) they are below some given minimum values (Use this befo...
bool operator==(const CPoint< DERIVEDCLASS > &p1, const CPoint< DERIVEDCLASS > &p2)
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 assureSymmetry()
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor ...
void getMean(CPose2D &mean_pose) const override
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
void operator+=(const CPose2D &Ap)
Makes: thisPDF = thisPDF + Ap, where "+" is pose composition (both the mean, and the covariance matri...
void rotateCov(const double ang)
Rotate the covariance matrix by replacing it by , where .
GLubyte GLubyte GLubyte a
void drawSingleSample(CPose2D &outPart) const override
Draws a single sample from the distribution.
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually)...
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...
void inverse(CPosePDF &o) const override
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
std::ostream & operator<<(std::ostream &o, const CPoint< DERIVEDCLASS > &p)
Dumps a point as a string [x,y] or [x,y,z].