MRPT logo

mrpt::poses::CPose3DPDFParticles Class Reference

Declares a class that represents a Probability Density function (PDF) of a 3D pose This class implements that PDF using a set of m_particles (for using particle filter methods), where M weighted m_particles represent the PDF. More...

#include <mrpt/poses/CPose3DPDFParticles.h>

Inheritance diagram for mrpt::poses::CPose3DPDFParticles:

mrpt::poses::CPose3DPDF mrpt::bayes::CParticleFilterData< T > mrpt::utils::CSerializable mrpt::utils::CProbabilityDensityFunction< TDATA, STATE_LEN >

List of all members.

Public Member Functions

 CPose3DPDFParticles (size_t M=1)
 Constructor.
 CPose3DPDFParticles (const CPose3DPDFParticles &obj)
 Copy constructor:.
virtual ~CPose3DPDFParticles ()
 Destructor.
void copyFrom (const CPose3DPDF &o)
 Copy operator, translating if necesary (for example, between m_particles and gaussian representations).
void resetDeterministic (const CPose3D &location, size_t particlesCount=0)
 Reset the PDF to a single point: All m_particles will be set exactly to the supplied pose.
void getMean (CPose3D &mean_pose) const
 Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF), computed as a weighted average over all m_particles.
void getCovarianceAndMean (CMatrixDouble66 &cov, CPose3D &mean_point) const
 Returns an estimate of the pose covariance matrix (6x6 cov matrix) and the mean, both at once.
CPose3D getParticlePose (int i) const
 Returns the pose of the i'th particle.
void saveToTextFile (const std::string &file) const
 Save PDF's m_particles to a text file.
size_t size () const
 Get the m_particles count (equivalent to "particlesCount").
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.
void drawSingleSample (CPose3D &outPart) const
 Draws a single sample from the distribution (WARNING: weights are assumed to be normalized!).
void drawManySamples (size_t N, std::vector< vector_double > &outSamples) const
 Draws a number of samples from the distribution, and saves as a list of 1x6 vectors, where each row contains a (x,y,phi) datum.
void operator+= (const CPose3D &Ap)
 Appends (pose-composition) a given pose "p" to each particle.
void append (CPose3DPDFParticles &o)
 Appends (add to the list) a set of m_particles to the existing ones, and then normalize weights.
void inverse (CPose3DPDF &o) const
 Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
CPose3D getMostLikelyParticle () const
 Returns the particle with the highest weight.
void bayesianFusion (CPose3DPDF &p1, CPose3DPDF &p2)
 Bayesian fusion.


Detailed Description

Declares a class that represents a Probability Density function (PDF) of a 3D pose This class implements that PDF using a set of m_particles (for using particle filter methods), where M weighted m_particles represent the PDF.

See also:
CPose3D, CPose3DPDF, CPoseGaussianPDF

Definition at line 66 of file CPose3DPDFParticles.h.


Constructor & Destructor Documentation

mrpt::poses::CPose3DPDFParticles::CPose3DPDFParticles ( size_t  M = 1  ) 

Constructor.

Parameters:
M The number of m_particles.

mrpt::poses::CPose3DPDFParticles::CPose3DPDFParticles ( const CPose3DPDFParticles obj  )  [inline]

Copy constructor:.

Definition at line 82 of file CPose3DPDFParticles.h.

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

Destructor.


Member Function Documentation

void mrpt::poses::CPose3DPDFParticles::append ( CPose3DPDFParticles o  ) 

Appends (add to the list) a set of m_particles to the existing ones, and then normalize weights.

void mrpt::poses::CPose3DPDFParticles::bayesianFusion ( CPose3DPDF p1,
CPose3DPDF p2 
) [virtual]

Bayesian fusion.

Implements mrpt::poses::CPose3DPDF.

void mrpt::poses::CPose3DPDFParticles::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.

Implements mrpt::utils::CProbabilityDensityFunction< TDATA, STATE_LEN >.

void mrpt::poses::CPose3DPDFParticles::copyFrom ( const CPose3DPDF o  )  [virtual]

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

Implements mrpt::poses::CPose3DPDF.

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

Draws a number of samples from the distribution, and saves as a list of 1x6 vectors, where each row contains a (x,y,phi) datum.

Reimplemented from mrpt::utils::CProbabilityDensityFunction< TDATA, STATE_LEN >.

void mrpt::poses::CPose3DPDFParticles::drawSingleSample ( CPose3D outPart  )  const

Draws a single sample from the distribution (WARNING: weights are assumed to be normalized!).

void mrpt::poses::CPose3DPDFParticles::getCovarianceAndMean ( CMatrixDouble66 cov,
CPose3D mean_point 
) const

Returns an estimate of the pose covariance matrix (6x6 cov matrix) and the mean, both at once.

See also:
getMean

void mrpt::poses::CPose3DPDFParticles::getMean ( CPose3D mean_pose  )  const

Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF), computed as a weighted average over all m_particles.

See also:
getCovariance

CPose3D mrpt::poses::CPose3DPDFParticles::getMostLikelyParticle (  )  const

Returns the particle with the highest weight.

Reimplemented from mrpt::bayes::CParticleFilterData< T >.

CPose3D mrpt::poses::CPose3DPDFParticles::getParticlePose ( int  i  )  const

Returns the pose of the i'th particle.

void mrpt::poses::CPose3DPDFParticles::inverse ( CPose3DPDF o  )  const [virtual]

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

Implements mrpt::poses::CPose3DPDF.

void mrpt::poses::CPose3DPDFParticles::operator+= ( const CPose3D Ap  ) 

Appends (pose-composition) a given pose "p" to each particle.

void mrpt::poses::CPose3DPDFParticles::resetDeterministic ( const CPose3D location,
size_t  particlesCount = 0 
)

Reset the PDF to a single point: All m_particles will be set exactly to the supplied pose.

Parameters:
location The location to set all the m_particles.
particlesCount If this is set to 0 the number of m_particles remains unchanged.
See also:
resetUniform, resetUniformFreeSpace

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

Save PDF's m_particles to a text file.

In each line it will go: "x y z"

Implements mrpt::utils::CProbabilityDensityFunction< TDATA, STATE_LEN >.

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

Get the m_particles count (equivalent to "particlesCount").

Definition at line 126 of file CPose3DPDFParticles.h.




Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 23:10:56 EDT 2009