Go to the documentation of this file.
10 #define CPosePDFGrid_H
37 double xMin = -1.0f,
double xMax = 1.0f,
double yMin = -1.0f,
38 double yMax = 1.0f,
double resolutionXY = 0.5f,
40 double phiMax =
M_PI);
75 const double minMahalanobisDistToDrop = 0)
override;
85 std::vector<mrpt::math::CVectorDouble>& outSamples)
const override;
void normalize()
Normalizes the PDF, such as all cells sum the unity.
void drawSingleSample(CPose2D &outPart) const override
Draws a single sample from the distribution (WARNING: weights are assumed to be normalized!...
virtual ~CPosePDFGrid()
Destructor.
Declares a class that represents a Probability Distribution function (PDF) of a 2D pose (x,...
void copyFrom(const CPosePDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations)
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 getMean(CPose2D &mean_pose) const override
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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 inverse(CPosePDF &o) const override
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
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 uniformDistribution()
Assigns the same value to all the cells in the grid, so the sum 1.
This is a template class for storing a 3D (2D+heading) grid containing any kind of data.
Declares a class that represents a probability density function (pdf) of a 2D pose (x,...
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
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,...
GLsizei const GLchar ** string
void bayesianFusion(const CPosePDF &p1, const CPosePDF &p2, const double minMahalanobisDistToDrop=0) override
Bayesian fusion of 2 densities (In the grid representation this becomes a pointwise multiplication)
CPosePDFGrid(double xMin=-1.0f, double xMax=1.0f, double yMin=-1.0f, double yMax=1.0f, double resolutionXY=0.5f, double resolutionPhi=mrpt::DEG2RAD(180.0), double phiMin=-M_PI, double phiMax=M_PI)
Constructor: Initializes a, uniform distribution over the whole given range.
bool saveToTextFile(const std::string &dataFile) const override
Save the contents of the 3D grid in one file, as a vertical concatenation of rectangular matrix for t...
double DEG2RAD(const double x)
Degrees to radians.
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 | |