MRPT logo

mrpt::poses::CPosePDF Class Reference

Declares a class that represents a probability density function (pdf) of a 2D pose (x,y,phi). More...

#include <mrpt/poses/CPosePDF.h>

Inheritance diagram for mrpt::poses::CPosePDF:

mrpt::utils::CSerializable mrpt::poses::CPosePDFGaussian mrpt::poses::CPosePDFGrid mrpt::poses::CPosePDFParticles mrpt::poses::CPosePDFSOG

List of all members.

Public Member Functions

double getEstimatedCovarianceEntropy ()
 Returns the entropy of the estimated pose covariance matrix.
virtual CPose2D getEstimatedPose () const =0
 Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
virtual math::CMatrixD getEstimatedCovariance () const =0
 Returns an estimate of the pose covariance matrix (3x3 cov.matrix for x,y,phi variables).
virtual void copyFrom (const CPosePDF &o)=0
 Copy operator, translating if necesary (for example, between particles and gaussian representations).
virtual void saveToTextFile (const std::string &file) const =0
 Save PDF's particles to a text file.
virtual void changeCoordinatesReference (const CPose2D &newReferenceBase)=0
 This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf.
virtual void drawSingleSample (CPose2D &outPart) const =0
 Draws a single sample from the distribution.
virtual void drawManySamples (size_t N, std::vector< vector_double > &outSamples) const =0
 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.
virtual void bayesianFusion (CPosePDF &p1, CPosePDF &p2, const double &minMahalanobisDistToDrop=0)=0
 Bayesian fusion of two pose distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!).
virtual void inverse (CPosePDF &o) const =0
 Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.


Detailed Description

Declares a class that represents a probability density function (pdf) of a 2D pose (x,y,phi).

This class is just the base class for unifying many diferent ways this pdf can be implemented.

For convenience, a pose composition is also defined for any pdf derived class, changeCoordinatesReference, in the form of a method rather than an operator.

See also the tutorial on probabilistic spatial representations in the MRPT.

See also:
CPose2D, CPose3DPDF, CPoseRandomSampler

Definition at line 52 of file CPosePDF.h.


Member Function Documentation

virtual void mrpt::poses::CPosePDF::bayesianFusion ( CPosePDF p1,
CPosePDF p2,
const double &  minMahalanobisDistToDrop = 0 
) [pure virtual]

Bayesian fusion of two pose distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!).

Parameters:
p1 The first distribution to fuse
p2 The second distribution to fuse
minMahalanobisDistToDrop If set to different of 0, the result of very separate Gaussian modes (that will result in negligible components) in SOGs will be dropped to reduce the number of modes in the output.

Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.

virtual void mrpt::poses::CPosePDF::changeCoordinatesReference ( const CPose2D newReferenceBase  )  [pure virtual]

This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf.

Result PDF substituted the currently stored one in the object.

Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.

virtual void mrpt::poses::CPosePDF::copyFrom ( const CPosePDF o  )  [pure virtual]

Copy operator, translating if necesary (for example, between particles and gaussian representations).

Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.

virtual void mrpt::poses::CPosePDF::drawManySamples ( size_t  N,
std::vector< vector_double > &  outSamples 
) const [pure virtual]

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.

Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.

virtual void mrpt::poses::CPosePDF::drawSingleSample ( CPose2D outPart  )  const [pure virtual]

Draws a single sample from the distribution.

Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.

virtual math::CMatrixD mrpt::poses::CPosePDF::getEstimatedCovariance (  )  const [pure virtual]

Returns an estimate of the pose covariance matrix (3x3 cov.matrix for x,y,phi variables).

Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.

double mrpt::poses::CPosePDF::getEstimatedCovarianceEntropy (  ) 

Returns the entropy of the estimated pose covariance matrix.

virtual CPose2D mrpt::poses::CPosePDF::getEstimatedPose (  )  const [pure virtual]

Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).

Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.

virtual void mrpt::poses::CPosePDF::inverse ( CPosePDF o  )  const [pure virtual]

Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.

Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.

virtual void mrpt::poses::CPosePDF::saveToTextFile ( const std::string &  file  )  const [pure virtual]

Save PDF's particles to a text file.

See derived classes for more information about the format of generated files.

Implemented in mrpt::poses::CPosePDFGaussian, mrpt::poses::CPosePDFGrid, mrpt::poses::CPosePDFParticles, and mrpt::poses::CPosePDFSOG.




Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN:exported at Mon Jan 12 13:00:16 UTC 2009