9#ifndef CPose3DQuatPDFGaussianInf_H
10#define CPose3DQuatPDFGaussianInf_H
21 class CPosePDFGaussian;
22 class CPose3DPDFGaussian;
#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).
A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,...
Declares a class that represents a Probability Density function (PDF) of a 3D pose using a quaternion...
void copyFrom(const CPose3DQuatPDF &o) MRPT_OVERRIDE
Copy operator, translating if necesary (for example, between particles and gaussian representations)
CPose3DQuat & getPoseMean()
CPose3DQuatPDFGaussianInf(const CPose3DQuat &init_Mean)
Constructor from a default mean value, information matrix equals to zero.
mrpt::math::CMatrixDouble77 cov_inv
The 7x7 information matrix (the inverse of the covariance)
CPose3DQuatPDFGaussianInf(const CPose3DQuat &init_Mean, const mrpt::math::CMatrixDouble77 &init_CovInv)
Constructor with mean and inverse covariance (information matrix).
double evaluatePDF(const CPose3DQuat &x) const
Evaluates the PDF at a given point.
CPose3DQuatPDFGaussianInf(mrpt::math::TConstructorFlags_Quaternions constructor_dummy_param)
Constructor which left all the member uninitialized, for using when speed is critical - as argument,...
double evaluateNormalizedPDF(const CPose3DQuat &x) const
Evaluates the ratio PDF(x) / PDF(MEAN), that is, the normalized PDF in the range [0,...
void getInformationMatrix(mrpt::math::CMatrixDouble77 &inf) const MRPT_OVERRIDE
Returns the information (inverse covariance) matrix (a STATE_LEN x STATE_LEN matrix)
const CPose3DQuat & getPoseMean() const
void drawSingleSample(CPose3DQuat &outPart) const MRPT_OVERRIDE
Draws a single sample from the distribution.
void inverse(CPose3DQuatPDF &o) const MRPT_OVERRIDE
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
void getMean(CPose3DQuat &mean_pose) const MRPT_OVERRIDE
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF)
void getCovarianceAndMean(mrpt::math::CMatrixDouble77 &cov, CPose3DQuat &mean_point) const MRPT_OVERRIDE
Returns an estimate of the pose covariance matrix (7x7 cov matrix) and the mean, both at once.
void saveToTextFile(const std::string &file) const MRPT_OVERRIDE
Save the PDF to a text file, containing the 3D pose in the first line (x y z qr qx qy qz),...
CPose3DQuatPDFGaussianInf()
Default constructor - set all values to zero.
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 1x7 vectors,...
void changeCoordinatesReference(const CPose3D &newReferenceBase) MRPT_OVERRIDE
this = p (+) this.
CPose3DQuat mean
The mean value.
void changeCoordinatesReference(const CPose3DQuat &newReferenceBase)
this = p (+) this.
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually),...
EIGEN_STRONG_INLINE double mean() const
Computes the mean of the entire matrix.
std::vector< T1 > & operator+=(std::vector< T1 > &a, const std::vector< T2 > &b)
a+=b (element-wise sum)
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
TConstructorFlags_Quaternions
@ UNINITIALIZED_QUATERNION
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,...
Eigen::Matrix< dataType, 4, 4 > inverse(Eigen::Matrix< dataType, 4, 4 > &pose)
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...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.