9#ifndef CPose3DPDFGaussian_H
10#define CPose3DPDFGaussian_H
94 mean_point = this->
mean;
217 namespace global_settings
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE(class_name, base_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
A numeric matrix of compile-time fixed size.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Declares a class that represents a Probability Density function (PDF) of a 3D pose .
void bayesianFusion(const CPose3DPDF &p1, const CPose3DPDF &p2) MRPT_OVERRIDE
Bayesian fusion of two points gauss.
CPose3DPDFGaussian(const CPose3D &init_Mean, const mrpt::math::CMatrixDouble66 &init_Cov)
Constructor
void saveToTextFile(const std::string &file) const MRPT_OVERRIDE
Save the PDF to a text file, containing the 3D pose in the first line, then the covariance matrix in ...
void getCovSubmatrix2D(mrpt::math::CMatrixDouble &out_cov) const
Returns a 3x3 matrix with submatrix of the covariance for the variables (x,y,yaw) only.
CPose3DPDFGaussian(TConstructorFlags_Poses constructor_dummy_param)
Uninitialized constructor: leave all fields uninitialized - Call with UNINITIALIZED_POSE as argument.
void getCovarianceAndMean(mrpt::math::CMatrixDouble66 &cov, CPose3D &mean_point) const MRPT_OVERRIDE
Returns an estimate of the pose covariance matrix (6x6 cov matrix) and the mean, both at once.
const CPose3D & getPoseMean() const
void copyFrom(const CPose3DPDF &o) MRPT_OVERRIDE
Copy operator, translating if necesary (for example, between particles and gaussian representations)
double mahalanobisDistanceTo(const CPose3DPDFGaussian &theOther)
Computes the Mahalanobis distance between the centers of two Gaussians.
double evaluatePDF(const CPose3D &x) const
Evaluates the PDF at a given point.
CPose3DPDFGaussian()
Default constructor.
void assureSymmetry()
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor ...
void getMean(CPose3D &mean_pose) const MRPT_OVERRIDE
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
std::string asString() const
CPose3DPDFGaussian(const CPosePDFGaussian &o)
Constructor from a Gaussian 2D pose PDF (sets to 0 the missing variables z,pitch, and roll).
void changeCoordinatesReference(const CPose3D &newReferenceBase) MRPT_OVERRIDE
this = p (+) this.
void inverse(CPose3DPDF &o) const MRPT_OVERRIDE
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
CPose3DPDFGaussian(const CPose3DQuatPDFGaussian &o)
Constructor from a 6D pose PDF described as a Quaternion.
CPose3D mean
The mean value.
void copyFrom(const CPosePDF &o)
Copy operator, translating if necesary (for example, between particles and gaussian representations)
void copyFrom(const CPose3DQuatPDFGaussian &o)
Copy from a 6D pose PDF described as a Quaternion.
void drawManySamples(size_t N, std::vector< mrpt::math::CVectorDouble > &outSamples) const MRPT_OVERRIDE
Draws a number of samples from the distribution, and saves as a list of 1x6 vectors,...
CPose3DPDFGaussian(const CPose3D &init_Mean)
Constructor.
void drawSingleSample(CPose3D &outPart) const MRPT_OVERRIDE
Draws a single sample from the distribution.
mrpt::math::CMatrixDouble66 cov
The 6x6 covariance matrix.
double evaluateNormalizedPDF(const CPose3D &x) const
Evaluates the ratio PDF(x) / PDF(MEAN), that is, the normalized PDF in the range [0,...
void asString(std::string &s) const
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually).
Declares a class that represents a Probability Density function (PDF) of a 3D pose using a quaternion...
Declares a class that represents a Probability Density function (PDF) of a 2D pose .
Declares a class that represents a probability density function (pdf) of a 2D pose (x,...
EIGEN_STRONG_INLINE double mean() const
Computes the mean of the entire matrix.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
BASE_IMPEXP bool USE_SUT_QUAT2EULER_CONVERSION
If set to true (false), a Scaled Unscented Transform is used instead of a linear approximation with J...
std::ostream & operator<<(std::ostream &o, const CPoint< DERIVEDCLASS > &p)
Dumps a point as a string [x,y] or [x,y,z]
CPose2D BASE_IMPEXP operator-(const CPose2D &p)
Unary - operator: return the inverse pose "-p" (Note that is NOT the same than a pose with negative x...
class BASE_IMPEXP CPosePDF
class BASE_IMPEXP CPose3DQuatPDFGaussian
class BASE_IMPEXP CPosePDFGaussian
bool operator==(const CPoint< DERIVEDCLASS > &p1, const CPoint< DERIVEDCLASS > &p2)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.