Declares a class that represents a Probability Density function (PDF) of a 3D(6D) pose
.
This class implements that PDF as the following multi-modal Gaussian distribution:

Where the number of modes N is the size of CPose3DPDFSOG::m_modes. Angles are always in radians.
See mrpt::poses::CPose3DPDF for more details.
Definition at line 53 of file CPose3DPDFSOG.h.
#include <mrpt/poses/CPose3DPDFSOG.h>

Classes | |
| struct | TGaussianMode |
| The struct for each mode: More... | |
Public Types | |
| typedef mrpt::aligned_containers < TGaussianMode >::vector_t | TModesList |
| typedef TModesList::const_iterator | const_iterator |
| typedef TModesList::iterator | iterator |
Public Member Functions | |
| CPose3DPDFSOG (size_t nModes=1) | |
| Default constructor. | |
| void | clear () |
| Clear all the gaussian modes. | |
| void | resize (const size_t N) |
| Set the number of SOG modes. | |
| size_t | size () const |
| Return the number of Gaussian modes. | |
| bool | empty () const |
| Return whether there is any Gaussian mode. | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| 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. | |
| void | normalizeWeights () |
| Normalize the weights in m_modes such as the maximum log-weight is 0. | |
| void | getMostLikelyMode (CPose3DPDFGaussian &outVal) const |
| Return the Gaussian mode with the highest likelihood (or an empty Gaussian if there are no modes in this SOG) | |
| void | copyFrom (const CPose3DPDF &o) |
| Copy operator, translating if necesary (for example, between particles and gaussian representations) | |
| void | saveToTextFile (const std::string &file) const |
Save the density to a text file, with the following format: There is one row per Gaussian "mode", and each row contains 10 elements:
| |
| 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 | bayesianFusion (const CPose3DPDF &p1, const CPose3DPDF &p2) |
| Bayesian fusion of two pose distributions, then save the result in this object (WARNING: Currently p1 must be a mrpt::poses::CPose3DPDFSOG object and p2 a mrpt::poses::CPose3DPDFSOG object) | |
| void | drawSingleSample (CPose3D &outPart) const |
| Draws a single sample from the distribution. | |
| 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,z,yaw,pitch,roll) datum. | |
| void | inverse (CPose3DPDF &o) const |
| Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF. | |
| void | appendFrom (const CPose3DPDFSOG &o) |
| Append the Gaussian modes from "o" to the current set of modes of "this" density. | |
Protected Member Functions | |
| void | assureSymmetry () |
| Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor lead to non-symmetric matrixes!) | |
Protected Attributes | |
| TModesList | m_modes |
| Access directly to this array for modify the modes as desired. | |
RTTI stuff | |
| typedef CPose3DPDFSOGPtr | SmartPtr |
| static mrpt::utils::CLASSINIT | _init_CPose3DPDFSOG |
| static mrpt::utils::TRuntimeClassId | classCPose3DPDFSOG |
| static const mrpt::utils::TRuntimeClassId * | classinfo |
| static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
| virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
| Returns information about the class of an object in runtime. | |
| virtual mrpt::utils::CObject * | duplicate () const |
| Returns a copy of the object, indepently of its class. | |
| static mrpt::utils::CObject * | CreateObject () |
| static CPose3DPDFSOGPtr | Create () |
Definition at line 76 of file CPose3DPDFSOG.h.
Definition at line 77 of file CPose3DPDFSOG.h.
A typedef for the associated smart pointer
Definition at line 56 of file CPose3DPDFSOG.h.
| typedef mrpt::aligned_containers<TGaussianMode>::vector_t mrpt::poses::CPose3DPDFSOG::TModesList |
Definition at line 75 of file CPose3DPDFSOG.h.
| mrpt::poses::CPose3DPDFSOG::CPose3DPDFSOG | ( | size_t | nModes = 1 ) |
Default constructor.
| nModes | The initial size of CPose3DPDFSOG::m_modes |
| static const mrpt::utils::TRuntimeClassId* mrpt::poses::CPose3DPDFSOG::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::poses::CPose3DPDF.
| void mrpt::poses::CPose3DPDFSOG::appendFrom | ( | const CPose3DPDFSOG & | o ) |
Append the Gaussian modes from "o" to the current set of modes of "this" density.
| void mrpt::poses::CPose3DPDFSOG::assureSymmetry | ( | ) | [protected] |
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor lead to non-symmetric matrixes!)
| void mrpt::poses::CPose3DPDFSOG::bayesianFusion | ( | const CPose3DPDF & | p1, |
| const CPose3DPDF & | p2 | ||
| ) | [virtual] |
Bayesian fusion of two pose distributions, then save the result in this object (WARNING: Currently p1 must be a mrpt::poses::CPose3DPDFSOG object and p2 a mrpt::poses::CPose3DPDFSOG object)
Implements mrpt::poses::CPose3DPDF.
| iterator mrpt::poses::CPose3DPDFSOG::begin | ( | ) | [inline] |
Definition at line 101 of file CPose3DPDFSOG.h.
| const_iterator mrpt::poses::CPose3DPDFSOG::begin | ( | ) | const [inline] |
Definition at line 103 of file CPose3DPDFSOG.h.
| void mrpt::poses::CPose3DPDFSOG::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::CPose3DPDFSOG::clear | ( | ) |
Clear all the gaussian modes.
| void mrpt::poses::CPose3DPDFSOG::copyFrom | ( | const CPose3DPDF & | o ) | [virtual] |
Copy operator, translating if necesary (for example, between particles and gaussian representations)
Implements mrpt::poses::CPose3DPDF.
| static CPose3DPDFSOGPtr mrpt::poses::CPose3DPDFSOG::Create | ( | ) | [static] |
| static mrpt::utils::CObject* mrpt::poses::CPose3DPDFSOG::CreateObject | ( | ) | [static] |
| void mrpt::poses::CPose3DPDFSOG::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,z,yaw,pitch,roll) datum.
Reimplemented from mrpt::utils::CProbabilityDensityFunction< CPose3D, 6 >.
| void mrpt::poses::CPose3DPDFSOG::drawSingleSample | ( | CPose3D & | outPart ) | const [virtual] |
Draws a single sample from the distribution.
Implements mrpt::utils::CProbabilityDensityFunction< CPose3D, 6 >.
| virtual mrpt::utils::CObject* mrpt::poses::CPose3DPDFSOG::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
| bool mrpt::poses::CPose3DPDFSOG::empty | ( | ) | const [inline] |
Return whether there is any Gaussian mode.
Definition at line 99 of file CPose3DPDFSOG.h.
| iterator mrpt::poses::CPose3DPDFSOG::end | ( | ) | [inline] |
Definition at line 102 of file CPose3DPDFSOG.h.
| const_iterator mrpt::poses::CPose3DPDFSOG::end | ( | ) | const [inline] |
Definition at line 104 of file CPose3DPDFSOG.h.
| void mrpt::poses::CPose3DPDFSOG::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::CPose3DPDFSOG::getMean | ( | CPose3D & | mean_pose ) | const [virtual] |
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF), computed as a weighted average over all m_particles.
Implements mrpt::utils::CProbabilityDensityFunction< CPose3D, 6 >.
| void mrpt::poses::CPose3DPDFSOG::getMostLikelyMode | ( | CPose3DPDFGaussian & | outVal ) | const |
Return the Gaussian mode with the highest likelihood (or an empty Gaussian if there are no modes in this SOG)
| virtual const mrpt::utils::TRuntimeClassId* mrpt::poses::CPose3DPDFSOG::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::poses::CPose3DPDF.
| void mrpt::poses::CPose3DPDFSOG::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::CPose3DPDFSOG::normalizeWeights | ( | ) |
Normalize the weights in m_modes such as the maximum log-weight is 0.
| void mrpt::poses::CPose3DPDFSOG::resize | ( | const size_t | N ) |
Set the number of SOG modes.
| void mrpt::poses::CPose3DPDFSOG::saveToTextFile | ( | const std::string & | file ) | const [virtual] |
Save the density to a text file, with the following format: There is one row per Gaussian "mode", and each row contains 10 elements:
Implements mrpt::utils::CProbabilityDensityFunction< CPose3D, 6 >.
| size_t mrpt::poses::CPose3DPDFSOG::size | ( | ) | const [inline] |
Return the number of Gaussian modes.
Definition at line 98 of file CPose3DPDFSOG.h.
mrpt::utils::CLASSINIT mrpt::poses::CPose3DPDFSOG::_init_CPose3DPDFSOG [static, protected] |
Definition at line 56 of file CPose3DPDFSOG.h.
Definition at line 56 of file CPose3DPDFSOG.h.
const mrpt::utils::TRuntimeClassId* mrpt::poses::CPose3DPDFSOG::classinfo [static] |
Definition at line 56 of file CPose3DPDFSOG.h.
TModesList mrpt::poses::CPose3DPDFSOG::m_modes [protected] |
Access directly to this array for modify the modes as desired.
Note that no weight can be zero!! We must use pointers to satisfy the mem-alignment of the matrixes
Definition at line 88 of file CPose3DPDFSOG.h.
| Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |