MRPT logo

mrpt::poses::CPointPDFParticles Class Reference

A probability distribution of a 2D/3D point, represented as a set of random samples (particles). More...

#include <mrpt/poses/CPointPDFParticles.h>

Inheritance diagram for mrpt::poses::CPointPDFParticles:

mrpt::poses::CPointPDF mrpt::bayes::CParticleFilterData< TSimple3DPoint > mrpt::utils::CSerializable

List of all members.

Public Member Functions

 CPointPDFParticles (size_t numParticles=1)
 Default constructor.
virtual ~CPointPDFParticles ()
 Copy constructor.
void clear ()
 Clear all the particles (free memory).
void setSize (size_t numberParticles, const CPoint3D &defaultValue=CPoint3D(0, 0, 0))
 Erase all the previous particles and change the number of particles, with a given initial value.
size_t size () const
 Returns the number of particles.
CPoint3D getEstimatedPoint () const
 Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
CMatrixD getEstimatedCovariance () const
 Returns an estimate of the pose covariance matrix (3x3 cov.matrix for x,y,phi variables).
void copyFrom (const CPointPDF &o)
 Copy operator, translating if necesary (for example, between particles and gaussian representations).
void saveToTextFile (const std::string &file) const
 Save PDF's particles to a text file, where each line is: X Y Z LOG_W.
void changeCoordinatesReference (const CPose3D &newReferenceBase)
 This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf.
double computeKurtosis ()
 Compute the kurtosis of the distribution.
void drawSingleSample (CPoint3D &outSample) const
 Draw a sample from the pdf.
void bayesianFusion (CPointPDF &p1, CPointPDF &p2, const double &minMahalanobisDistToDrop=0)
 Bayesian fusion of two point 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!).

Private Member Functions

 IMPLEMENT_PARTICLE_FILTER_CAPABLE (TSimple3DPoint)


Detailed Description

A probability distribution of a 2D/3D point, represented as a set of random samples (particles).

See also:
CPointPDF

Definition at line 69 of file CPointPDFParticles.h.


Constructor & Destructor Documentation

mrpt::poses::CPointPDFParticles::CPointPDFParticles ( size_t  numParticles = 1  ) 

Default constructor.

virtual mrpt::poses::CPointPDFParticles::~CPointPDFParticles (  )  [virtual]

Copy constructor.

Assignament operator: Destructor


Member Function Documentation

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

Bayesian fusion of two point 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.

Implements mrpt::poses::CPointPDF.

void mrpt::poses::CPointPDFParticles::changeCoordinatesReference ( const CPose3D newReferenceBase  )  [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. Both the mean value and the covariance matrix are updated correctly.

Implements mrpt::poses::CPointPDF.

void mrpt::poses::CPointPDFParticles::clear ( void   )  [inline]

Clear all the particles (free memory).

Definition at line 96 of file CPointPDFParticles.h.

double mrpt::poses::CPointPDFParticles::computeKurtosis (  ) 

Compute the kurtosis of the distribution.

void mrpt::poses::CPointPDFParticles::copyFrom ( const CPointPDF o  )  [virtual]

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

Implements mrpt::poses::CPointPDF.

void mrpt::poses::CPointPDFParticles::drawSingleSample ( CPoint3D outSample  )  const [virtual]

Draw a sample from the pdf.

Implements mrpt::poses::CPointPDF.

CMatrixD mrpt::poses::CPointPDFParticles::getEstimatedCovariance (  )  const [virtual]

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

Implements mrpt::poses::CPointPDF.

CPoint3D mrpt::poses::CPointPDFParticles::getEstimatedPoint (  )  const [virtual]

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

Implements mrpt::poses::CPointPDF.

mrpt::poses::CPointPDFParticles::IMPLEMENT_PARTICLE_FILTER_CAPABLE ( TSimple3DPoint   )  [private]

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

Save PDF's particles to a text file, where each line is: X Y Z LOG_W.

Implements mrpt::poses::CPointPDF.

void mrpt::poses::CPointPDFParticles::setSize ( size_t  numberParticles,
const CPoint3D defaultValue = CPoint3D(0, 0, 0) 
)

Erase all the previous particles and change the number of particles, with a given initial value.

size_t mrpt::poses::CPointPDFParticles::size (  )  const [inline]

Returns the number of particles.

Definition at line 104 of file CPointPDFParticles.h.




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