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>
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. |
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.
Definition at line 66 of file CPose3DPDFParticles.h.
mrpt::poses::CPose3DPDFParticles::CPose3DPDFParticles | ( | size_t | M = 1 |
) |
Constructor.
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.
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 | |||
) |
Bayesian fusion.
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< CPose3D, 6 >.
void mrpt::poses::CPose3DPDFParticles::copyFrom | ( | const CPose3DPDF & | o | ) |
Copy operator, translating if necesary (for example, between m_particles and gaussian representations).
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< CPose3D, 6 >.
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.
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.
CPose3D mrpt::poses::CPose3DPDFParticles::getMostLikelyParticle | ( | ) | const |
Returns the particle with the highest weight.
Reimplemented from mrpt::bayes::CParticleFilterData< CPose3D >.
CPose3D mrpt::poses::CPose3DPDFParticles::getParticlePose | ( | int | i | ) | const |
Returns the pose of the i'th particle.
void mrpt::poses::CPose3DPDFParticles::inverse | ( | CPose3DPDF & | o | ) | const |
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
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.
location | The location to set all the m_particles. | |
particlesCount | If this is set to 0 the number of m_particles remains unchanged. |
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< CPose3D, 6 >.
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.6.1 for MRPT 0.7.1 SVN: at Tue Dec 22 08:29:35 CET 2009 |