#include <mrpt/poses/CPoseRandomSampler.h>
Public Member Functions | |
CPoseRandomSampler () | |
Default constructor. | |
~CPoseRandomSampler () | |
Destructor. | |
void | setPosePDF (const CPosePDF *pdf) |
This method must be called to select the PDF from which to draw samples. | |
void | setPosePDF (const CPosePDFPtr &pdf) |
This method must be called to select the PDF from which to draw samples. | |
void | setPosePDF (const CPosePDF &pdf) |
This method must be called to select the PDF from which to draw samples. | |
void | setPosePDF (const CPose3DPDF *pdf) |
This method must be called to select the PDF from which to draw samples. | |
void | setPosePDF (const CPose3DPDFPtr &pdf) |
This method must be called to select the PDF from which to draw samples. | |
void | setPosePDF (const CPose3DPDF &pdf) |
This method must be called to select the PDF from which to draw samples. | |
CPose2D & | drawSample (CPose2D &p) const |
Generate a new sample from the selected PDF. | |
CPose3D & | drawSample (CPose3D &p) const |
Generate a new sample from the selected PDF. | |
bool | isPrepared () const |
Return true if samples can be generated, which only requires a previous call to setPosePDF. | |
void | getOriginalPDFCov2D (CMatrixDouble &cov3x3) const |
Retrieves the 3x3 covariance of the original PDF in ![]() | |
void | getOriginalPDFCov3D (CMatrixDouble &cov6x6) const |
Retrieves the 6x6 covariance of the original PDF in ![]() | |
Protected Member Functions | |
void | clear () |
Clear internal pdf. | |
void | do_sample_2D (CPose2D &p) const |
Used internally: sample from m_pdf2D. | |
void | do_sample_3D (CPose3D &p) const |
Used internally: sample from m_pdf3D. | |
Protected Attributes | |
CPosePDF * | m_pdf2D |
A local copy of the PDF. | |
CPose3DPDF * | m_pdf3D |
A local copy of the PDF. | |
CMatrixDouble | m_fastdraw_gauss_Z |
CPose2D | m_fastdraw_gauss_M_2D |
CPose3D | m_fastdraw_gauss_M_3D |
This class keeps an internal state which speeds up the sequential generation of samples. It can manage any kind of pose PDF.
Use with CPoseRandomSampler::setPosePDF, then CPoseRandomSampler::drawSample to draw values.
Notice that you can pass a 2D or 3D pose PDF, then ask for a 2D or 3D sample. This class always returns the kind of sample you ask it for, but will skip missing terms or fill out with zeroes as required. Specifically, when sampling 3D poses from a 2D pose pdf, this class will be smart enought to draw only the 3 required dimensions, avoiding a waste of time with the other 3 missing components.
Definition at line 54 of file CPoseRandomSampler.h.
mrpt::poses::CPoseRandomSampler::CPoseRandomSampler | ( | ) |
Default constructor.
mrpt::poses::CPoseRandomSampler::~CPoseRandomSampler | ( | ) |
Destructor.
void mrpt::poses::CPoseRandomSampler::clear | ( | ) | [protected] |
Clear internal pdf.
void mrpt::poses::CPoseRandomSampler::do_sample_2D | ( | CPose2D & | p | ) | const [protected] |
Used internally: sample from m_pdf2D.
void mrpt::poses::CPoseRandomSampler::do_sample_3D | ( | CPose3D & | p | ) | const [protected] |
Used internally: sample from m_pdf3D.
Generate a new sample from the selected PDF.
Generate a new sample from the selected PDF.
void mrpt::poses::CPoseRandomSampler::getOriginalPDFCov2D | ( | CMatrixDouble & | cov3x3 | ) | const |
Retrieves the 3x3 covariance of the original PDF in .
void mrpt::poses::CPoseRandomSampler::getOriginalPDFCov3D | ( | CMatrixDouble & | cov6x6 | ) | const |
Retrieves the 6x6 covariance of the original PDF in .
bool mrpt::poses::CPoseRandomSampler::isPrepared | ( | ) | const |
Return true if samples can be generated, which only requires a previous call to setPosePDF.
void mrpt::poses::CPoseRandomSampler::setPosePDF | ( | const CPose3DPDF & | ) | [inline] |
This method must be called to select the PDF from which to draw samples.
Definition at line 105 of file CPoseRandomSampler.h.
References setPosePDF().
Referenced by setPosePDF().
void mrpt::poses::CPoseRandomSampler::setPosePDF | ( | const CPose3DPDFPtr & | ) | [inline] |
This method must be called to select the PDF from which to draw samples.
Definition at line 100 of file CPoseRandomSampler.h.
References setPosePDF().
Referenced by setPosePDF().
void mrpt::poses::CPoseRandomSampler::setPosePDF | ( | const CPose3DPDF * | ) |
void mrpt::poses::CPoseRandomSampler::setPosePDF | ( | const CPosePDF & | ) | [inline] |
This method must be called to select the PDF from which to draw samples.
Definition at line 90 of file CPoseRandomSampler.h.
References setPosePDF().
Referenced by setPosePDF().
void mrpt::poses::CPoseRandomSampler::setPosePDF | ( | const CPosePDFPtr & | ) | [inline] |
This method must be called to select the PDF from which to draw samples.
Definition at line 85 of file CPoseRandomSampler.h.
References setPosePDF().
Referenced by setPosePDF().
void mrpt::poses::CPoseRandomSampler::setPosePDF | ( | const CPosePDF * | ) |
Definition at line 62 of file CPoseRandomSampler.h.
Definition at line 63 of file CPoseRandomSampler.h.
Definition at line 61 of file CPoseRandomSampler.h.
CPosePDF* mrpt::poses::CPoseRandomSampler::m_pdf2D [protected] |
CPose3DPDF* mrpt::poses::CPoseRandomSampler::m_pdf3D [protected] |
Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:07:47 EST 2009 |